mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 15:38:53 +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
|
/* 4) Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT
|
||||||
* message.
|
* message.
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
gst_gl_display_context_propagate (GstElement * element, GstGLDisplay * display)
|
gst_gl_element_propagate_display_context (GstElement * element,
|
||||||
|
GstGLDisplay * display)
|
||||||
{
|
{
|
||||||
GstContext *context;
|
GstContext *context;
|
||||||
GstMessage *msg;
|
GstMessage *msg;
|
||||||
|
@ -295,7 +296,7 @@ gst_gl_ensure_element_data (gpointer element, GstGLDisplay ** display_ptr,
|
||||||
|
|
||||||
*display_ptr = display;
|
*display_ptr = display;
|
||||||
|
|
||||||
gst_gl_display_context_propagate (element, display);
|
gst_gl_element_propagate_display_context (element, display);
|
||||||
|
|
||||||
get_gl_context:
|
get_gl_context:
|
||||||
if (*other_context_ptr)
|
if (*other_context_ptr)
|
||||||
|
|
|
@ -41,6 +41,9 @@ GST_EXPORT
|
||||||
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
||||||
GstGLContext ** context_ptr);
|
GstGLContext ** context_ptr);
|
||||||
|
|
||||||
|
GST_EXPORT
|
||||||
|
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
|
||||||
|
|
||||||
GST_EXPORT
|
GST_EXPORT
|
||||||
gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
|
gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
|
||||||
guint plane);
|
guint plane);
|
||||||
|
|
Loading…
Reference in a new issue