mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gtkglsink: expose the created display and context correctly
1. Propagate the GstGLDisplay we create 2. Add the created GstGLContext to the propagated GstGLDisplay Otherwise with multi-branch GL pipelines involving gtkglsink, things will fall apart and errors will be genarated somewhere.
This commit is contained in:
parent
b9a2c64d8d
commit
143f9abf49
2 changed files with 7 additions and 3 deletions
|
@ -218,8 +218,9 @@ gst_gl_context_query (GstElement * element)
|
|||
/* 4) Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT
|
||||
* message.
|
||||
*/
|
||||
static void
|
||||
gst_gl_display_context_propagate (GstElement * element, GstGLDisplay * display)
|
||||
void
|
||||
gst_gl_element_propagate_display_context (GstElement * element,
|
||||
GstGLDisplay * display)
|
||||
{
|
||||
GstContext *context;
|
||||
GstMessage *msg;
|
||||
|
@ -295,7 +296,7 @@ gst_gl_ensure_element_data (gpointer element, GstGLDisplay ** display_ptr,
|
|||
|
||||
*display_ptr = display;
|
||||
|
||||
gst_gl_display_context_propagate (element, display);
|
||||
gst_gl_element_propagate_display_context (element, display);
|
||||
|
||||
get_gl_context:
|
||||
if (*other_context_ptr)
|
||||
|
|
|
@ -41,6 +41,9 @@ GST_EXPORT
|
|||
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
||||
GstGLContext ** context_ptr);
|
||||
|
||||
GST_EXPORT
|
||||
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
|
||||
|
||||
GST_EXPORT
|
||||
gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
|
||||
guint plane);
|
||||
|
|
Loading…
Reference in a new issue