From 41a6448918edeae911e3e0cbcb43f20b7de24877 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 5 Oct 2016 12:19:12 +1100 Subject: [PATCH] gl: GST_GL_TYPE -> GST_TYPE_GL Some deprecated symbols are kept for backwards compatibility --- docs/libs/gst-plugins-bad-libs-sections.txt | 32 +++++++++---------- ext/gl/caopengllayersink.m | 4 +-- ext/gl/gstglbasemixer.c | 10 +++--- ext/gl/gstglfiltershader.c | 4 +-- ext/gl/gstglimagesink.c | 14 ++++---- ext/gl/gstglstereosplit.c | 8 ++--- ext/gl/gstgltestsrc.c | 6 ++-- ext/gl/gstglvideomixer.c | 6 ++-- ext/gtk/gstgtkglsink.c | 2 +- ext/qt/gstqtsink.cc | 2 +- ext/qt/gstqtsrc.cc | 4 +-- .../gst/gl/android/gstglwindow_android_egl.c | 4 +-- .../gst/gl/android/gstglwindow_android_egl.h | 12 +++---- gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h | 19 ++++++----- gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m | 6 ++-- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h | 12 +++---- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 6 ++-- .../gl/dispmanx/gstglwindow_dispmanx_egl.c | 4 +-- .../gl/dispmanx/gstglwindow_dispmanx_egl.h | 12 +++---- gst-libs/gst/gl/eagl/gstglcontext_eagl.h | 12 +++---- gst-libs/gst/gl/eagl/gstglcontext_eagl.m | 6 ++-- gst-libs/gst/gl/eagl/gstglwindow_eagl.h | 12 +++---- gst-libs/gst/gl/eagl/gstglwindow_eagl.m | 6 ++-- gst-libs/gst/gl/egl/gstglcontext_egl.c | 15 +++++---- gst-libs/gst/gl/egl/gstglcontext_egl.h | 16 ++++++---- gst-libs/gst/gl/gstglbasefilter.c | 8 ++--- gst-libs/gst/gl/gstglcontext.c | 18 +++++------ gst-libs/gst/gl/gstglcontext.h | 20 +++++++----- gst-libs/gst/gl/gstgldisplay.c | 2 +- gst-libs/gst/gl/gstglshader.c | 4 +-- gst-libs/gst/gl/gstglshader.h | 16 ++++++---- gst-libs/gst/gl/gstglupload.c | 2 +- gst-libs/gst/gl/gstglutils.c | 4 +-- gst-libs/gst/gl/gstglwindow.c | 4 +-- gst-libs/gst/gl/gstglwindow.h | 25 ++++++++------- .../gst/gl/wayland/gstglwindow_wayland_egl.c | 4 +-- .../gst/gl/wayland/gstglwindow_wayland_egl.h | 12 +++---- gst-libs/gst/gl/win32/gstglcontext_wgl.c | 6 ++-- gst-libs/gst/gl/win32/gstglcontext_wgl.h | 12 +++---- gst-libs/gst/gl/win32/gstglwindow_win32.c | 6 ++-- gst-libs/gst/gl/win32/gstglwindow_win32.h | 12 +++---- gst-libs/gst/gl/x11/gstglcontext_glx.c | 6 ++-- gst-libs/gst/gl/x11/gstglcontext_glx.h | 19 ++++++----- gst-libs/gst/gl/x11/gstglwindow_x11.c | 6 ++-- gst-libs/gst/gl/x11/gstglwindow_x11.h | 15 ++++----- sys/androidmedia/gstamcvideodec.c | 4 +-- sys/applemedia/glcontexthelper.c | 4 +-- .../gl/qt/qglwtextureshare/pipeline.cpp | 2 +- tests/examples/gl/sdl/sdlshare.c | 2 +- tests/examples/gl/sdl/sdlshare2.c | 2 +- 50 files changed, 235 insertions(+), 214 deletions(-) diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt b/docs/libs/gst-plugins-bad-libs-sections.txt index 77092f943e..cf98424aee 100644 --- a/docs/libs/gst-plugins-bad-libs-sections.txt +++ b/docs/libs/gst-plugins-bad-libs-sections.txt @@ -847,7 +847,7 @@ GST_GL_COLOR_CONVERT_CLASS 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
@@ -887,7 +887,7 @@ gst_gl_context_get_current 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 @@ -932,7 +932,7 @@ gst_gl_context_cocoa_get_pixel_format 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 @@ -954,7 +954,7 @@ gst_gl_context_egl_get_error_string 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 @@ -973,7 +973,7 @@ gst_gl_context_glx_get_proc_address 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 @@ -992,7 +992,7 @@ gst_gl_context_wgl_get_proc_address 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 @@ -1010,7 +1010,7 @@ gst_gl_context_eagl_get_current_context 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 @@ -1468,7 +1468,7 @@ gst_gl_shader_string_vertex_mat4_vertex_transform 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 @@ -1603,7 +1603,7 @@ gst_gl_view_convert_set_context 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 @@ -1647,7 +1647,7 @@ gst_gl_window_set_render_rectangle 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 @@ -1674,7 +1674,7 @@ gst_gl_window_android_egl_new 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 @@ -1691,7 +1691,7 @@ gst_gl_window_cocoa_create_window 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 @@ -1710,7 +1710,7 @@ gst_gl_window_dispmanx_egl_new 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 @@ -1745,7 +1745,7 @@ gst_gl_window_wayland_egl_new 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 @@ -1765,7 +1765,7 @@ gst_gl_window_win32_create_window 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 @@ -1785,7 +1785,7 @@ gst_gl_window_x11_untrap_x_errors 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 diff --git a/ext/gl/caopengllayersink.m b/ext/gl/caopengllayersink.m index f547c73b6c..a0c6e5789b 100644 --- a/ext/gl/caopengllayersink.m +++ b/ext/gl/caopengllayersink.m @@ -216,7 +216,7 @@ gst_ca_opengl_layer_sink_class_init (GstCAOpenGLLayerSinkClass * klass) 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", @@ -410,7 +410,7 @@ gst_ca_opengl_layer_sink_query (GstBaseSink * bsink, GstQuery * query) 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); diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c index 410a42022a..2611f3d9a9 100644 --- a/ext/gl/gstglbasemixer.c +++ b/ext/gl/gstglbasemixer.c @@ -157,7 +157,7 @@ _find_local_gl_context (GstGLBaseMixer * mix) 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); } } @@ -166,7 +166,7 @@ _find_local_gl_context (GstGLBaseMixer * mix) 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); } } @@ -317,7 +317,7 @@ gst_gl_base_mixer_sink_query (GstAggregator * agg, GstAggregatorPad * bpad, 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); @@ -416,7 +416,7 @@ gst_gl_base_mixer_class_init (GstGLBaseMixerClass * klass) 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); @@ -536,7 +536,7 @@ gst_gl_base_mixer_src_query (GstAggregator * agg, GstQuery * query) 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); diff --git a/ext/gl/gstglfiltershader.c b/ext/gl/gstglfiltershader.c index 93962f91cb..bff3c44368 100644 --- a/ext/gl/gstglfiltershader.c +++ b/ext/gl/gstglfiltershader.c @@ -101,7 +101,7 @@ gst_gl_filtershader_class_init (GstGLFilterShaderClass * klass) 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, @@ -137,7 +137,7 @@ gst_gl_filtershader_class_init (GstGLFilterShaderClass * klass) 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", diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index 385e3e4b0c..db21faede5 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -255,7 +255,7 @@ gst_gl_image_sink_bin_class_init (GstGLImageSinkBinClass * klass) 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, @@ -290,12 +290,12 @@ gst_gl_image_sink_bin_class_init (GstGLImageSinkBinClass * klass) 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) \ @@ -663,7 +663,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass) 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", @@ -716,7 +716,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass) 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: @@ -733,7 +733,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass) 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); @@ -1101,7 +1101,7 @@ gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * query) 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); diff --git a/ext/gl/gstglstereosplit.c b/ext/gl/gstglstereosplit.c index 744a7f2214..38836ad9d5 100644 --- a/ext/gl/gstglstereosplit.c +++ b/ext/gl/gstglstereosplit.c @@ -427,7 +427,7 @@ _find_local_gl_context (GstGLStereoSplit * split) 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); } } @@ -436,7 +436,7 @@ _find_local_gl_context (GstGLStereoSplit * split) 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); } } @@ -647,7 +647,7 @@ stereosplit_src_query (GstPad * pad, GstObject * parent, GstQuery * query) 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); @@ -705,7 +705,7 @@ stereosplit_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) 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); diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c index 62d231ff8f..11ecc1d165 100644 --- a/ext/gl/gstgltestsrc.c +++ b/ext/gl/gstgltestsrc.c @@ -347,7 +347,7 @@ gst_gl_test_src_query (GstBaseSrc * bsrc, GstQuery * query) 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); @@ -596,7 +596,7 @@ _find_local_gl_context (GstGLTestSrc * src) 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); } } @@ -605,7 +605,7 @@ _find_local_gl_context (GstGLTestSrc * src) 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); } } diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index 04fab6f907..47d039678d 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -51,7 +51,7 @@ #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) { @@ -417,7 +417,7 @@ gst_gl_video_mixer_bin_class_init (GstGLVideoMixerBinClass * klass) 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", @@ -875,7 +875,7 @@ gst_gl_video_mixer_class_init (GstGLVideoMixerClass * klass) 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; diff --git a/ext/gtk/gstgtkglsink.c b/ext/gtk/gstgtkglsink.c index 4081754673..6843451046 100644 --- a/ext/gtk/gstgtkglsink.c +++ b/ext/gtk/gstgtkglsink.c @@ -120,7 +120,7 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * query) 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); diff --git a/ext/qt/gstqtsink.cc b/ext/qt/gstqtsink.cc index 62a5373689..85d6ae3f66 100644 --- a/ext/qt/gstqtsink.cc +++ b/ext/qt/gstqtsink.cc @@ -262,7 +262,7 @@ gst_qt_sink_query (GstBaseSink * bsink, GstQuery * query) 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); diff --git a/ext/qt/gstqtsrc.cc b/ext/qt/gstqtsrc.cc index 3cfc709f18..83aed985fd 100644 --- a/ext/qt/gstqtsrc.cc +++ b/ext/qt/gstqtsrc.cc @@ -310,7 +310,7 @@ gst_qt_src_query (GstBaseSrc * bsrc, GstQuery * query) 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); @@ -348,7 +348,7 @@ _find_local_gl_context (GstQtSrc * qt_src) 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); } } diff --git a/gst-libs/gst/gl/android/gstglwindow_android_egl.c b/gst-libs/gst/gl/android/gstglwindow_android_egl.c index f234acf473..af0ec1a7fe 100644 --- a/gst-libs/gst/gl/android/gstglwindow_android_egl.c +++ b/gst-libs/gst/gl/android/gstglwindow_android_egl.c @@ -37,7 +37,7 @@ #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 * @@ -75,7 +75,7 @@ gst_gl_window_android_egl_new (GstGLDisplay * display) 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 diff --git a/gst-libs/gst/gl/android/gstglwindow_android_egl.h b/gst-libs/gst/gl/android/gstglwindow_android_egl.h index b8dc66dc9a..b467b6dbd4 100644 --- a/gst-libs/gst/gl/android/gstglwindow_android_egl.h +++ b/gst-libs/gst/gl/android/gstglwindow_android_egl.h @@ -27,12 +27,12 @@ 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; diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h index 8e4d1ac304..193e95edd4 100644 --- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h +++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.h @@ -27,12 +27,17 @@ 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; @@ -58,8 +63,6 @@ struct _GstGLContextCocoaClass { 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); diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m index ac1e0d6928..c6bfb78219 100644 --- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m @@ -36,13 +36,13 @@ static GstGLAPI gst_gl_context_cocoa_get_gl_api (GstGLContext * 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) @@ -78,7 +78,7 @@ gst_gl_context_cocoa_new (GstGLDisplay * display) /* 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 diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h index 6d1404bdba..4c0bf4fc30 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.h @@ -27,12 +27,12 @@ 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; diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 495d0227e8..72e10e5fa9 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -56,7 +56,7 @@ /* =============================================================*/ #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); @@ -64,7 +64,7 @@ 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); @@ -147,7 +147,7 @@ gst_gl_window_cocoa_new (GstGLDisplay * display) /* 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 */ diff --git a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c index 80827b97ed..4af4ec693d 100644 --- a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c +++ b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.c @@ -44,7 +44,7 @@ #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); @@ -114,7 +114,7 @@ gst_gl_window_dispmanx_egl_new (GstGLDisplay * display) 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 diff --git a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h index 5680f07695..34f1964be0 100644 --- a/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h +++ b/gst-libs/gst/gl/dispmanx/gstglwindow_dispmanx_egl.h @@ -44,12 +44,12 @@ 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; diff --git a/gst-libs/gst/gl/eagl/gstglcontext_eagl.h b/gst-libs/gst/gl/eagl/gstglcontext_eagl.h index 262281029c..cdfa10f5dc 100644 --- a/gst-libs/gst/gl/eagl/gstglcontext_eagl.h +++ b/gst-libs/gst/gl/eagl/gstglcontext_eagl.h @@ -26,12 +26,12 @@ 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; diff --git a/gst-libs/gst/gl/eagl/gstglcontext_eagl.m b/gst-libs/gst/gl/eagl/gstglcontext_eagl.m index ecadc3f70c..5eb9a29f62 100644 --- a/gst-libs/gst/gl/eagl/gstglcontext_eagl.m +++ b/gst-libs/gst/gl/eagl/gstglcontext_eagl.m @@ -56,9 +56,9 @@ struct _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) @@ -97,7 +97,7 @@ GstGLContextEagl * 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 diff --git a/gst-libs/gst/gl/eagl/gstglwindow_eagl.h b/gst-libs/gst/gl/eagl/gstglwindow_eagl.h index 001c97c926..f42296aa1b 100644 --- a/gst-libs/gst/gl/eagl/gstglwindow_eagl.h +++ b/gst-libs/gst/gl/eagl/gstglwindow_eagl.h @@ -26,12 +26,12 @@ 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; diff --git a/gst-libs/gst/gl/eagl/gstglwindow_eagl.m b/gst-libs/gst/gl/eagl/gstglwindow_eagl.m index 72ab1abb53..7306120fd9 100644 --- a/gst-libs/gst/gl/eagl/gstglwindow_eagl.m +++ b/gst-libs/gst/gl/eagl/gstglwindow_eagl.m @@ -30,7 +30,7 @@ #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); @@ -39,7 +39,7 @@ 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); @@ -104,7 +104,7 @@ GstGLWindowEagl * 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 diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c index 057c6a9ba2..c46693fe7e 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -65,7 +65,7 @@ static GstGLPlatform gst_gl_context_egl_get_gl_platform (GstGLContext * 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) @@ -106,7 +106,7 @@ gst_gl_context_egl_new (GstGLDisplay * display) { /* 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 * @@ -620,7 +620,7 @@ gst_gl_context_egl_create_context (GstGLContext * context, } egl->egl_major = egl_major; egl->egl_minor = egl_minor; - + if (window) gst_object_unref (window); @@ -823,12 +823,13 @@ gst_gl_context_egl_check_feature (GstGLContext * context, const gchar * feature) 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; diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.h b/gst-libs/gst/gl/egl/gstglcontext_egl.h index 69b750abe2..728689a0f1 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.h +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.h @@ -31,12 +31,16 @@ typedef struct _GstGLContextEGL GstGLContextEGL; 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: diff --git a/gst-libs/gst/gl/gstglbasefilter.c b/gst-libs/gst/gl/gstglbasefilter.c index e6d973acd0..9984b6fa03 100644 --- a/gst-libs/gst/gl/gstglbasefilter.c +++ b/gst-libs/gst/gl/gstglbasefilter.c @@ -118,7 +118,7 @@ gst_gl_base_filter_class_init (GstGLBaseFilterClass * klass) 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; } @@ -200,7 +200,7 @@ _find_local_gl_context (GstGLBaseFilter * filter) 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); } } @@ -209,7 +209,7 @@ _find_local_gl_context (GstGLBaseFilter * filter) 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); } } @@ -267,7 +267,7 @@ gst_gl_base_filter_query (GstBaseTransform * trans, GstPadDirection direction, 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); diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index e68de9aa3e..f3b397a6bd 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -186,7 +186,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_debug); 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); @@ -229,16 +229,16 @@ typedef struct 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) @@ -394,7 +394,7 @@ gst_gl_context_new_wrapped (GstGLDisplay * display, guintptr handle, 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 */ diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h index 13db75e577..89211b9f16 100644 --- a/gst-libs/gst/gl/gstglcontext.h +++ b/gst-libs/gst/gl/gstglcontext.h @@ -27,18 +27,22 @@ 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: diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index d6849a737f..061f0032b2 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -123,7 +123,7 @@ gst_gl_display_class_init (GstGLDisplayClass * klass) 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; diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c index c16130800d..ba10563c39 100644 --- a/gst-libs/gst/gl/gstglshader.c +++ b/gst-libs/gst/gl/gstglshader.c @@ -38,7 +38,7 @@ #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)) @@ -233,7 +233,7 @@ _new_with_stages_va_list (GstGLContext * context, GError ** error, 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 *))) { diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h index 96ad48b61c..cce614dec6 100644 --- a/gst-libs/gst/gl/gstglshader.h +++ b/gst-libs/gst/gl/gstglshader.h @@ -28,12 +28,16 @@ G_BEGIN_DECLS 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 { diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index bfa5f22511..f26fc88f09 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -862,7 +862,7 @@ _upload_meta_upload_propose_allocation (gpointer impl, GstQuery * decide_query, 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, diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c index b18b803de8..d69b179453 100644 --- a/gst-libs/gst/gl/gstglutils.c +++ b/gst-libs/gst/gl/gstglutils.c @@ -398,7 +398,7 @@ gst_gl_handle_set_context (GstElement * element, GstContext * context, 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; @@ -528,7 +528,7 @@ gst_gl_handle_context_query (GstElement * element, GstQuery * query, 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); diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c index 0588f1d65b..ba7981db3e 100644 --- a/gst-libs/gst/gl/gstglwindow.c +++ b/gst-libs/gst/gl/gstglwindow.c @@ -75,7 +75,7 @@ GST_DEBUG_CATEGORY (GST_CAT_DEFAULT); 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); @@ -910,7 +910,7 @@ gst_gl_window_get_surface_dimensions (GstGLWindow * window, guint * width, 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) diff --git a/gst-libs/gst/gl/gstglwindow.h b/gst-libs/gst/gl/gstglwindow.h index a5cc5b4b02..793314a1f5 100644 --- a/gst-libs/gst/gl/gstglwindow.h +++ b/gst-libs/gst/gl/gstglwindow.h @@ -30,17 +30,25 @@ 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 ()) /** @@ -147,11 +155,6 @@ struct _GstGLWindowClass { gpointer _reserved[GST_PADDING]; }; -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); diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c index 6e1f0c5b89..5d2efc956a 100644 --- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c @@ -41,7 +41,7 @@ const gchar *WlEGLErrorString (); #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); @@ -360,7 +360,7 @@ gst_gl_window_wayland_egl_new (GstGLDisplay * display) 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 diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h index a88955ff22..16a0543ea3 100644 --- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h +++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h @@ -29,12 +29,12 @@ 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; diff --git a/gst-libs/gst/gl/win32/gstglcontext_wgl.c b/gst-libs/gst/gl/win32/gstglcontext_wgl.c index 0961e404ba..53ebb8092d 100644 --- a/gst-libs/gst/gl/win32/gstglcontext_wgl.c +++ b/gst-libs/gst/gl/win32/gstglcontext_wgl.c @@ -43,9 +43,9 @@ struct _GstGLContextWGLPrivate #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); @@ -103,7 +103,7 @@ gst_gl_context_wgl_new (GstGLDisplay * display) /* 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 diff --git a/gst-libs/gst/gl/win32/gstglcontext_wgl.h b/gst-libs/gst/gl/win32/gstglcontext_wgl.h index 2458de89d1..f44db50d34 100644 --- a/gst-libs/gst/gl/win32/gstglcontext_wgl.h +++ b/gst-libs/gst/gl/win32/gstglcontext_wgl.h @@ -25,12 +25,12 @@ 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; diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.c b/gst-libs/gst/gl/win32/gstglwindow_win32.c index 2c919cd6a6..c306a6b064 100644 --- a/gst-libs/gst/gl/win32/gstglwindow_win32.c +++ b/gst-libs/gst/gl/win32/gstglwindow_win32.c @@ -32,7 +32,7 @@ LRESULT FAR PASCAL sub_class_proc (HWND hWnd, UINT uMsg, WPARAM wParam, 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 { @@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); 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); @@ -98,7 +98,7 @@ gst_gl_window_win32_new (GstGLDisplay * display) /* 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 diff --git a/gst-libs/gst/gl/win32/gstglwindow_win32.h b/gst-libs/gst/gl/win32/gstglwindow_win32.h index c17b492670..8a6ca68248 100644 --- a/gst-libs/gst/gl/win32/gstglwindow_win32.h +++ b/gst-libs/gst/gl/win32/gstglwindow_win32.h @@ -29,12 +29,12 @@ 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; diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.c b/gst-libs/gst/gl/x11/gstglcontext_glx.c index bc83230a84..1f18495444 100644 --- a/gst-libs/gst/gl/x11/gstglcontext_glx.c +++ b/gst-libs/gst/gl/x11/gstglcontext_glx.c @@ -41,10 +41,10 @@ #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); @@ -112,7 +112,7 @@ gst_gl_context_glx_new (GstGLDisplay * display) /* 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 diff --git a/gst-libs/gst/gl/x11/gstglcontext_glx.h b/gst-libs/gst/gl/x11/gstglcontext_glx.h index f95204ab66..8b7f0dedcd 100644 --- a/gst-libs/gst/gl/x11/gstglcontext_glx.h +++ b/gst-libs/gst/gl/x11/gstglcontext_glx.h @@ -27,12 +27,17 @@ 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; @@ -57,8 +62,6 @@ struct _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); diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c index d08b757dca..b17a918530 100644 --- a/gst-libs/gst/gl/x11/gstglwindow_x11.c +++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c @@ -35,12 +35,12 @@ #include #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; @@ -130,7 +130,7 @@ gst_gl_window_x11_new (GstGLDisplay * display) return NULL; } - return g_object_new (GST_GL_TYPE_WINDOW_X11, NULL); + return g_object_new (GST_TYPE_GL_WINDOW_X11, NULL); } gboolean diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.h b/gst-libs/gst/gl/x11/gstglwindow_x11.h index b4a4b17ac3..77092ba60b 100644 --- a/gst-libs/gst/gl/x11/gstglwindow_x11.h +++ b/gst-libs/gst/gl/x11/gstglwindow_x11.h @@ -28,12 +28,13 @@ 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; @@ -92,8 +93,6 @@ struct _GstGLWindowX11Class { 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); diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index bd772b739d..715df464ad 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -2428,7 +2428,7 @@ gst_amc_video_dec_src_query (GstVideoDecoder * bdec, GstQuery * query) 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); @@ -2487,7 +2487,7 @@ _find_local_gl_context (GstAmcVideoDec * self) 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); } } diff --git a/sys/applemedia/glcontexthelper.c b/sys/applemedia/glcontexthelper.c index 4e6f6175ea..044f042344 100644 --- a/sys/applemedia/glcontexthelper.c +++ b/sys/applemedia/glcontexthelper.c @@ -34,14 +34,14 @@ _find_local_gl_context (GstGLContextHelper * ctxh) 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); } } diff --git a/tests/examples/gl/qt/qglwtextureshare/pipeline.cpp b/tests/examples/gl/qt/qglwtextureshare/pipeline.cpp index 9a8d583d49..1cff8a4f63 100644 --- a/tests/examples/gl/qt/qglwtextureshare/pipeline.cpp +++ b/tests/examples/gl/qt/qglwtextureshare/pipeline.cpp @@ -218,7 +218,7 @@ gboolean Pipeline::sync_bus_call (GstBus * bus, GstMessage * msg, Pipeline * p) } 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; diff --git a/tests/examples/gl/sdl/sdlshare.c b/tests/examples/gl/sdl/sdlshare.c index 40f0af6e71..4cbac26158 100644 --- a/tests/examples/gl/sdl/sdlshare.c +++ b/tests/examples/gl/sdl/sdlshare.c @@ -251,7 +251,7 @@ sync_bus_call (GstBus * bus, GstMessage * msg, gpointer data) } 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; diff --git a/tests/examples/gl/sdl/sdlshare2.c b/tests/examples/gl/sdl/sdlshare2.c index ce5792ab3e..b616a8797e 100644 --- a/tests/examples/gl/sdl/sdlshare2.c +++ b/tests/examples/gl/sdl/sdlshare2.c @@ -251,7 +251,7 @@ sync_bus_call (GstBus * bus, GstMessage * msg, gpointer data) } 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;