gst_gl_color_convert_get_type
GST_IS_GL_COLOR_CONVERT
GST_IS_GL_COLOR_CONVERT_CLASS
-GST_GL_TYPE_COLOR_CONVERT
+GST_TYPE_GL_COLOR_CONVERT
</SECTION>
<SECTION>
<SUBSECTION Standard>
GST_GL_CONTEXT
GST_IS_GL_CONTEXT
-GST_GL_TYPE_CONTEXT
+GST_TYPE_GL_CONTEXT
GST_GL_CONTEXT_CLASS
GST_GL_CONTEXT_GET_CLASS
GST_IS_GL_CONTEXT_CLASS
<SUBSECTION Standard>
GST_GL_CONTEXT_COCOA
GST_IS_GL_CONTEXT_COCOA
-GST_GL_TYPE_CONTEXT_COCOA
+GST_TYPE_GL_CONTEXT_COCOA
GST_GL_CONTEXT_COCOA_CLASS
GST_GL_CONTEXT_COCOA_GET_CLASS
GST_IS_GL_CONTEXT_COCOA_CLASS
<SUBSECTION Standard>
GST_GL_CONTEXT_EGL
GST_IS_GL_CONTEXT_EGL
-GST_GL_TYPE_CONTEXT_EGL
+GST_TYPE_GL_CONTEXT_EGL
GST_GL_CONTEXT_EGL_CLASS
GST_GL_CONTEXT_EGL_GET_CLASS
GST_IS_GL_CONTEXT_EGL_CLASS
<SUBSECTION Standard>
GST_GL_CONTEXT_GLX
GST_IS_GL_CONTEXT_GLX
-GST_GL_TYPE_CONTEXT_GLX
+GST_TYPE_GL_CONTEXT_GLX
GST_GL_CONTEXT_GLX_CLASS
GST_GL_CONTEXT_GLX_GET_CLASS
GST_IS_GL_CONTEXT_GLX_CLASS
<SUBSECTION Standard>
GST_GL_CONTEXT_WGL
GST_IS_GL_CONTEXT_WGL
-GST_GL_TYPE_CONTEXT_WGL
+GST_TYPE_GL_CONTEXT_WGL
GST_GL_CONTEXT_WGL_CLASS
GST_GL_CONTEXT_WGL_GET_CLASS
GST_IS_GL_CONTEXT_WGL_CLASS
<SUBSECTION Standard>
GST_GL_CONTEXT_EAGL
GST_IS_GL_CONTEXT_EAGL
-GST_GL_TYPE_CONTEXT_EAGL
+GST_TYPE_GL_CONTEXT_EAGL
GST_GL_CONTEXT_EAGL_CLASS
GST_GL_CONTEXT_EAGL_GET_CLASS
GST_IS_GL_CONTEXT_EAGL_CLASS
GstGLShaderPrivate
GST_GL_SHADER
GST_IS_GL_SHADER
-GST_GL_TYPE_SHADER
+GST_TYPE_GL_SHADER
gst_gl_shader_get_type
GST_GL_SHADER_CLASS
GST_IS_GL_SHADER_CLASS
gst_gl_stereo_downmix_mode_get_type
GST_IS_GL_VIEW_CONVERT
GST_IS_GL_VIEW_CONVERT_CLASS
-GST_GL_TYPE_VIEW_CONVERT
+GST_TYPE_GL_VIEW_CONVERT
GST_GL_VIEW_CONVERT
GST_GL_VIEW_CONVERT_CLASS
GST_GL_VIEW_CONVERT_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW
GST_IS_GL_WINDOW_CLASS
-GST_GL_TYPE_WINDOW
+GST_TYPE_GL_WINDOW
GST_GL_WINDOW
GST_GL_WINDOW_CLASS
GST_GL_WINDOW_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW_ANDROID_EGL
GST_IS_GL_WINDOW_ANDROID_EGL_CLASS
-GST_GL_TYPE_WINDOW_ANDROID_EGL
+GST_TYPE_GL_WINDOW_ANDROID_EGL
GST_GL_WINDOW_ANDROID_EGL
GST_GL_WINDOW_ANDROID_EGL_CLASS
GST_GL_WINDOW_ANDROID_EGL_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW_COCOA
GST_IS_GL_WINDOW_COCOA_CLASS
-GST_GL_TYPE_WINDOW_COCOA
+GST_TYPE_GL_WINDOW_COCOA
GST_GL_WINDOW_COCOA
GST_GL_WINDOW_COCOA_CLASS
GST_GL_WINDOW_COCOA_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW_DISPMANX_EGL
GST_IS_GL_WINDOW_DISPMANX_EGL_CLASS
-GST_GL_TYPE_WINDOW_DISPMANX_EGL
+GST_TYPE_GL_WINDOW_DISPMANX_EGL
GST_GL_WINDOW_DISPMANX_EGL
GST_GL_WINDOW_DISPMANX_EGL_CLASS
GST_GL_WINDOW_DISPMANX_EGL_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW_WAYLAND_EGL
GST_IS_GL_WINDOW_WAYLAND_EGL_CLASS
-GST_GL_TYPE_WINDOW_WAYLAND_EGL
+GST_TYPE_GL_WINDOW_WAYLAND_EGL
GST_GL_WINDOW_WAYLAND_EGL
GST_GL_WINDOW_WAYLAND_EGL_CLASS
GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW_WIN32
GST_IS_GL_WINDOW_WIN32_CLASS
-GST_GL_TYPE_WINDOW_WIN32
+GST_TYPE_GL_WINDOW_WIN32
GST_GL_WINDOW_WIN32
GST_GL_WINDOW_WIN32_CLASS
GST_GL_WINDOW_WIN32_GET_CLASS
<SUBSECTION Standard>
GST_IS_GL_WINDOW_X11
GST_IS_GL_WINDOW_X11_CLASS
-GST_GL_TYPE_WINDOW_X11
+GST_TYPE_GL_WINDOW_X11
GST_GL_WINDOW_X11
GST_GL_WINDOW_X11_CLASS
GST_GL_WINDOW_X11_GET_CLASS
g_param_spec_object ("context",
"OpenGL context",
"Get OpenGL context",
- GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ GST_TYPE_GL_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_LAYER,
g_param_spec_pointer ("layer", "CAOpenGLLayer",
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT,
ca_sink->context, NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &mix->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &mix->context,
NULL);
}
}
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &mix->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &mix->context,
NULL);
}
}
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, mix->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, mix->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
g_param_spec_object ("context",
"OpenGL context",
"Get OpenGL context",
- GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ GST_TYPE_GL_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/* Register the pad class */
g_type_class_ref (GST_TYPE_GL_BASE_MIXER_PAD);
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, mix->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, mix->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
g_object_class_install_property (gobject_class, PROP_SHADER,
g_param_spec_object ("shader", "Shader object",
- "GstGLShader to use", GST_GL_TYPE_SHADER,
+ "GstGLShader to use", GST_TYPE_GL_SHADER,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_VERTEX,
gst_gl_shader_signals[SIGNAL_CREATE_SHADER] =
g_signal_new ("create-shader", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
- GST_GL_TYPE_SHADER, 0);
+ GST_TYPE_GL_SHADER, 0);
gst_element_class_set_metadata (element_class,
"OpenGL fragment shader filter", "Filter/Effect",
DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BIN_CONTEXT,
g_param_spec_object ("context", "OpenGL context", "Get OpenGL context",
- GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ GST_TYPE_GL_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BIN_PIXEL_ASPECT_RATIO,
gst_param_spec_fraction ("pixel-aspect-ratio", "Pixel Aspect Ratio",
"The pixel aspect ratio of the device", 0, 1, G_MAXINT, 1, 1, 1,
gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW] =
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 2,
- GST_GL_TYPE_CONTEXT, GST_TYPE_SAMPLE);
+ GST_TYPE_GL_CONTEXT, GST_TYPE_SAMPLE);
gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_RESHAPE] =
g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
- G_TYPE_BOOLEAN, 3, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
+ G_TYPE_BOOLEAN, 3, GST_TYPE_GL_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
}
#define GST_GLIMAGE_SINK_GET_LOCK(glsink) \
g_object_class_install_property (gobject_class, PROP_CONTEXT,
g_param_spec_object ("context", "OpenGL context", "Get OpenGL context",
- GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ GST_TYPE_GL_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_HANDLE_EVENTS,
g_param_spec_boolean ("handle-events", "Handle XEvents",
gst_glimage_sink_signals[CLIENT_DRAW_SIGNAL] =
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
- G_TYPE_BOOLEAN, 2, GST_GL_TYPE_CONTEXT, GST_TYPE_SAMPLE);
+ G_TYPE_BOOLEAN, 2, GST_TYPE_GL_CONTEXT, GST_TYPE_SAMPLE);
/**
* GstGLImageSink::client-reshape:
gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL] =
g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
- G_TYPE_BOOLEAN, 3, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
+ G_TYPE_BOOLEAN, 3, GST_TYPE_GL_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
gst_element_class_add_static_pad_template (element_class,
&gst_glimage_sink_template);
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT,
glimage_sink->context, NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &split->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &split->context,
NULL);
}
}
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &split->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &split->context,
NULL);
}
}
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, split->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, split->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, split->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, split->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, src->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, src->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &src->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &src->context,
NULL);
}
}
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &src->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &src->context,
NULL);
}
}
#define GST_CAT_DEFAULT gst_gl_video_mixer_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
-#define GST_GL_TYPE_VIDEO_MIXER_BACKGROUND (gst_gl_video_mixer_background_get_type())
+#define GST_TYPE_GL_VIDEO_MIXER_BACKGROUND (gst_gl_video_mixer_background_get_type())
static GType
gst_gl_video_mixer_background_get_type (void)
{
g_object_class_install_property (gobject_class, PROP_BIN_BACKGROUND,
g_param_spec_enum ("background", "Background", "Background type",
- GST_GL_TYPE_VIDEO_MIXER_BACKGROUND,
+ GST_TYPE_GL_VIDEO_MIXER_BACKGROUND,
DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_element_class_set_metadata (element_class, "OpenGL video_mixer bin",
g_object_class_install_property (gobject_class, PROP_BACKGROUND,
g_param_spec_enum ("background", "Background", "Background type",
- GST_GL_TYPE_VIDEO_MIXER_BACKGROUND,
+ GST_TYPE_GL_VIDEO_MIXER_BACKGROUND,
DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_video_mixer_init_shader;
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, gtk_sink->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, gtk_sink->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, qt_sink->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, qt_sink->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
context = gst_context_new ("gst.gl.app_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT,
qt_src->qt_context, NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &qt_src->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &qt_src->context,
NULL);
}
}
#define gst_gl_window_android_egl_parent_class parent_class
G_DEFINE_TYPE (GstGLWindowAndroidEGL, gst_gl_window_android_egl,
- GST_GL_TYPE_WINDOW);
+ GST_TYPE_GL_WINDOW);
static guintptr gst_gl_window_android_egl_get_display (GstGLWindow * window);
static guintptr gst_gl_window_android_egl_get_window_handle (GstGLWindow *
GST_DEBUG ("creating Android EGL window");
- return g_object_new (GST_GL_TYPE_WINDOW_ANDROID_EGL, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_ANDROID_EGL, NULL);
}
static void
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_ANDROID_EGL (gst_gl_window_android_egl_get_type())
-#define GST_GL_WINDOW_ANDROID_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL))
-#define GST_GL_WINDOW_ANDROID_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGLClass))
-#define GST_IS_GL_WINDOW_ANDROID_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_ANDROID_EGL))
-#define GST_IS_GL_WINDOW_ANDROID_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_ANDROID_EGL))
-#define GST_GL_WINDOW_ANDROID_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL_Class))
+#define GST_TYPE_GL_WINDOW_ANDROID_EGL (gst_gl_window_android_egl_get_type())
+#define GST_GL_WINDOW_ANDROID_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL))
+#define GST_GL_WINDOW_ANDROID_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGLClass))
+#define GST_IS_GL_WINDOW_ANDROID_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_ANDROID_EGL))
+#define GST_IS_GL_WINDOW_ANDROID_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_ANDROID_EGL))
+#define GST_GL_WINDOW_ANDROID_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL_Class))
typedef struct _GstGLWindowAndroidEGL GstGLWindowAndroidEGL;
typedef struct _GstGLWindowAndroidEGLClass GstGLWindowAndroidEGLClass;
G_BEGIN_DECLS
-#define GST_GL_TYPE_CONTEXT_COCOA (gst_gl_context_cocoa_get_type())
-#define GST_GL_CONTEXT_COCOA(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT_COCOA, GstGLContextCocoa))
-#define GST_GL_CONTEXT_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT_COCOA, GstGLContextCocoaClass))
-#define GST_IS_GL_CONTEXT_COCOA(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT_COCOA))
-#define GST_IS_GL_CONTEXT_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_COCOA))
-#define GST_GL_CONTEXT_COCOA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_COCOA, GstGLContextCocoaClass))
+#define GST_TYPE_GL_CONTEXT_COCOA (gst_gl_context_cocoa_get_type())
+GType gst_gl_context_cocoa_get_type (void);
+
+/* FIXME: remove this when moving to -base */
+G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT_COCOA) \
+static inline GType GST_GL_TYPE_CONTEXT_COCOA (void) { return GST_TYPE_GL_CONTEXT_COCOA; }
+#define GST_GL_CONTEXT_COCOA(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT_COCOA, GstGLContextCocoa))
+#define GST_GL_CONTEXT_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_CONTEXT_COCOA, GstGLContextCocoaClass))
+#define GST_IS_GL_CONTEXT_COCOA(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT_COCOA))
+#define GST_IS_GL_CONTEXT_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT_COCOA))
+#define GST_GL_CONTEXT_COCOA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT_COCOA, GstGLContextCocoaClass))
typedef struct _GstGLContextCocoa GstGLContextCocoa;
typedef struct _GstGLContextCocoaPrivate GstGLContextCocoaPrivate;
GstGLContextCocoaPrivate *priv;
};
-GType gst_gl_context_cocoa_get_type (void);
-
GstGLContextCocoa * gst_gl_context_cocoa_new (GstGLDisplay * display);
guintptr gst_gl_context_cocoa_get_current_context (void);
CGLPixelFormatObj gst_gl_context_cocoa_get_pixel_format (GstGLContextCocoa *context);
static GstGLPlatform gst_gl_context_cocoa_get_gl_platform (GstGLContext * context);
#define GST_GL_CONTEXT_COCOA_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT_COCOA, GstGLContextCocoaPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_CONTEXT_COCOA, GstGLContextCocoaPrivate))
GST_DEBUG_CATEGORY_STATIC (gst_gl_context_cocoa_debug);
#define GST_CAT_DEFAULT gst_gl_context_cocoa_debug
G_DEFINE_TYPE_WITH_CODE (GstGLContextCocoa, gst_gl_context_cocoa,
- GST_GL_TYPE_CONTEXT, GST_DEBUG_CATEGORY_INIT (gst_gl_context_cocoa_debug, "glcontext_cocoa", 0, "Cocoa GL Context"); );
+ GST_TYPE_GL_CONTEXT, GST_DEBUG_CATEGORY_INIT (gst_gl_context_cocoa_debug, "glcontext_cocoa", 0, "Cocoa GL Context"); );
static void
gst_gl_context_cocoa_class_init (GstGLContextCocoaClass * klass)
/* we require an cocoa display to create CGL contexts */
return NULL;
- return g_object_new (GST_GL_TYPE_CONTEXT_COCOA, NULL);
+ return g_object_new (GST_TYPE_GL_CONTEXT_COCOA, NULL);
}
struct pixel_attr
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_COCOA (gst_gl_window_cocoa_get_type())
-#define GST_GL_WINDOW_COCOA(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoa))
-#define GST_GL_WINDOW_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoaClass))
-#define GST_IS_GL_WINDOW_COCOA(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_COCOA))
-#define GST_IS_GL_WINDOW_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_COCOA))
-#define GST_GL_WINDOW_COCOA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoaClass))
+#define GST_TYPE_GL_WINDOW_COCOA (gst_gl_window_cocoa_get_type())
+#define GST_GL_WINDOW_COCOA(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_COCOA, GstGLWindowCocoa))
+#define GST_GL_WINDOW_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_COCOA, GstGLWindowCocoaClass))
+#define GST_IS_GL_WINDOW_COCOA(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_COCOA))
+#define GST_IS_GL_WINDOW_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_COCOA))
+#define GST_GL_WINDOW_COCOA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_COCOA, GstGLWindowCocoaClass))
typedef struct _GstGLWindowCocoa GstGLWindowCocoa;
typedef struct _GstGLWindowCocoaPrivate GstGLWindowCocoaPrivate;
/* =============================================================*/
#define GST_GL_WINDOW_COCOA_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoaPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_WINDOW_COCOA, GstGLWindowCocoaPrivate))
#define GST_CAT_DEFAULT gst_gl_window_cocoa_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
#define DEBUG_INIT \
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
#define gst_gl_window_cocoa_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstGLWindowCocoa, gst_gl_window_cocoa, GST_GL_TYPE_WINDOW, DEBUG_INIT);
+G_DEFINE_TYPE_WITH_CODE (GstGLWindowCocoa, gst_gl_window_cocoa, GST_TYPE_GL_WINDOW, DEBUG_INIT);
static void gst_gl_window_cocoa_finalize (GObject * object);
static gboolean gst_gl_window_cocoa_open (GstGLWindow *window, GError **err);
/* we require an cocoa display to create CGL windows */
return NULL;
- return g_object_new (GST_GL_TYPE_WINDOW_COCOA, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_COCOA, NULL);
}
/* Must be called from the main thread */
#define gst_gl_window_dispmanx_egl_parent_class parent_class
G_DEFINE_TYPE (GstGLWindowDispmanxEGL, gst_gl_window_dispmanx_egl,
- GST_GL_TYPE_WINDOW);
+ GST_TYPE_GL_WINDOW);
static guintptr gst_gl_window_dispmanx_egl_get_window_handle (GstGLWindow *
window);
GST_DEBUG ("creating Dispmanx EGL window");
- return g_object_new (GST_GL_TYPE_WINDOW_DISPMANX_EGL, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_DISPMANX_EGL, NULL);
}
static void
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_DISPMANX_EGL (gst_gl_window_dispmanx_egl_get_type())
-#define GST_GL_WINDOW_DISPMANX_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL))
-#define GST_GL_WINDOW_DISPMANX_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGLClass))
-#define GST_IS_GL_WINDOW_DISPMANX_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_DISPMANX_EGL))
-#define GST_IS_GL_WINDOW_DISPMANX_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_DISPMANX_EGL))
-#define GST_GL_WINDOW_DISPMANX_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL_Class))
+#define GST_TYPE_GL_WINDOW_DISPMANX_EGL (gst_gl_window_dispmanx_egl_get_type())
+#define GST_GL_WINDOW_DISPMANX_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL))
+#define GST_GL_WINDOW_DISPMANX_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGLClass))
+#define GST_IS_GL_WINDOW_DISPMANX_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_DISPMANX_EGL))
+#define GST_IS_GL_WINDOW_DISPMANX_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_DISPMANX_EGL))
+#define GST_GL_WINDOW_DISPMANX_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL_Class))
typedef struct _GstGLWindowDispmanxEGL GstGLWindowDispmanxEGL;
typedef struct _GstGLWindowDispmanxEGLClass GstGLWindowDispmanxEGLClass;
G_BEGIN_DECLS
-#define GST_GL_TYPE_CONTEXT_EAGL (gst_gl_context_eagl_get_type())
-#define GST_GL_CONTEXT_EAGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT_EAGL, GstGLContextEagl))
-#define GST_GL_CONTEXT_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT_EAGL, GstGLContextEaglClass))
-#define GST_IS_GL_CONTEXT_EAGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT_EAGL))
-#define GST_IS_GL_CONTEXT_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_EAGL))
-#define GST_GL_CONTEXT_EAGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_EAGL, GstGLContextEaglClass))
+#define GST_TYPE_GL_CONTEXT_EAGL (gst_gl_context_eagl_get_type())
+#define GST_GL_CONTEXT_EAGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT_EAGL, GstGLContextEagl))
+#define GST_GL_CONTEXT_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_CONTEXT_EAGL, GstGLContextEaglClass))
+#define GST_IS_GL_CONTEXT_EAGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT_EAGL))
+#define GST_IS_GL_CONTEXT_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT_EAGL))
+#define GST_GL_CONTEXT_EAGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT_EAGL, GstGLContextEaglClass))
typedef struct _GstGLContextEagl GstGLContextEagl;
typedef struct _GstGLContextEaglPrivate GstGLContextEaglPrivate;
};
#define GST_GL_CONTEXT_EAGL_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT_EAGL, GstGLContextEaglPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_CONTEXT_EAGL, GstGLContextEaglPrivate))
-G_DEFINE_TYPE (GstGLContextEagl, gst_gl_context_eagl, GST_GL_TYPE_CONTEXT);
+G_DEFINE_TYPE (GstGLContextEagl, gst_gl_context_eagl, GST_TYPE_GL_CONTEXT);
static void
gst_gl_context_eagl_class_init (GstGLContextEaglClass * klass)
gst_gl_context_eagl_new (GstGLDisplay * display)
{
/* there isn't actually a display type for eagl yet? */
- return g_object_new (GST_GL_TYPE_CONTEXT_EAGL, NULL);
+ return g_object_new (GST_TYPE_GL_CONTEXT_EAGL, NULL);
}
void
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_EAGL (gst_gl_window_eagl_get_type())
-#define GST_GL_WINDOW_EAGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_EAGL, GstGLWindowEagl))
-#define GST_GL_WINDOW_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_EAGL, GstGLWindowEaglClass))
-#define GST_IS_GL_WINDOW_EAGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_EAGL))
-#define GST_IS_GL_WINDOW_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_EAGL))
-#define GST_GL_WINDOW_EAGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_EAGL, GstGLWindowEaglClass))
+#define GST_TYPE_GL_WINDOW_EAGL (gst_gl_window_eagl_get_type())
+#define GST_GL_WINDOW_EAGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_EAGL, GstGLWindowEagl))
+#define GST_GL_WINDOW_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_EAGL, GstGLWindowEaglClass))
+#define GST_IS_GL_WINDOW_EAGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_EAGL))
+#define GST_IS_GL_WINDOW_EAGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_EAGL))
+#define GST_GL_WINDOW_EAGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_EAGL, GstGLWindowEaglClass))
typedef struct _GstGLWindowEagl GstGLWindowEagl;
typedef struct _GstGLWindowEaglPrivate GstGLWindowEaglPrivate;
#include "gstglcontext_eagl.h"
#define GST_GL_WINDOW_EAGL_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW_EAGL, GstGLWindowEaglPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_WINDOW_EAGL, GstGLWindowEaglPrivate))
#define GST_CAT_DEFAULT gst_gl_window_eagl_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
#define gst_gl_window_eagl_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstGLWindowEagl, gst_gl_window_eagl,
- GST_GL_TYPE_WINDOW, DEBUG_INIT);
+ GST_TYPE_GL_WINDOW, DEBUG_INIT);
static void gst_gl_window_eagl_finalize (GObject * object);
static guintptr gst_gl_window_eagl_get_display (GstGLWindow * window);
gst_gl_window_eagl_new (GstGLDisplay * display)
{
/* there isn't an eagl display type */
- return g_object_new (GST_GL_TYPE_WINDOW_EAGL, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_EAGL, NULL);
}
static guintptr
static gboolean gst_gl_context_egl_check_feature (GstGLContext * context,
const gchar * feature);
-G_DEFINE_TYPE (GstGLContextEGL, gst_gl_context_egl, GST_GL_TYPE_CONTEXT);
+G_DEFINE_TYPE (GstGLContextEGL, gst_gl_context_egl, GST_TYPE_GL_CONTEXT);
static void
gst_gl_context_egl_class_init (GstGLContextEGLClass * klass)
{
/* XXX: display type could theoretically be anything, as long as
* eglGetDisplay supports it. */
- return g_object_new (GST_GL_TYPE_CONTEXT_EGL, NULL);
+ return g_object_new (GST_TYPE_GL_CONTEXT_EGL, NULL);
}
const gchar *
}
egl->egl_major = egl_major;
egl->egl_minor = egl_minor;
-
+
if (window)
gst_object_unref (window);
GstGLContextEGL *context_egl = GST_GL_CONTEXT_EGL (context);
if (g_strcmp0 (feature, "EGL_KHR_image_base") == 0) {
- if (GST_GL_CHECK_GL_VERSION (context_egl->egl_major, context_egl->egl_minor, 1, 5))
- return context_egl->eglCreateImage != NULL &&
- context_egl->eglDestroyImage != NULL;
+ if (GST_GL_CHECK_GL_VERSION (context_egl->egl_major, context_egl->egl_minor,
+ 1, 5))
+ return context_egl->eglCreateImage != NULL
+ && context_egl->eglDestroyImage != NULL;
else
return context_egl->eglCreateImageKHR != NULL &&
- context_egl->eglDestroyImage != NULL;
+ context_egl->eglDestroyImage != NULL;
}
return FALSE;
typedef struct _GstGLContextEGLClass GstGLContextEGLClass;
GType gst_gl_context_egl_get_type (void);
-#define GST_GL_TYPE_CONTEXT_EGL (gst_gl_context_egl_get_type())
-#define GST_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT_EGL, GstGLContextEGL))
-#define GST_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT_EGL, GstGLContextEGLClass))
-#define GST_IS_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT_EGL))
-#define GST_IS_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_EGL))
-#define GST_GL_CONTEXT_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_EGL, GstGLContextEGLClass))
+#define GST_TYPE_GL_CONTEXT_EGL (gst_gl_context_egl_get_type())
+
+/* FIXME: remove this when moving to -base */
+G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT_EGL) \
+static inline GType GST_GL_TYPE_CONTEXT_EGL (void) { return GST_TYPE_GL_CONTEXT_EGL; }
+#define GST_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT_EGL, GstGLContextEGL))
+#define GST_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_CONTEXT_EGL, GstGLContextEGLClass))
+#define GST_IS_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT_EGL))
+#define GST_IS_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT_EGL))
+#define GST_GL_CONTEXT_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT_EGL, GstGLContextEGLClass))
/**
* GstGLContextEGL:
g_param_spec_object ("context",
"OpenGL context",
"Get OpenGL context",
- GST_GL_TYPE_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ GST_TYPE_GL_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
klass->supported_gl_api = GST_GL_API_ANY;
}
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &filter->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &filter->context,
NULL);
}
}
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &filter->context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &filter->context,
NULL);
}
}
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, filter->context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, filter->context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
G_DEFINE_ABSTRACT_TYPE (GstGLContext, gst_gl_context, GST_TYPE_OBJECT);
#define GST_GL_CONTEXT_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT, GstGLContextPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_CONTEXT, GstGLContextPrivate))
static void _init_debug (void);
GstGLContextClass parent;
} GstGLWrappedContextClass;
-#define GST_GL_TYPE_WRAPPED_CONTEXT (gst_gl_wrapped_context_get_type())
+#define GST_TYPE_GL_WRAPPED_CONTEXT (gst_gl_wrapped_context_get_type())
GType gst_gl_wrapped_context_get_type (void);
G_DEFINE_TYPE (GstGLWrappedContext, gst_gl_wrapped_context,
- GST_GL_TYPE_CONTEXT);
+ GST_TYPE_GL_CONTEXT);
-#define GST_GL_WRAPPED_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WRAPPED_CONTEXT, GstGLWrappedContext))
-#define GST_GL_WRAPPED_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT, GstGLContextClass))
-#define GST_IS_GL_WRAPPED_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WRAPPED_CONTEXT))
-#define GST_IS_GL_WRAPPED_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WRAPPED_CONTEXT))
-#define GST_GL_WRAPPED_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WRAPPED_CONTEXT, GstGLWrappedContextClass))
+#define GST_GL_WRAPPED_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WRAPPED_CONTEXT, GstGLWrappedContext))
+#define GST_GL_WRAPPED_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_CONTEXT, GstGLContextClass))
+#define GST_IS_GL_WRAPPED_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WRAPPED_CONTEXT))
+#define GST_IS_GL_WRAPPED_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WRAPPED_CONTEXT))
+#define GST_GL_WRAPPED_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WRAPPED_CONTEXT, GstGLWrappedContextClass))
GQuark
gst_gl_context_error_quark (void)
g_return_val_if_fail ((display_api & available_apis) != GST_GL_API_NONE,
NULL);
- context_wrap = g_object_new (GST_GL_TYPE_WRAPPED_CONTEXT, NULL);
+ context_wrap = g_object_new (GST_TYPE_GL_WRAPPED_CONTEXT, NULL);
if (!context_wrap) {
/* subclass returned a NULL context */
G_BEGIN_DECLS
-#define GST_GL_TYPE_CONTEXT (gst_gl_context_get_type())
-#define GST_GL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT, GstGLContext))
-#define GST_GL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_GL_TYPE_CONTEXT, GstGLContextClass))
-#define GST_IS_GL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT))
-#define GST_IS_GL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT))
-#define GST_GL_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT, GstGLContextClass))
GST_EXPORT
-GType gst_gl_context_get_type (void);
+GType gst_gl_context_get_type (void);
+#define GST_TYPE_GL_CONTEXT (gst_gl_context_get_type())
+
+/* FIXME: remove this when moving to -base */
+G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT) \
+static inline GType GST_GL_TYPE_CONTEXT (void) { return GST_TYPE_GL_CONTEXT; }
+#define GST_GL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT, GstGLContext))
+#define GST_GL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_GL_CONTEXT, GstGLContextClass))
+#define GST_IS_GL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT))
+#define GST_IS_GL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT))
+#define GST_GL_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT, GstGLContextClass))
-#define GST_GL_CONTEXT_ERROR (gst_gl_context_error_quark ())
GST_EXPORT
GQuark gst_gl_context_error_quark (void);
+#define GST_GL_CONTEXT_ERROR (gst_gl_context_error_quark ())
/**
* GstGLContextThreadFunc:
gst_gl_display_signals[CREATE_CONTEXT] =
g_signal_new ("create-context", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
- GST_GL_TYPE_CONTEXT, 1, GST_GL_TYPE_CONTEXT);
+ GST_TYPE_GL_CONTEXT, 1, GST_TYPE_GL_CONTEXT);
klass->get_handle = gst_gl_display_default_get_handle;
#endif
#define GST_GL_SHADER_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_SHADER, GstGLShaderPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_SHADER, GstGLShaderPrivate))
#define USING_OPENGL(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL, 1, 0))
#define USING_OPENGL3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 3, 1))
g_return_val_if_fail (GST_IS_GL_CONTEXT (context), NULL);
- shader = g_object_new (GST_GL_TYPE_SHADER, NULL);
+ shader = g_object_new (GST_TYPE_GL_SHADER, NULL);
shader->context = gst_object_ref (context);
while ((stage = va_arg (varargs, GstGLSLStage *))) {
GST_EXPORT
GType gst_gl_shader_get_type (void);
-#define GST_GL_TYPE_SHADER (gst_gl_shader_get_type())
-#define GST_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_SHADER, GstGLShader))
-#define GST_GL_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_SHADER, GstGLShaderClass))
-#define GST_IS_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_SHADER))
-#define GST_IS_GL_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_SHADER))
-#define GST_GL_SHADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_SHADER, GstGLShaderClass))
+#define GST_TYPE_GL_SHADER (gst_gl_shader_get_type())
+
+/* FIXME: remove this when moving to -base */
+G_DEPRECATED_FOR(GST_TYPE_GL_SHADER) \
+static inline GType GST_GL_TYPE_SHADER (void) { return GST_TYPE_GL_SHADER; }
+#define GST_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_SHADER, GstGLShader))
+#define GST_GL_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_SHADER, GstGLShaderClass))
+#define GST_IS_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_SHADER))
+#define GST_IS_GL_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_SHADER))
+#define GST_GL_SHADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_SHADER, GstGLShaderClass))
struct _GstGLShader
{
gl_context =
gst_structure_new ("GstVideoGLTextureUploadMeta", "gst.gl.GstGLContext",
- GST_GL_TYPE_CONTEXT, upload->upload->context, "gst.gl.context.handle",
+ GST_TYPE_GL_CONTEXT, upload->upload->context, "gst.gl.context.handle",
G_TYPE_POINTER, handle, "gst.gl.context.type", G_TYPE_STRING, platform,
"gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
gst_query_add_allocation_meta (query,
GstGLDisplay *context_display;
GstGLDisplay *element_display;
- if (gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT,
+ if (gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT,
&context_replacement, NULL)) {
context_display = gst_gl_context_get_display (context_replacement);
element_display = display_replacement ? display_replacement : *display;
context = gst_context_new ("gst.gl.app_context", TRUE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, *other_context, NULL);
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, *other_context, NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
G_DEFINE_ABSTRACT_TYPE (GstGLWindow, gst_gl_window, GST_TYPE_OBJECT);
#define GST_GL_WINDOW_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW, GstGLWindowPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_WINDOW, GstGLWindowPrivate))
static void gst_gl_window_default_draw (GstGLWindow * window);
static void gst_gl_window_default_run (GstGLWindow * window);
GType gst_gl_dummy_window_get_type (void);
-G_DEFINE_TYPE (GstGLDummyWindow, gst_gl_dummy_window, GST_GL_TYPE_WINDOW);
+G_DEFINE_TYPE (GstGLDummyWindow, gst_gl_dummy_window, GST_TYPE_GL_WINDOW);
static gboolean
gst_gl_window_navigation_started (gpointer data)
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW (gst_gl_window_get_type())
-#define GST_GL_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW, GstGLWindow))
-#define GST_GL_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_GL_TYPE_WINDOW, GstGLWindowClass))
-#define GST_IS_GL_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW))
-#define GST_IS_GL_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW))
-#define GST_GL_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW, GstGLWindowClass))
+GST_EXPORT
+GType gst_gl_window_get_type (void);
+#define GST_TYPE_GL_WINDOW (gst_gl_window_get_type())
+
+/* FIXME: remove this when moving to -base */
+G_DEPRECATED_FOR(GST_TYPE_GL_WINDOW) \
+static inline GType GST_GL_TYPE_WINDOW (void) { return GST_TYPE_GL_WINDOW; }
+#define GST_GL_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW, GstGLWindow))
+#define GST_GL_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_GL_WINDOW, GstGLWindowClass))
+#define GST_IS_GL_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW))
+#define GST_IS_GL_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW))
+#define GST_GL_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW, GstGLWindowClass))
#define GST_GL_WINDOW_LOCK(w) g_mutex_lock(&GST_GL_WINDOW(w)->lock)
#define GST_GL_WINDOW_UNLOCK(w) g_mutex_unlock(&GST_GL_WINDOW(w)->lock)
#define GST_GL_WINDOW_GET_LOCK(w) (&GST_GL_WINDOW(w)->lock)
+GST_EXPORT
+GQuark gst_gl_window_error_quark (void);
#define GST_GL_WINDOW_ERROR (gst_gl_window_error_quark ())
/**
};
GST_EXPORT
-GQuark gst_gl_window_error_quark (void);
-GST_EXPORT
-GType gst_gl_window_get_type (void);
-
-GST_EXPORT
GstGLWindow * gst_gl_window_new (GstGLDisplay *display);
/* callbacks */
#define gst_gl_window_wayland_egl_parent_class parent_class
G_DEFINE_TYPE (GstGLWindowWaylandEGL, gst_gl_window_wayland_egl,
- GST_GL_TYPE_WINDOW);
+ GST_TYPE_GL_WINDOW);
static guintptr gst_gl_window_wayland_egl_get_window_handle (GstGLWindow *
window);
GST_DEBUG ("creating Wayland EGL window");
- return g_object_new (GST_GL_TYPE_WINDOW_WAYLAND_EGL, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_WAYLAND_EGL, NULL);
}
static void
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_WAYLAND_EGL (gst_gl_window_wayland_egl_get_type())
-#define GST_GL_WINDOW_WAYLAND_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL))
-#define GST_GL_WINDOW_WAYLAND_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGLClass))
-#define GST_IS_GL_WINDOW_WAYLAND_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_WAYLAND_EGL))
-#define GST_IS_GL_WINDOW_WAYLAND_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_WAYLAND_EGL))
-#define GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL_Class))
+#define GST_TYPE_GL_WINDOW_WAYLAND_EGL (gst_gl_window_wayland_egl_get_type())
+#define GST_GL_WINDOW_WAYLAND_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL))
+#define GST_GL_WINDOW_WAYLAND_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGLClass))
+#define GST_IS_GL_WINDOW_WAYLAND_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_WAYLAND_EGL))
+#define GST_IS_GL_WINDOW_WAYLAND_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_WAYLAND_EGL))
+#define GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL_Class))
typedef struct _GstGLWindowWaylandEGL GstGLWindowWaylandEGL;
typedef struct _GstGLWindowWaylandEGLClass GstGLWindowWaylandEGLClass;
#define GST_CAT_DEFAULT gst_gl_context_debug
#define gst_gl_context_wgl_parent_class parent_class
-G_DEFINE_TYPE (GstGLContextWGL, gst_gl_context_wgl, GST_GL_TYPE_CONTEXT);
+G_DEFINE_TYPE (GstGLContextWGL, gst_gl_context_wgl, GST_TYPE_GL_CONTEXT);
#define GST_GL_CONTEXT_WGL_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT_WGL, GstGLContextWGLPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_CONTEXT_WGL, GstGLContextWGLPrivate))
static guintptr gst_gl_context_wgl_get_gl_context (GstGLContext * context);
static void gst_gl_context_wgl_swap_buffers (GstGLContext * context);
/* we require an win32 display handle to create WGL contexts */
return NULL;
- return g_object_new (GST_GL_TYPE_CONTEXT_WGL, NULL);
+ return g_object_new (GST_TYPE_GL_CONTEXT_WGL, NULL);
}
static HGLRC
G_BEGIN_DECLS
-#define GST_GL_TYPE_CONTEXT_WGL (gst_gl_context_wgl_get_type())
-#define GST_GL_CONTEXT_WGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT_WGL, GstGLContextWGL))
-#define GST_GL_CONTEXT_WGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT_WGL, GstGLContextWGLClass))
-#define GST_IS_GL_CONTEXT_WGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT_WGL))
-#define GST_IS_GL_CONTEXT_WGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_WGL))
-#define GST_GL_CONTEXT_WGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_WGL, GstGLContextWGLClass))
+#define GST_TYPE_GL_CONTEXT_WGL (gst_gl_context_wgl_get_type())
+#define GST_GL_CONTEXT_WGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT_WGL, GstGLContextWGL))
+#define GST_GL_CONTEXT_WGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_CONTEXT_WGL, GstGLContextWGLClass))
+#define GST_IS_GL_CONTEXT_WGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT_WGL))
+#define GST_IS_GL_CONTEXT_WGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT_WGL))
+#define GST_GL_CONTEXT_WGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT_WGL, GstGLContextWGLClass))
typedef struct _GstGLContextWGL GstGLContextWGL;
typedef struct _GstGLContextWGLClass GstGLContextWGLClass;
LPARAM lParam);
#define GST_GL_WINDOW_WIN32_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32Private))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_WINDOW_WIN32, GstGLWindowWin32Private))
enum
{
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
#define gst_gl_window_win32_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstGLWindowWin32, gst_gl_window_win32,
- GST_GL_TYPE_WINDOW, DEBUG_INIT);
+ GST_TYPE_GL_WINDOW, DEBUG_INIT);
static void gst_gl_window_win32_set_window_handle (GstGLWindow * window,
guintptr handle);
/* we require an win32 display to create win32 windows */
return NULL;
- return g_object_new (GST_GL_TYPE_WINDOW_WIN32, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_WIN32, NULL);
}
static void
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_WIN32 (gst_gl_window_win32_get_type())
-#define GST_GL_WINDOW_WIN32(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32))
-#define GST_GL_WINDOW_WIN32_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32Class))
-#define GST_IS_GL_WINDOW_WIN32(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_WIN32))
-#define GST_IS_GL_WINDOW_WIN32_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_WIN32))
-#define GST_GL_WINDOW_WIN32_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32Class))
+#define GST_TYPE_GL_WINDOW_WIN32 (gst_gl_window_win32_get_type())
+#define GST_GL_WINDOW_WIN32(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_WIN32, GstGLWindowWin32))
+#define GST_GL_WINDOW_WIN32_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_WIN32, GstGLWindowWin32Class))
+#define GST_IS_GL_WINDOW_WIN32(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_WIN32))
+#define GST_IS_GL_WINDOW_WIN32_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_WIN32))
+#define GST_GL_WINDOW_WIN32_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_WIN32, GstGLWindowWin32Class))
typedef struct _GstGLWindowWin32 GstGLWindowWin32;
typedef struct _GstGLWindowWin32Private GstGLWindowWin32Private;
#define GST_CAT_DEFAULT gst_gl_context_debug
#define gst_gl_context_glx_parent_class parent_class
-G_DEFINE_TYPE (GstGLContextGLX, gst_gl_context_glx, GST_GL_TYPE_CONTEXT);
+G_DEFINE_TYPE (GstGLContextGLX, gst_gl_context_glx, GST_TYPE_GL_CONTEXT);
#define GST_GL_CONTEXT_GLX_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_CONTEXT_GLX, GstGLContextGLXPrivate))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_CONTEXT_GLX, GstGLContextGLXPrivate))
static guintptr gst_gl_context_glx_get_gl_context (GstGLContext * context);
static void gst_gl_context_glx_swap_buffers (GstGLContext * context);
/* we require an x11 display handle to create GLX contexts */
return NULL;
- return g_object_new (GST_GL_TYPE_CONTEXT_GLX, NULL);
+ return g_object_new (GST_TYPE_GL_CONTEXT_GLX, NULL);
}
static inline void
G_BEGIN_DECLS
-#define GST_GL_TYPE_CONTEXT_GLX (gst_gl_context_glx_get_type())
-#define GST_GL_CONTEXT_GLX(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_CONTEXT_GLX, GstGLContextGLX))
-#define GST_GL_CONTEXT_GLX_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_CONTEXT_GLX, GstGLContextGLXClass))
-#define GST_IS_GL_CONTEXT_GLX(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT_GLX))
-#define GST_IS_GL_CONTEXT_GLX_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_GLX))
-#define GST_GL_CONTEXT_GLX_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_GLX, GstGLContextGLX_Class))
+#define GST_TYPE_GL_CONTEXT_GLX (gst_gl_context_glx_get_type())
+GType gst_gl_context_glx_get_type (void);
+
+/* FIXME: remove this when moving to -base */
+G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT_GLX) \
+static inline GType GST_GL_TYPE_CONTEXT_GLX (void) { return GST_TYPE_GL_CONTEXT_GLX; }
+#define GST_GL_CONTEXT_GLX(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_CONTEXT_GLX, GstGLContextGLX))
+#define GST_GL_CONTEXT_GLX_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_CONTEXT_GLX, GstGLContextGLXClass))
+#define GST_IS_GL_CONTEXT_GLX(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_CONTEXT_GLX))
+#define GST_IS_GL_CONTEXT_GLX_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_CONTEXT_GLX))
+#define GST_GL_CONTEXT_GLX_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_CONTEXT_GLX, GstGLContextGLX_Class))
typedef struct _GstGLContextGLX GstGLContextGLX;
typedef struct _GstGLContextGLXClass GstGLContextGLXClass;
gpointer _reserved[GST_PADDING];
};
-GType gst_gl_context_glx_get_type (void);
-
GstGLContextGLX * gst_gl_context_glx_new (GstGLDisplay * display);
guintptr gst_gl_context_glx_get_current_context (void);
gpointer gst_gl_context_glx_get_proc_address (GstGLAPI gl_api, const gchar * name);
#include <X11/XKBlib.h>
#define GST_GL_WINDOW_X11_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11Private))
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11Private))
#define GST_CAT_DEFAULT gst_gl_window_debug
#define gst_gl_window_x11_parent_class parent_class
-G_DEFINE_TYPE (GstGLWindowX11, gst_gl_window_x11, GST_GL_TYPE_WINDOW);
+G_DEFINE_TYPE (GstGLWindowX11, gst_gl_window_x11, GST_TYPE_GL_WINDOW);
/* X error trap */
static int TrappedErrorCode = 0;
return NULL;
}
- return g_object_new (GST_GL_TYPE_WINDOW_X11, NULL);
+ return g_object_new (GST_TYPE_GL_WINDOW_X11, NULL);
}
gboolean
G_BEGIN_DECLS
-#define GST_GL_TYPE_WINDOW_X11 (gst_gl_window_x11_get_type())
-#define GST_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11))
-#define GST_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11Class))
-#define GST_IS_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_X11))
-#define GST_IS_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_X11))
-#define GST_GL_WINDOW_X11_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11Class))
+#define GST_TYPE_GL_WINDOW_X11 (gst_gl_window_x11_get_type())
+GType gst_gl_window_x11_get_type (void);
+#define GST_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11))
+#define GST_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11Class))
+#define GST_IS_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_X11))
+#define GST_IS_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_X11))
+#define GST_GL_WINDOW_X11_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11Class))
typedef struct _GstGLWindowX11 GstGLWindowX11;
typedef struct _GstGLWindowX11Private GstGLWindowX11Private;
gpointer _reserved[GST_PADDING_LARGE];
};
-GType gst_gl_window_x11_get_type (void);
-
GstGLWindowX11 * gst_gl_window_x11_new (GstGLDisplay * display);
void gst_gl_window_x11_trap_x_errors (void);
context = gst_context_new ("gst.gl.local_context", FALSE);
s = gst_context_writable_structure (context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, self->gl_context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, self->gl_context,
NULL);
gst_query_set_context (query, context);
gst_context_unref (context);
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &self->gl_context,
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &self->gl_context,
NULL);
}
}
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &gl_context, NULL);
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &gl_context, NULL);
}
}
if (!gl_context && gst_gl_run_query (ctxh->element, query, GST_PAD_SINK)) {
gst_query_parse_context (query, &context);
if (context) {
s = gst_context_get_structure (context);
- gst_structure_get (s, "context", GST_GL_TYPE_CONTEXT, &gl_context, NULL);
+ gst_structure_get (s, "context", GST_TYPE_GL_CONTEXT, &gl_context, NULL);
}
}
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
GstStructure *s = gst_context_writable_structure (app_context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, p->context, NULL);
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, p->context, NULL);
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
}
break;
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
GstStructure *s = gst_context_writable_structure (app_context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, sdl_context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, sdl_context,
NULL);
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
return TRUE;
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
GstStructure *s = gst_context_writable_structure (app_context);
- gst_structure_set (s, "context", GST_GL_TYPE_CONTEXT, sdl_context,
+ gst_structure_set (s, "context", GST_TYPE_GL_CONTEXT, sdl_context,
NULL);
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
return TRUE;