mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
gl: GST_GL_TYPE -> GST_TYPE_GL
Some deprecated symbols are kept for backwards compatibility
This commit is contained in:
parent
0dc003bf30
commit
41a6448918
50 changed files with 235 additions and 214 deletions
|
@ -847,7 +847,7 @@ GST_GL_COLOR_CONVERT_CLASS
|
||||||
gst_gl_color_convert_get_type
|
gst_gl_color_convert_get_type
|
||||||
GST_IS_GL_COLOR_CONVERT
|
GST_IS_GL_COLOR_CONVERT
|
||||||
GST_IS_GL_COLOR_CONVERT_CLASS
|
GST_IS_GL_COLOR_CONVERT_CLASS
|
||||||
GST_GL_TYPE_COLOR_CONVERT
|
GST_TYPE_GL_COLOR_CONVERT
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
|
@ -887,7 +887,7 @@ gst_gl_context_get_current
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_GL_CONTEXT
|
GST_GL_CONTEXT
|
||||||
GST_IS_GL_CONTEXT
|
GST_IS_GL_CONTEXT
|
||||||
GST_GL_TYPE_CONTEXT
|
GST_TYPE_GL_CONTEXT
|
||||||
GST_GL_CONTEXT_CLASS
|
GST_GL_CONTEXT_CLASS
|
||||||
GST_GL_CONTEXT_GET_CLASS
|
GST_GL_CONTEXT_GET_CLASS
|
||||||
GST_IS_GL_CONTEXT_CLASS
|
GST_IS_GL_CONTEXT_CLASS
|
||||||
|
@ -932,7 +932,7 @@ gst_gl_context_cocoa_get_pixel_format
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_GL_CONTEXT_COCOA
|
GST_GL_CONTEXT_COCOA
|
||||||
GST_IS_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_CLASS
|
||||||
GST_GL_CONTEXT_COCOA_GET_CLASS
|
GST_GL_CONTEXT_COCOA_GET_CLASS
|
||||||
GST_IS_GL_CONTEXT_COCOA_CLASS
|
GST_IS_GL_CONTEXT_COCOA_CLASS
|
||||||
|
@ -954,7 +954,7 @@ gst_gl_context_egl_get_error_string
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_GL_CONTEXT_EGL
|
GST_GL_CONTEXT_EGL
|
||||||
GST_IS_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_CLASS
|
||||||
GST_GL_CONTEXT_EGL_GET_CLASS
|
GST_GL_CONTEXT_EGL_GET_CLASS
|
||||||
GST_IS_GL_CONTEXT_EGL_CLASS
|
GST_IS_GL_CONTEXT_EGL_CLASS
|
||||||
|
@ -973,7 +973,7 @@ gst_gl_context_glx_get_proc_address
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_GL_CONTEXT_GLX
|
GST_GL_CONTEXT_GLX
|
||||||
GST_IS_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_CLASS
|
||||||
GST_GL_CONTEXT_GLX_GET_CLASS
|
GST_GL_CONTEXT_GLX_GET_CLASS
|
||||||
GST_IS_GL_CONTEXT_GLX_CLASS
|
GST_IS_GL_CONTEXT_GLX_CLASS
|
||||||
|
@ -992,7 +992,7 @@ gst_gl_context_wgl_get_proc_address
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_GL_CONTEXT_WGL
|
GST_GL_CONTEXT_WGL
|
||||||
GST_IS_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_CLASS
|
||||||
GST_GL_CONTEXT_WGL_GET_CLASS
|
GST_GL_CONTEXT_WGL_GET_CLASS
|
||||||
GST_IS_GL_CONTEXT_WGL_CLASS
|
GST_IS_GL_CONTEXT_WGL_CLASS
|
||||||
|
@ -1010,7 +1010,7 @@ gst_gl_context_eagl_get_current_context
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_GL_CONTEXT_EAGL
|
GST_GL_CONTEXT_EAGL
|
||||||
GST_IS_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_CLASS
|
||||||
GST_GL_CONTEXT_EAGL_GET_CLASS
|
GST_GL_CONTEXT_EAGL_GET_CLASS
|
||||||
GST_IS_GL_CONTEXT_EAGL_CLASS
|
GST_IS_GL_CONTEXT_EAGL_CLASS
|
||||||
|
@ -1468,7 +1468,7 @@ gst_gl_shader_string_vertex_mat4_vertex_transform
|
||||||
GstGLShaderPrivate
|
GstGLShaderPrivate
|
||||||
GST_GL_SHADER
|
GST_GL_SHADER
|
||||||
GST_IS_GL_SHADER
|
GST_IS_GL_SHADER
|
||||||
GST_GL_TYPE_SHADER
|
GST_TYPE_GL_SHADER
|
||||||
gst_gl_shader_get_type
|
gst_gl_shader_get_type
|
||||||
GST_GL_SHADER_CLASS
|
GST_GL_SHADER_CLASS
|
||||||
GST_IS_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_gl_stereo_downmix_mode_get_type
|
||||||
GST_IS_GL_VIEW_CONVERT
|
GST_IS_GL_VIEW_CONVERT
|
||||||
GST_IS_GL_VIEW_CONVERT_CLASS
|
GST_IS_GL_VIEW_CONVERT_CLASS
|
||||||
GST_GL_TYPE_VIEW_CONVERT
|
GST_TYPE_GL_VIEW_CONVERT
|
||||||
GST_GL_VIEW_CONVERT
|
GST_GL_VIEW_CONVERT
|
||||||
GST_GL_VIEW_CONVERT_CLASS
|
GST_GL_VIEW_CONVERT_CLASS
|
||||||
GST_GL_VIEW_CONVERT_GET_CLASS
|
GST_GL_VIEW_CONVERT_GET_CLASS
|
||||||
|
@ -1647,7 +1647,7 @@ gst_gl_window_set_render_rectangle
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW
|
GST_IS_GL_WINDOW
|
||||||
GST_IS_GL_WINDOW_CLASS
|
GST_IS_GL_WINDOW_CLASS
|
||||||
GST_GL_TYPE_WINDOW
|
GST_TYPE_GL_WINDOW
|
||||||
GST_GL_WINDOW
|
GST_GL_WINDOW
|
||||||
GST_GL_WINDOW_CLASS
|
GST_GL_WINDOW_CLASS
|
||||||
GST_GL_WINDOW_GET_CLASS
|
GST_GL_WINDOW_GET_CLASS
|
||||||
|
@ -1674,7 +1674,7 @@ gst_gl_window_android_egl_new
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW_ANDROID_EGL
|
GST_IS_GL_WINDOW_ANDROID_EGL
|
||||||
GST_IS_GL_WINDOW_ANDROID_EGL_CLASS
|
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
|
||||||
GST_GL_WINDOW_ANDROID_EGL_CLASS
|
GST_GL_WINDOW_ANDROID_EGL_CLASS
|
||||||
GST_GL_WINDOW_ANDROID_EGL_GET_CLASS
|
GST_GL_WINDOW_ANDROID_EGL_GET_CLASS
|
||||||
|
@ -1691,7 +1691,7 @@ gst_gl_window_cocoa_create_window
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW_COCOA
|
GST_IS_GL_WINDOW_COCOA
|
||||||
GST_IS_GL_WINDOW_COCOA_CLASS
|
GST_IS_GL_WINDOW_COCOA_CLASS
|
||||||
GST_GL_TYPE_WINDOW_COCOA
|
GST_TYPE_GL_WINDOW_COCOA
|
||||||
GST_GL_WINDOW_COCOA
|
GST_GL_WINDOW_COCOA
|
||||||
GST_GL_WINDOW_COCOA_CLASS
|
GST_GL_WINDOW_COCOA_CLASS
|
||||||
GST_GL_WINDOW_COCOA_GET_CLASS
|
GST_GL_WINDOW_COCOA_GET_CLASS
|
||||||
|
@ -1710,7 +1710,7 @@ gst_gl_window_dispmanx_egl_new
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW_DISPMANX_EGL
|
GST_IS_GL_WINDOW_DISPMANX_EGL
|
||||||
GST_IS_GL_WINDOW_DISPMANX_EGL_CLASS
|
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
|
||||||
GST_GL_WINDOW_DISPMANX_EGL_CLASS
|
GST_GL_WINDOW_DISPMANX_EGL_CLASS
|
||||||
GST_GL_WINDOW_DISPMANX_EGL_GET_CLASS
|
GST_GL_WINDOW_DISPMANX_EGL_GET_CLASS
|
||||||
|
@ -1745,7 +1745,7 @@ gst_gl_window_wayland_egl_new
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW_WAYLAND_EGL
|
GST_IS_GL_WINDOW_WAYLAND_EGL
|
||||||
GST_IS_GL_WINDOW_WAYLAND_EGL_CLASS
|
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
|
||||||
GST_GL_WINDOW_WAYLAND_EGL_CLASS
|
GST_GL_WINDOW_WAYLAND_EGL_CLASS
|
||||||
GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS
|
GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS
|
||||||
|
@ -1765,7 +1765,7 @@ gst_gl_window_win32_create_window
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW_WIN32
|
GST_IS_GL_WINDOW_WIN32
|
||||||
GST_IS_GL_WINDOW_WIN32_CLASS
|
GST_IS_GL_WINDOW_WIN32_CLASS
|
||||||
GST_GL_TYPE_WINDOW_WIN32
|
GST_TYPE_GL_WINDOW_WIN32
|
||||||
GST_GL_WINDOW_WIN32
|
GST_GL_WINDOW_WIN32
|
||||||
GST_GL_WINDOW_WIN32_CLASS
|
GST_GL_WINDOW_WIN32_CLASS
|
||||||
GST_GL_WINDOW_WIN32_GET_CLASS
|
GST_GL_WINDOW_WIN32_GET_CLASS
|
||||||
|
@ -1785,7 +1785,7 @@ gst_gl_window_x11_untrap_x_errors
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_IS_GL_WINDOW_X11
|
GST_IS_GL_WINDOW_X11
|
||||||
GST_IS_GL_WINDOW_X11_CLASS
|
GST_IS_GL_WINDOW_X11_CLASS
|
||||||
GST_GL_TYPE_WINDOW_X11
|
GST_TYPE_GL_WINDOW_X11
|
||||||
GST_GL_WINDOW_X11
|
GST_GL_WINDOW_X11
|
||||||
GST_GL_WINDOW_X11_CLASS
|
GST_GL_WINDOW_X11_CLASS
|
||||||
GST_GL_WINDOW_X11_GET_CLASS
|
GST_GL_WINDOW_X11_GET_CLASS
|
||||||
|
|
|
@ -216,7 +216,7 @@ gst_ca_opengl_layer_sink_class_init (GstCAOpenGLLayerSinkClass * klass)
|
||||||
g_param_spec_object ("context",
|
g_param_spec_object ("context",
|
||||||
"OpenGL context",
|
"OpenGL context",
|
||||||
"Get 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_object_class_install_property (gobject_class, PROP_LAYER,
|
||||||
g_param_spec_pointer ("layer", "CAOpenGLLayer",
|
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);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
ca_sink->context, NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -157,7 +157,7 @@ _find_local_gl_context (GstGLBaseMixer * mix)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ _find_local_gl_context (GstGLBaseMixer * mix)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ gst_gl_base_mixer_sink_query (GstAggregator * agg, GstAggregatorPad * bpad,
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
@ -416,7 +416,7 @@ gst_gl_base_mixer_class_init (GstGLBaseMixerClass * klass)
|
||||||
g_param_spec_object ("context",
|
g_param_spec_object ("context",
|
||||||
"OpenGL context",
|
"OpenGL context",
|
||||||
"Get 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 */
|
/* Register the pad class */
|
||||||
g_type_class_ref (GST_TYPE_GL_BASE_MIXER_PAD);
|
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);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -101,7 +101,7 @@ gst_gl_filtershader_class_init (GstGLFilterShaderClass * klass)
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SHADER,
|
g_object_class_install_property (gobject_class, PROP_SHADER,
|
||||||
g_param_spec_object ("shader", "Shader object",
|
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_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_VERTEX,
|
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] =
|
gst_gl_shader_signals[SIGNAL_CREATE_SHADER] =
|
||||||
g_signal_new ("create-shader", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("create-shader", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
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,
|
gst_element_class_set_metadata (element_class,
|
||||||
"OpenGL fragment shader filter", "Filter/Effect",
|
"OpenGL fragment shader filter", "Filter/Effect",
|
||||||
|
|
|
@ -255,7 +255,7 @@ gst_gl_image_sink_bin_class_init (GstGLImageSinkBinClass * klass)
|
||||||
DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
g_object_class_install_property (gobject_class, PROP_BIN_CONTEXT,
|
g_object_class_install_property (gobject_class, PROP_BIN_CONTEXT,
|
||||||
g_param_spec_object ("context", "OpenGL context", "Get OpenGL 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,
|
g_object_class_install_property (gobject_class, PROP_BIN_PIXEL_ASPECT_RATIO,
|
||||||
gst_param_spec_fraction ("pixel-aspect-ratio", "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,
|
"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] =
|
gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_DRAW] =
|
||||||
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
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,
|
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] =
|
gst_gl_image_sink_bin_signals[SIGNAL_BIN_CLIENT_RESHAPE] =
|
||||||
g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
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) \
|
#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_object_class_install_property (gobject_class, PROP_CONTEXT,
|
||||||
g_param_spec_object ("context", "OpenGL context", "Get OpenGL 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_object_class_install_property (gobject_class, PROP_HANDLE_EVENTS,
|
||||||
g_param_spec_boolean ("handle-events", "Handle XEvents",
|
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] =
|
gst_glimage_sink_signals[CLIENT_DRAW_SIGNAL] =
|
||||||
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("client-draw", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
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:
|
* GstGLImageSink::client-reshape:
|
||||||
|
@ -733,7 +733,7 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
|
||||||
gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL] =
|
gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL] =
|
||||||
g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("client-reshape", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
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_element_class_add_static_pad_template (element_class,
|
||||||
&gst_glimage_sink_template);
|
&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);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
glimage_sink->context, NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -427,7 +427,7 @@ _find_local_gl_context (GstGLStereoSplit * split)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ _find_local_gl_context (GstGLStereoSplit * split)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -647,7 +647,7 @@ stereosplit_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (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);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -347,7 +347,7 @@ gst_gl_test_src_query (GstBaseSrc * bsrc, GstQuery * query)
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
@ -596,7 +596,7 @@ _find_local_gl_context (GstGLTestSrc * src)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -605,7 +605,7 @@ _find_local_gl_context (GstGLTestSrc * src)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#define GST_CAT_DEFAULT gst_gl_video_mixer_debug
|
#define GST_CAT_DEFAULT gst_gl_video_mixer_debug
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
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
|
static GType
|
||||||
gst_gl_video_mixer_background_get_type (void)
|
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_object_class_install_property (gobject_class, PROP_BIN_BACKGROUND,
|
||||||
g_param_spec_enum ("background", "Background", "Background type",
|
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));
|
DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
gst_element_class_set_metadata (element_class, "OpenGL video_mixer bin",
|
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_object_class_install_property (gobject_class, PROP_BACKGROUND,
|
||||||
g_param_spec_enum ("background", "Background", "Background type",
|
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));
|
DEFAULT_BACKGROUND, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_video_mixer_init_shader;
|
GST_GL_MIXER_CLASS (klass)->set_caps = gst_gl_video_mixer_init_shader;
|
||||||
|
|
|
@ -120,7 +120,7 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -262,7 +262,7 @@ gst_qt_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -310,7 +310,7 @@ gst_qt_src_query (GstBaseSrc * bsrc, GstQuery * query)
|
||||||
context = gst_context_new ("gst.gl.app_context", FALSE);
|
context = gst_context_new ("gst.gl.app_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
qt_src->qt_context, NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
@ -348,7 +348,7 @@ _find_local_gl_context (GstQtSrc * qt_src)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#define gst_gl_window_android_egl_parent_class parent_class
|
#define gst_gl_window_android_egl_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstGLWindowAndroidEGL, gst_gl_window_android_egl,
|
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_display (GstGLWindow * window);
|
||||||
static guintptr gst_gl_window_android_egl_get_window_handle (GstGLWindow *
|
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");
|
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
|
static void
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_ANDROID_EGL (gst_gl_window_android_egl_get_type())
|
#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_GL_TYPE_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL))
|
#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_GL_TYPE_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGLClass))
|
#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_GL_TYPE_WINDOW_ANDROID_EGL))
|
#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_GL_TYPE_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_GL_TYPE_WINDOW_ANDROID_EGL, GstGLWindowAndroidEGL_Class))
|
#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 _GstGLWindowAndroidEGL GstGLWindowAndroidEGL;
|
||||||
typedef struct _GstGLWindowAndroidEGLClass GstGLWindowAndroidEGLClass;
|
typedef struct _GstGLWindowAndroidEGLClass GstGLWindowAndroidEGLClass;
|
||||||
|
|
|
@ -27,12 +27,17 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_CONTEXT_COCOA (gst_gl_context_cocoa_get_type())
|
#define GST_TYPE_GL_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))
|
GType gst_gl_context_cocoa_get_type (void);
|
||||||
#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))
|
/* FIXME: remove this when moving to -base */
|
||||||
#define GST_IS_GL_CONTEXT_COCOA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_COCOA))
|
G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT_COCOA) \
|
||||||
#define GST_GL_CONTEXT_COCOA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_COCOA, GstGLContextCocoaClass))
|
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 _GstGLContextCocoa GstGLContextCocoa;
|
||||||
typedef struct _GstGLContextCocoaPrivate GstGLContextCocoaPrivate;
|
typedef struct _GstGLContextCocoaPrivate GstGLContextCocoaPrivate;
|
||||||
|
@ -58,8 +63,6 @@ struct _GstGLContextCocoaClass {
|
||||||
GstGLContextCocoaPrivate *priv;
|
GstGLContextCocoaPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_gl_context_cocoa_get_type (void);
|
|
||||||
|
|
||||||
GstGLContextCocoa * gst_gl_context_cocoa_new (GstGLDisplay * display);
|
GstGLContextCocoa * gst_gl_context_cocoa_new (GstGLDisplay * display);
|
||||||
guintptr gst_gl_context_cocoa_get_current_context (void);
|
guintptr gst_gl_context_cocoa_get_current_context (void);
|
||||||
CGLPixelFormatObj gst_gl_context_cocoa_get_pixel_format (GstGLContextCocoa *context);
|
CGLPixelFormatObj gst_gl_context_cocoa_get_pixel_format (GstGLContextCocoa *context);
|
||||||
|
|
|
@ -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);
|
static GstGLPlatform gst_gl_context_cocoa_get_gl_platform (GstGLContext * context);
|
||||||
|
|
||||||
#define GST_GL_CONTEXT_COCOA_GET_PRIVATE(o) \
|
#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);
|
GST_DEBUG_CATEGORY_STATIC (gst_gl_context_cocoa_debug);
|
||||||
#define GST_CAT_DEFAULT gst_gl_context_cocoa_debug
|
#define GST_CAT_DEFAULT gst_gl_context_cocoa_debug
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLContextCocoa, gst_gl_context_cocoa,
|
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
|
static void
|
||||||
gst_gl_context_cocoa_class_init (GstGLContextCocoaClass * klass)
|
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 */
|
/* we require an cocoa display to create CGL contexts */
|
||||||
return NULL;
|
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
|
struct pixel_attr
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_COCOA (gst_gl_window_cocoa_get_type())
|
#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_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoa))
|
#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_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoaClass))
|
#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_GL_TYPE_WINDOW_COCOA))
|
#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_GL_TYPE_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_GL_TYPE_WINDOW_COCOA, GstGLWindowCocoaClass))
|
#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 _GstGLWindowCocoa GstGLWindowCocoa;
|
||||||
typedef struct _GstGLWindowCocoaPrivate GstGLWindowCocoaPrivate;
|
typedef struct _GstGLWindowCocoaPrivate GstGLWindowCocoaPrivate;
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
/* =============================================================*/
|
/* =============================================================*/
|
||||||
|
|
||||||
#define GST_GL_WINDOW_COCOA_GET_PRIVATE(o) \
|
#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
|
#define GST_CAT_DEFAULT gst_gl_window_cocoa_debug
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||||
|
@ -64,7 +64,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||||
#define DEBUG_INIT \
|
#define DEBUG_INIT \
|
||||||
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
|
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
|
||||||
#define gst_gl_window_cocoa_parent_class parent_class
|
#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 void gst_gl_window_cocoa_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_gl_window_cocoa_open (GstGLWindow *window, GError **err);
|
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 */
|
/* we require an cocoa display to create CGL windows */
|
||||||
return NULL;
|
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 */
|
/* Must be called from the main thread */
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
#define gst_gl_window_dispmanx_egl_parent_class parent_class
|
#define gst_gl_window_dispmanx_egl_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstGLWindowDispmanxEGL, gst_gl_window_dispmanx_egl,
|
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 *
|
static guintptr gst_gl_window_dispmanx_egl_get_window_handle (GstGLWindow *
|
||||||
window);
|
window);
|
||||||
|
@ -114,7 +114,7 @@ gst_gl_window_dispmanx_egl_new (GstGLDisplay * display)
|
||||||
|
|
||||||
GST_DEBUG ("creating Dispmanx EGL 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
|
static void
|
||||||
|
|
|
@ -44,12 +44,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_DISPMANX_EGL (gst_gl_window_dispmanx_egl_get_type())
|
#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_GL_TYPE_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL))
|
#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_GL_TYPE_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGLClass))
|
#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_GL_TYPE_WINDOW_DISPMANX_EGL))
|
#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_GL_TYPE_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_GL_TYPE_WINDOW_DISPMANX_EGL, GstGLWindowDispmanxEGL_Class))
|
#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 _GstGLWindowDispmanxEGL GstGLWindowDispmanxEGL;
|
||||||
typedef struct _GstGLWindowDispmanxEGLClass GstGLWindowDispmanxEGLClass;
|
typedef struct _GstGLWindowDispmanxEGLClass GstGLWindowDispmanxEGLClass;
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_CONTEXT_EAGL (gst_gl_context_eagl_get_type())
|
#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_GL_TYPE_CONTEXT_EAGL, GstGLContextEagl))
|
#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_GL_TYPE_CONTEXT_EAGL, GstGLContextEaglClass))
|
#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_GL_TYPE_CONTEXT_EAGL))
|
#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_GL_TYPE_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_GL_TYPE_CONTEXT_EAGL, GstGLContextEaglClass))
|
#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 _GstGLContextEagl GstGLContextEagl;
|
||||||
typedef struct _GstGLContextEaglPrivate GstGLContextEaglPrivate;
|
typedef struct _GstGLContextEaglPrivate GstGLContextEaglPrivate;
|
||||||
|
|
|
@ -56,9 +56,9 @@ struct _GstGLContextEaglPrivate
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_GL_CONTEXT_EAGL_GET_PRIVATE(o) \
|
#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
|
static void
|
||||||
gst_gl_context_eagl_class_init (GstGLContextEaglClass * klass)
|
gst_gl_context_eagl_class_init (GstGLContextEaglClass * klass)
|
||||||
|
@ -97,7 +97,7 @@ GstGLContextEagl *
|
||||||
gst_gl_context_eagl_new (GstGLDisplay * display)
|
gst_gl_context_eagl_new (GstGLDisplay * display)
|
||||||
{
|
{
|
||||||
/* there isn't actually a display type for eagl yet? */
|
/* 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
|
void
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_EAGL (gst_gl_window_eagl_get_type())
|
#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_GL_TYPE_WINDOW_EAGL, GstGLWindowEagl))
|
#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_GL_TYPE_WINDOW_EAGL, GstGLWindowEaglClass))
|
#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_GL_TYPE_WINDOW_EAGL))
|
#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_GL_TYPE_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_GL_TYPE_WINDOW_EAGL, GstGLWindowEaglClass))
|
#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 _GstGLWindowEagl GstGLWindowEagl;
|
||||||
typedef struct _GstGLWindowEaglPrivate GstGLWindowEaglPrivate;
|
typedef struct _GstGLWindowEaglPrivate GstGLWindowEaglPrivate;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "gstglcontext_eagl.h"
|
#include "gstglcontext_eagl.h"
|
||||||
|
|
||||||
#define GST_GL_WINDOW_EAGL_GET_PRIVATE(o) \
|
#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
|
#define GST_CAT_DEFAULT gst_gl_window_eagl_debug
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
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");
|
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
|
||||||
#define gst_gl_window_eagl_parent_class parent_class
|
#define gst_gl_window_eagl_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLWindowEagl, gst_gl_window_eagl,
|
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 void gst_gl_window_eagl_finalize (GObject * object);
|
||||||
|
|
||||||
static guintptr gst_gl_window_eagl_get_display (GstGLWindow * window);
|
static guintptr gst_gl_window_eagl_get_display (GstGLWindow * window);
|
||||||
|
@ -104,7 +104,7 @@ GstGLWindowEagl *
|
||||||
gst_gl_window_eagl_new (GstGLDisplay * display)
|
gst_gl_window_eagl_new (GstGLDisplay * display)
|
||||||
{
|
{
|
||||||
/* there isn't an eagl display type */
|
/* 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 guintptr
|
||||||
|
|
|
@ -65,7 +65,7 @@ static GstGLPlatform gst_gl_context_egl_get_gl_platform (GstGLContext *
|
||||||
static gboolean gst_gl_context_egl_check_feature (GstGLContext * context,
|
static gboolean gst_gl_context_egl_check_feature (GstGLContext * context,
|
||||||
const gchar * feature);
|
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
|
static void
|
||||||
gst_gl_context_egl_class_init (GstGLContextEGLClass * klass)
|
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
|
/* XXX: display type could theoretically be anything, as long as
|
||||||
* eglGetDisplay supports it. */
|
* 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 *
|
const gchar *
|
||||||
|
@ -823,9 +823,10 @@ gst_gl_context_egl_check_feature (GstGLContext * context, const gchar * feature)
|
||||||
GstGLContextEGL *context_egl = GST_GL_CONTEXT_EGL (context);
|
GstGLContextEGL *context_egl = GST_GL_CONTEXT_EGL (context);
|
||||||
|
|
||||||
if (g_strcmp0 (feature, "EGL_KHR_image_base") == 0) {
|
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))
|
if (GST_GL_CHECK_GL_VERSION (context_egl->egl_major, context_egl->egl_minor,
|
||||||
return context_egl->eglCreateImage != NULL &&
|
1, 5))
|
||||||
context_egl->eglDestroyImage != NULL;
|
return context_egl->eglCreateImage != NULL
|
||||||
|
&& context_egl->eglDestroyImage != NULL;
|
||||||
else
|
else
|
||||||
return context_egl->eglCreateImageKHR != NULL &&
|
return context_egl->eglCreateImageKHR != NULL &&
|
||||||
context_egl->eglDestroyImage != NULL;
|
context_egl->eglDestroyImage != NULL;
|
||||||
|
|
|
@ -31,12 +31,16 @@ typedef struct _GstGLContextEGL GstGLContextEGL;
|
||||||
typedef struct _GstGLContextEGLClass GstGLContextEGLClass;
|
typedef struct _GstGLContextEGLClass GstGLContextEGLClass;
|
||||||
|
|
||||||
GType gst_gl_context_egl_get_type (void);
|
GType gst_gl_context_egl_get_type (void);
|
||||||
#define GST_GL_TYPE_CONTEXT_EGL (gst_gl_context_egl_get_type())
|
#define GST_TYPE_GL_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))
|
/* FIXME: remove this when moving to -base */
|
||||||
#define GST_IS_GL_CONTEXT_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT_EGL))
|
G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT_EGL) \
|
||||||
#define GST_IS_GL_CONTEXT_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_EGL))
|
static inline GType GST_GL_TYPE_CONTEXT_EGL (void) { return GST_TYPE_GL_CONTEXT_EGL; }
|
||||||
#define GST_GL_CONTEXT_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_EGL, GstGLContextEGLClass))
|
#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:
|
* GstGLContextEGL:
|
||||||
|
|
|
@ -118,7 +118,7 @@ gst_gl_base_filter_class_init (GstGLBaseFilterClass * klass)
|
||||||
g_param_spec_object ("context",
|
g_param_spec_object ("context",
|
||||||
"OpenGL context",
|
"OpenGL context",
|
||||||
"Get 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;
|
klass->supported_gl_api = GST_GL_API_ANY;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ _find_local_gl_context (GstGLBaseFilter * filter)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ _find_local_gl_context (GstGLBaseFilter * filter)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ gst_gl_base_filter_query (GstBaseTransform * trans, GstPadDirection direction,
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
|
@ -186,7 +186,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_debug);
|
||||||
G_DEFINE_ABSTRACT_TYPE (GstGLContext, gst_gl_context, GST_TYPE_OBJECT);
|
G_DEFINE_ABSTRACT_TYPE (GstGLContext, gst_gl_context, GST_TYPE_OBJECT);
|
||||||
|
|
||||||
#define GST_GL_CONTEXT_GET_PRIVATE(o) \
|
#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);
|
static void _init_debug (void);
|
||||||
|
|
||||||
|
@ -229,16 +229,16 @@ typedef struct
|
||||||
GstGLContextClass parent;
|
GstGLContextClass parent;
|
||||||
} GstGLWrappedContextClass;
|
} 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);
|
GType gst_gl_wrapped_context_get_type (void);
|
||||||
G_DEFINE_TYPE (GstGLWrappedContext, gst_gl_wrapped_context,
|
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(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_GL_TYPE_CONTEXT, GstGLContextClass))
|
#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_GL_TYPE_WRAPPED_CONTEXT))
|
#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_GL_TYPE_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_GL_TYPE_WRAPPED_CONTEXT, GstGLWrappedContextClass))
|
#define GST_GL_WRAPPED_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WRAPPED_CONTEXT, GstGLWrappedContextClass))
|
||||||
|
|
||||||
GQuark
|
GQuark
|
||||||
gst_gl_context_error_quark (void)
|
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,
|
g_return_val_if_fail ((display_api & available_apis) != GST_GL_API_NONE,
|
||||||
NULL);
|
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) {
|
if (!context_wrap) {
|
||||||
/* subclass returned a NULL context */
|
/* subclass returned a NULL context */
|
||||||
|
|
|
@ -27,18 +27,22 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
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
|
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
|
GST_EXPORT
|
||||||
GQuark gst_gl_context_error_quark (void);
|
GQuark gst_gl_context_error_quark (void);
|
||||||
|
#define GST_GL_CONTEXT_ERROR (gst_gl_context_error_quark ())
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstGLContextThreadFunc:
|
* GstGLContextThreadFunc:
|
||||||
|
|
|
@ -123,7 +123,7 @@ gst_gl_display_class_init (GstGLDisplayClass * klass)
|
||||||
gst_gl_display_signals[CREATE_CONTEXT] =
|
gst_gl_display_signals[CREATE_CONTEXT] =
|
||||||
g_signal_new ("create-context", G_TYPE_FROM_CLASS (klass),
|
g_signal_new ("create-context", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
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;
|
klass->get_handle = gst_gl_display_default_get_handle;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GST_GL_SHADER_GET_PRIVATE(o) \
|
#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_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))
|
#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);
|
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);
|
shader->context = gst_object_ref (context);
|
||||||
|
|
||||||
while ((stage = va_arg (varargs, GstGLSLStage *))) {
|
while ((stage = va_arg (varargs, GstGLSLStage *))) {
|
||||||
|
|
|
@ -28,12 +28,16 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
GST_EXPORT
|
GST_EXPORT
|
||||||
GType gst_gl_shader_get_type (void);
|
GType gst_gl_shader_get_type (void);
|
||||||
#define GST_GL_TYPE_SHADER (gst_gl_shader_get_type())
|
#define GST_TYPE_GL_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))
|
/* FIXME: remove this when moving to -base */
|
||||||
#define GST_IS_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_SHADER))
|
G_DEPRECATED_FOR(GST_TYPE_GL_SHADER) \
|
||||||
#define GST_IS_GL_SHADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_SHADER))
|
static inline GType GST_GL_TYPE_SHADER (void) { return GST_TYPE_GL_SHADER; }
|
||||||
#define GST_GL_SHADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_SHADER, GstGLShaderClass))
|
#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
|
struct _GstGLShader
|
||||||
{
|
{
|
||||||
|
|
|
@ -862,7 +862,7 @@ _upload_meta_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
|
||||||
|
|
||||||
gl_context =
|
gl_context =
|
||||||
gst_structure_new ("GstVideoGLTextureUploadMeta", "gst.gl.GstGLContext",
|
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,
|
G_TYPE_POINTER, handle, "gst.gl.context.type", G_TYPE_STRING, platform,
|
||||||
"gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
|
"gst.gl.context.apis", G_TYPE_STRING, gl_apis, NULL);
|
||||||
gst_query_add_allocation_meta (query,
|
gst_query_add_allocation_meta (query,
|
||||||
|
|
|
@ -398,7 +398,7 @@ gst_gl_handle_set_context (GstElement * element, GstContext * context,
|
||||||
GstGLDisplay *context_display;
|
GstGLDisplay *context_display;
|
||||||
GstGLDisplay *element_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_replacement, NULL)) {
|
||||||
context_display = gst_gl_context_get_display (context_replacement);
|
context_display = gst_gl_context_get_display (context_replacement);
|
||||||
element_display = display_replacement ? display_replacement : *display;
|
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);
|
context = gst_context_new ("gst.gl.app_context", TRUE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
|
||||||
G_DEFINE_ABSTRACT_TYPE (GstGLWindow, gst_gl_window, GST_TYPE_OBJECT);
|
G_DEFINE_ABSTRACT_TYPE (GstGLWindow, gst_gl_window, GST_TYPE_OBJECT);
|
||||||
|
|
||||||
#define GST_GL_WINDOW_GET_PRIVATE(o) \
|
#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_draw (GstGLWindow * window);
|
||||||
static void gst_gl_window_default_run (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);
|
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
|
static gboolean
|
||||||
gst_gl_window_navigation_started (gpointer data)
|
gst_gl_window_navigation_started (gpointer data)
|
||||||
|
|
|
@ -30,17 +30,25 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW (gst_gl_window_get_type())
|
GST_EXPORT
|
||||||
#define GST_GL_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW, GstGLWindow))
|
GType gst_gl_window_get_type (void);
|
||||||
#define GST_GL_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GST_GL_TYPE_WINDOW, GstGLWindowClass))
|
#define GST_TYPE_GL_WINDOW (gst_gl_window_get_type())
|
||||||
#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))
|
/* FIXME: remove this when moving to -base */
|
||||||
#define GST_GL_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW, GstGLWindowClass))
|
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_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_UNLOCK(w) g_mutex_unlock(&GST_GL_WINDOW(w)->lock)
|
||||||
#define GST_GL_WINDOW_GET_LOCK(w) (&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 ())
|
#define GST_GL_WINDOW_ERROR (gst_gl_window_error_quark ())
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,11 +155,6 @@ struct _GstGLWindowClass {
|
||||||
gpointer _reserved[GST_PADDING];
|
gpointer _reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_EXPORT
|
|
||||||
GQuark gst_gl_window_error_quark (void);
|
|
||||||
GST_EXPORT
|
|
||||||
GType gst_gl_window_get_type (void);
|
|
||||||
|
|
||||||
GST_EXPORT
|
GST_EXPORT
|
||||||
GstGLWindow * gst_gl_window_new (GstGLDisplay *display);
|
GstGLWindow * gst_gl_window_new (GstGLDisplay *display);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ const gchar *WlEGLErrorString ();
|
||||||
|
|
||||||
#define gst_gl_window_wayland_egl_parent_class parent_class
|
#define gst_gl_window_wayland_egl_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstGLWindowWaylandEGL, gst_gl_window_wayland_egl,
|
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 *
|
static guintptr gst_gl_window_wayland_egl_get_window_handle (GstGLWindow *
|
||||||
window);
|
window);
|
||||||
|
@ -360,7 +360,7 @@ gst_gl_window_wayland_egl_new (GstGLDisplay * display)
|
||||||
|
|
||||||
GST_DEBUG ("creating Wayland EGL 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
|
static void
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_WAYLAND_EGL (gst_gl_window_wayland_egl_get_type())
|
#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_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL))
|
#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_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGLClass))
|
#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_GL_TYPE_WINDOW_WAYLAND_EGL))
|
#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_GL_TYPE_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_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL_Class))
|
#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 _GstGLWindowWaylandEGL GstGLWindowWaylandEGL;
|
||||||
typedef struct _GstGLWindowWaylandEGLClass GstGLWindowWaylandEGLClass;
|
typedef struct _GstGLWindowWaylandEGLClass GstGLWindowWaylandEGLClass;
|
||||||
|
|
|
@ -43,9 +43,9 @@ struct _GstGLContextWGLPrivate
|
||||||
#define GST_CAT_DEFAULT gst_gl_context_debug
|
#define GST_CAT_DEFAULT gst_gl_context_debug
|
||||||
|
|
||||||
#define gst_gl_context_wgl_parent_class parent_class
|
#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) \
|
#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 guintptr gst_gl_context_wgl_get_gl_context (GstGLContext * context);
|
||||||
static void gst_gl_context_wgl_swap_buffers (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 */
|
/* we require an win32 display handle to create WGL contexts */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return g_object_new (GST_GL_TYPE_CONTEXT_WGL, NULL);
|
return g_object_new (GST_TYPE_GL_CONTEXT_WGL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HGLRC
|
static HGLRC
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_CONTEXT_WGL (gst_gl_context_wgl_get_type())
|
#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_GL_TYPE_CONTEXT_WGL, GstGLContextWGL))
|
#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_GL_TYPE_CONTEXT_WGL, GstGLContextWGLClass))
|
#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_GL_TYPE_CONTEXT_WGL))
|
#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_GL_TYPE_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_GL_TYPE_CONTEXT_WGL, GstGLContextWGLClass))
|
#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 _GstGLContextWGL GstGLContextWGL;
|
||||||
typedef struct _GstGLContextWGLClass GstGLContextWGLClass;
|
typedef struct _GstGLContextWGLClass GstGLContextWGLClass;
|
||||||
|
|
|
@ -32,7 +32,7 @@ LRESULT FAR PASCAL sub_class_proc (HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||||
LPARAM lParam);
|
LPARAM lParam);
|
||||||
|
|
||||||
#define GST_GL_WINDOW_WIN32_GET_PRIVATE(o) \
|
#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
|
enum
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||||
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
|
GST_DEBUG_CATEGORY_GET (GST_CAT_DEFAULT, "glwindow");
|
||||||
#define gst_gl_window_win32_parent_class parent_class
|
#define gst_gl_window_win32_parent_class parent_class
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstGLWindowWin32, gst_gl_window_win32,
|
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,
|
static void gst_gl_window_win32_set_window_handle (GstGLWindow * window,
|
||||||
guintptr handle);
|
guintptr handle);
|
||||||
|
@ -98,7 +98,7 @@ gst_gl_window_win32_new (GstGLDisplay * display)
|
||||||
/* we require an win32 display to create win32 windows */
|
/* we require an win32 display to create win32 windows */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return g_object_new (GST_GL_TYPE_WINDOW_WIN32, NULL);
|
return g_object_new (GST_TYPE_GL_WINDOW_WIN32, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_WIN32 (gst_gl_window_win32_get_type())
|
#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_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32))
|
#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_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32Class))
|
#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_GL_TYPE_WINDOW_WIN32))
|
#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_GL_TYPE_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_GL_TYPE_WINDOW_WIN32, GstGLWindowWin32Class))
|
#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 _GstGLWindowWin32 GstGLWindowWin32;
|
||||||
typedef struct _GstGLWindowWin32Private GstGLWindowWin32Private;
|
typedef struct _GstGLWindowWin32Private GstGLWindowWin32Private;
|
||||||
|
|
|
@ -41,10 +41,10 @@
|
||||||
#define GST_CAT_DEFAULT gst_gl_context_debug
|
#define GST_CAT_DEFAULT gst_gl_context_debug
|
||||||
|
|
||||||
#define gst_gl_context_glx_parent_class parent_class
|
#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) \
|
#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 guintptr gst_gl_context_glx_get_gl_context (GstGLContext * context);
|
||||||
static void gst_gl_context_glx_swap_buffers (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 */
|
/* we require an x11 display handle to create GLX contexts */
|
||||||
return NULL;
|
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
|
static inline void
|
||||||
|
|
|
@ -27,12 +27,17 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_CONTEXT_GLX (gst_gl_context_glx_get_type())
|
#define GST_TYPE_GL_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))
|
GType gst_gl_context_glx_get_type (void);
|
||||||
#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))
|
/* FIXME: remove this when moving to -base */
|
||||||
#define GST_IS_GL_CONTEXT_GLX_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT_GLX))
|
G_DEPRECATED_FOR(GST_TYPE_GL_CONTEXT_GLX) \
|
||||||
#define GST_GL_CONTEXT_GLX_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT_GLX, GstGLContextGLX_Class))
|
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 _GstGLContextGLX GstGLContextGLX;
|
||||||
typedef struct _GstGLContextGLXClass GstGLContextGLXClass;
|
typedef struct _GstGLContextGLXClass GstGLContextGLXClass;
|
||||||
|
@ -57,8 +62,6 @@ struct _GstGLContextGLXClass {
|
||||||
gpointer _reserved[GST_PADDING];
|
gpointer _reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_gl_context_glx_get_type (void);
|
|
||||||
|
|
||||||
GstGLContextGLX * gst_gl_context_glx_new (GstGLDisplay * display);
|
GstGLContextGLX * gst_gl_context_glx_new (GstGLDisplay * display);
|
||||||
guintptr gst_gl_context_glx_get_current_context (void);
|
guintptr gst_gl_context_glx_get_current_context (void);
|
||||||
gpointer gst_gl_context_glx_get_proc_address (GstGLAPI gl_api, const gchar * name);
|
gpointer gst_gl_context_glx_get_proc_address (GstGLAPI gl_api, const gchar * name);
|
||||||
|
|
|
@ -35,12 +35,12 @@
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
|
|
||||||
#define GST_GL_WINDOW_X11_GET_PRIVATE(o) \
|
#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_CAT_DEFAULT gst_gl_window_debug
|
||||||
|
|
||||||
#define gst_gl_window_x11_parent_class parent_class
|
#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 */
|
/* X error trap */
|
||||||
static int TrappedErrorCode = 0;
|
static int TrappedErrorCode = 0;
|
||||||
|
@ -130,7 +130,7 @@ gst_gl_window_x11_new (GstGLDisplay * display)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_object_new (GST_GL_TYPE_WINDOW_X11, NULL);
|
return g_object_new (GST_TYPE_GL_WINDOW_X11, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
|
@ -28,12 +28,13 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_GL_TYPE_WINDOW_X11 (gst_gl_window_x11_get_type())
|
#define GST_TYPE_GL_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))
|
GType gst_gl_window_x11_get_type (void);
|
||||||
#define GST_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11Class))
|
#define GST_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11))
|
||||||
#define GST_IS_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_X11))
|
#define GST_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_X11, GstGLWindowX11Class))
|
||||||
#define GST_IS_GL_WINDOW_X11_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_X11))
|
#define GST_IS_GL_WINDOW_X11(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_X11))
|
||||||
#define GST_GL_WINDOW_X11_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_X11, GstGLWindowX11Class))
|
#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 _GstGLWindowX11 GstGLWindowX11;
|
||||||
typedef struct _GstGLWindowX11Private GstGLWindowX11Private;
|
typedef struct _GstGLWindowX11Private GstGLWindowX11Private;
|
||||||
|
@ -92,8 +93,6 @@ struct _GstGLWindowX11Class {
|
||||||
gpointer _reserved[GST_PADDING_LARGE];
|
gpointer _reserved[GST_PADDING_LARGE];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_gl_window_x11_get_type (void);
|
|
||||||
|
|
||||||
GstGLWindowX11 * gst_gl_window_x11_new (GstGLDisplay * display);
|
GstGLWindowX11 * gst_gl_window_x11_new (GstGLDisplay * display);
|
||||||
|
|
||||||
void gst_gl_window_x11_trap_x_errors (void);
|
void gst_gl_window_x11_trap_x_errors (void);
|
||||||
|
|
|
@ -2428,7 +2428,7 @@ gst_amc_video_dec_src_query (GstVideoDecoder * bdec, GstQuery * query)
|
||||||
context = gst_context_new ("gst.gl.local_context", FALSE);
|
context = gst_context_new ("gst.gl.local_context", FALSE);
|
||||||
|
|
||||||
s = gst_context_writable_structure (context);
|
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);
|
NULL);
|
||||||
gst_query_set_context (query, context);
|
gst_query_set_context (query, context);
|
||||||
gst_context_unref (context);
|
gst_context_unref (context);
|
||||||
|
@ -2487,7 +2487,7 @@ _find_local_gl_context (GstAmcVideoDec * self)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,14 +34,14 @@ _find_local_gl_context (GstGLContextHelper * ctxh)
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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)) {
|
if (!gl_context && gst_gl_run_query (ctxh->element, query, GST_PAD_SINK)) {
|
||||||
gst_query_parse_context (query, &context);
|
gst_query_parse_context (query, &context);
|
||||||
if (context) {
|
if (context) {
|
||||||
s = gst_context_get_structure (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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
|
||||||
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
|
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
|
||||||
GstStructure *s = gst_context_writable_structure (app_context);
|
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);
|
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -251,7 +251,7 @@ sync_bus_call (GstBus * bus, GstMessage * msg, gpointer data)
|
||||||
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
|
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
|
||||||
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
|
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
|
||||||
GstStructure *s = gst_context_writable_structure (app_context);
|
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);
|
NULL);
|
||||||
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
|
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -251,7 +251,7 @@ sync_bus_call (GstBus * bus, GstMessage * msg, gpointer data)
|
||||||
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
|
} else if (g_strcmp0 (context_type, "gst.gl.app_context") == 0) {
|
||||||
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
|
GstContext *app_context = gst_context_new ("gst.gl.app_context", TRUE);
|
||||||
GstStructure *s = gst_context_writable_structure (app_context);
|
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);
|
NULL);
|
||||||
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
|
gst_element_set_context (GST_ELEMENT (msg->src), app_context);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue