From a1f53b4f46974b70a83d54700178e45efe123e7e Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 4 Feb 2020 19:40:45 +1100 Subject: [PATCH] qmlglsink: propagate the context up the the application Allows the application to be notified of the OpenGL context creation. --- ext/qt/gstqtsink.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/qt/gstqtsink.cc b/ext/qt/gstqtsink.cc index 2a4ad7ccc6..b447c2416b 100644 --- a/ext/qt/gstqtsink.cc +++ b/ext/qt/gstqtsink.cc @@ -320,6 +320,13 @@ gst_qt_sink_change_state (GstElement * element, GstStateChange transition) (NULL)); return GST_STATE_CHANGE_FAILURE; } + + GST_OBJECT_LOCK (qt_sink->display); + gst_gl_display_add_context (qt_sink->display, qt_sink->context); + GST_OBJECT_UNLOCK (qt_sink->display); + + gst_gl_element_propagate_display_context (GST_ELEMENT (qt_sink), qt_sink->display); + break; case GST_STATE_CHANGE_READY_TO_PAUSED: break;