GLX context creation in qmlglsink

Matthew Waters ystreet00 at gmail.com
Wed Mar 22 11:01:40 UTC 2017


On 22/03/17 17:09, Dmitry Lavnikevich wrote:
> Hi, everyone!
>
> I am currently trying to run qmlglsink on my x86 Yocto platform. I use
> the simpliest qmlsink example from the the gst-plugins-bad sources. It
> runs ok under X11 on my desktop machine. But on the Yocto build I see
> that the GLX context cannot be wrapped because
> glXGetCurrentContext()
> returns NULL at every call.
>
> Thus the question, what exactly should create this context and make it
> current. What may I be missing from dependencies? I have built:
> * qt 5.7 with -opengl desktop
> * gst-plugins-bad with --enable-opengl --enable-glx

Chances are that Qt isn't using GLX if glxGetCurrentContext() is
returning NULL.  Is it using EGL instead here?

Cheers
-Matt

> What am I missing? Where to look further? Any additional information I
> should provide?
>
> ...
> INFO               GST_EVENT
> gstpad.c:5655:gst_pad_send_event_unchecked:<gluploadelement0:src>
> Received event on flushing pad. Discarding
> DEBUG                GST_BUS gstbus.c:317:gst_bus_post:<bus0> [msg
> 0x7b1c90] posting on bus structure-change message: 0x7b1c90, time
> 99:99:99.999999999, seq-num 5, element
> 'sink', GstMessageStructureChange,
> type=(GstStructureChangeType)GST_STRUCTURE_CHANGE_TYPE_PAD_LINK,
> owner=(GstElement)"\(GstGLUploadElement\)\ gluploadelement0",
> busy=(boolean)false;
> DEBUG                    bin
> gstbin.c:3728:gst_bin_handle_message_func:<pipeline0> [msg 0x7b1c90]
> handling child sink message of type structure-change
> DEBUG                    bin
> gstbin.c:988:bin_remove_messages:<qtsink0:sink> deleting message
> 0x7b1c10 of type structure-change (types 0x00001000)
> DEBUG                GST_BUS gstbus.c:352:gst_bus_post:<bus0> [msg
> 0x7b1c90] dropped
> DEBUG       GST_ELEMENT_PADS
> gstutils.c:1763:gst_element_link_pads_full: linked pad
> gluploadelement0:src to pad qtsink0:sink
> INFO             qtglutility
> gstqtglutility.cc:65:gst_qt_get_gl_display:
> QGuiApplication::instance()->platformName() xcb
> DEBUG             GST_MEMORY
> gstallocator.c:210:gst_allocator_register: registering allocator
> 0xaee0d0 with name "GLBuffer"
> DEBUG             GST_MEMORY
> gstallocator.c:210:gst_allocator_register: registering allocator
> 0xaee1e0 with name "GLMemory"
> DEBUG             GST_MEMORY
> gstallocator.c:210:gst_allocator_register: registering allocator
> 0xaef020 with name "GLMemoryPBO"
> DEBUG             GST_MEMORY
> gstallocator.c:210:gst_allocator_register: registering allocator
> 0xaee2f0 with name "GLRenderbuffer"
> DEBUG             qtglwidget qtitem.cc:132:QtGLVideoItem: 0x9d4770
> init Qt Video Item
> DEBUG             qtglwidget qtitem.cc:263:onSceneGraphInitialized:
> scene graph initialization with Qt GL context 0x992f80
> ** (my-qt-test:715): CRITICAL **: gst_gl_context_get_gl_api: assertion
> 'GST_IS_GL_CONTEXT (context)' failed
> WARN               glcontext
> gstglcontext.c:506:gst_gl_context_get_current_gl_context: Could not
> retrieve current context
> WARN             qtglutility
> gstqtglutility.cc:158:gst_qt_get_gl_wrapcontext: About to check
> HANDLE=0x00000000
> ERROR            qtglutility
> gstqtglutility.cc:173:gst_qt_get_gl_wrapcontext: cannot wrap qt OpenGL
> context
> ** (my-qt-test:715): CRITICAL **: gst_gl_context_get_gl_api: assertion
> 'GST_IS_GL_CONTEXT (context)' failed
> DEBUG             qtglwidget qtitem.cc:284:onSceneGraphInitialized:
> 0x9d4770 created wrapped GL context (NULL)
> DEBUG             GST_STATES
> gstelement.c:2570:gst_element_set_state_func:<pipeline0> set_state to
> PLAYING
> DEBUG             GST_STATES
> gstelement.c:2595:gst_element_set_state_func:<pipeline0> setting
> target state to PLAYING
> DEBUG             GST_STATES
> gstelement.c:2608:gst_element_set_state_func:<pipeline0> current NULL,
> old_pending VOID_PENDING, next VOID_PENDING, old return SUCCESS
> DEBUG             GST_STATES
> gstelement.c:2642:gst_element_set_state_func:<pipeline0> intermediate:
> setting state from NULL to READY
> DEBUG                GST_BUS gstbus.c:471:gst_bus_set_flushing:<bus1>
> unset bus flushing
> DEBUG             GST_STATES
> gstbin.c:2863:gst_bin_change_state_func:<pipeline0> changing state of
> children from NULL to READY
> DEBUG                    bin
> gstbin.c:2900:gst_bin_change_state_func:<pipeline0> clearing all
> cached messages
> DEBUG                    bin
> gstbin.c:2708:gst_bin_src_pads_activate:<pipeline0> deactivate pads
> DEBUG                    bin
> gstbin.c:2716:gst_bin_src_pads_activate:<pipeline0> pad deactivation
> successful
> DEBUG                    bin
> gstbin.c:2394:gst_bin_sort_iterator_resync:<pipeline0> resync
> DEBUG                    bin gstbin.c:2180:add_to_queue:<pipeline0>
> adding 'qtsink0' to queue
> DEBUG                    bin gstbin.c:912:find_message:<pipeline0> no
> message found matching types 00001000
> DEBUG                    bin gstbin.c:919:find_message:<pipeline0>  
> structure-change
> DEBUG                    bin gstbin.c:2297:update_degree:<pipeline0>
> change element gluploadelement0, degree 0->1, linked to qtsink0
> DEBUG                    bin gstbin.c:912:find_message:<pipeline0> no
> message found matching types 00001000
> DEBUG                    bin gstbin.c:919:find_message:<pipeline0>  
> structure-change
> DEBUG                    bin gstbin.c:2297:update_degree:<pipeline0>
> change element videotestsrc0, degree 0->1, linked to gluploadelement0
> DEBUG                    bin gstbin.c:2320:update_degree:<pipeline0>
> element videotestsrc0 not linked on any sinkpads
> DEBUG                    bin
> gstbin.c:2381:gst_bin_sort_iterator_next:<pipeline0> queue head gives
> qtsink0
> DEBUG                    bin gstbin.c:912:find_message:<pipeline0> no
> message found matching types 00001000
> DEBUG                    bin gstbin.c:919:find_message:<pipeline0>  
> structure-change
> DEBUG                    bin gstbin.c:2297:update_degree:<pipeline0>
> change element gluploadelement0, degree 1->0, linked to qtsink0
> DEBUG                    bin gstbin.c:2180:add_to_queue:<pipeline0>
> adding 'gluploadelement0' to queue
> INFO              GST_STATES
> gstbin.c:2515:gst_bin_element_set_state:<qtsink0> current NULL pending
> VOID_PENDING, desired next READY
> DEBUG                    bin gstbin.c:912:find_message:<pipeline0> no
> message found matching types 00100000
> DEBUG                    bin gstbin.c:919:find_message:<pipeline0>  
> async-start
> DEBUG                    bin
> gstbin.c:2610:gst_bin_element_set_state:<pipeline0> setting element
> qtsink0 to READY, base_time 0:00:00.000000000
> DEBUG             GST_STATES
> gstelement.c:2570:gst_element_set_state_func:<qtsink0> set_state to READY
> DEBUG             GST_STATES
> gstelement.c:2595:gst_element_set_state_func:<qtsink0> setting target
> state to READY
> DEBUG             GST_STATES
> gstelement.c:2608:gst_element_set_state_func:<qtsink0> current NULL,
> old_pending VOID_PENDING, next VOID_PENDING, old return SUCCESS
> DEBUG             GST_STATES
> gstelement.c:2642:gst_element_set_state_func:<qtsink0> final: setting
> state from NULL to READY
> DEBUG                 qtsink
> gstqtsink.cc:303:gst_qt_sink_change_state: changing state: NULL => READY
> ERROR             qtglwidget qtitem.cc:340:qt_item_init_winsys:
> 0x9d4770 failed to retrieve wrapped context (NULL)
> WARN                  qtsink
> gstqtsink.cc:325:gst_qt_sink_change_state:<qtsink0> error: Could not
> initialize window system
>
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170322/4aadacd3/attachment.sig>


More information about the gstreamer-devel mailing list