Trouble with the sdlshare2.c example (gst-plugins-base)

Matthew Waters ystreet00 at gmail.com
Tue Jul 12 05:02:03 UTC 2022


Yes, something is broken.  I have a fix for this which I will push when
ssh access to gitlab works again.

Cheers
-Matt

On 11/7/22 13:37, Brett Ernst via gstreamer-devel wrote:
> Hello,
>
> I've been trying to get the sdlshare2.c example working, which shares
> an application's GL context with the glimagesink element. It seems
> that whenever a context is provided via the gst.gl.app_context
> context, the pipeline fails to go from NULL to READY state without
> printing any kind of messages as to why. I originally noticed this in
> my own code, but using sdlshare2.c without modification also results
> in the same outcome.
>
> Does sdlshare2.c work for anybody else?
>
> I'm on a Fedora 36 system using Xorg with the amdgpu video drivers.
> The GStreamer version is 1.20.0. I've included a snippet of the trace
> log here, including the part that seems relevant, but the entire log
> is too enormous to post even on GitHub gists. 
>
> Browsing through the code for gstglimagesink.c it doesn't seem like
> it's even attempting to use the context provided by sdlshare2.c (if I
> modify it to provide any other value, the same result occurs).
> Removing the gst.gl.app_context context altogether allows the pipeline
> to start, but since it's not sharing the context it creates two windows.
>
> Just trying to narrow down if the example is broken or if there's
> something about my system causing this. Any thoughts are appreciated.
>
> 0:00:00.171032213 56903      0x1a83000 DEBUG                GST_BUS
> gstbus.c:338:gst_bus_post:<bus1> [msg 0x1f90da0] posting on bus
> need-context message: 0x1f90da0, time 99:99:99.999999999, seq-num 20,
> element 'sink', GstMessageNeedContext,
> context-type=(string)gst.gl.app_context;
> 0:00:00.171036873 56903      0x1a83000 DEBUG                    bin
> gstbin.c:3686:gst_bin_handle_message_func:<pipeline0> [msg 0x1f90da0]
> handling child sink message of type need-context
> 0:00:00.171040433 56903      0x1a83000 DEBUG                    bin
> gstbin.c:4022:gst_bin_handle_message_func:<pipeline0> posting message
> upward
> 0:00:00.171045153 56903      0x1a83000 DEBUG                GST_BUS
> gstbus.c:338:gst_bus_post:<bus2> [msg 0x1f90da0] posting on bus
> need-context message: 0x1f90da0, time 99:99:99.999999999, seq-num 20,
> element 'sink', GstMessageNeedContext,
> context-type=(string)gst.gl.app_context;
> 0:00:00.171058573 56903      0x1a83000 DEBUG            GST_CONTEXT
> gstelement.c:3590:gst_element_set_context:<sink> set context 0x1dab920
> context, context=(GstGLContext)"\(GstGLWrappedContext\)\
> glwrappedcontext0";
> 0:00:00.171068733 56903      0x1a83000 DEBUG                GST_BUS
> gstbus.c:381:gst_bus_post:<bus2> [msg 0x1f90da0] pushing on async queue
> 0:00:00.171076833 56903      0x1a83000 DEBUG                GST_BUS
> gstbus.c:384:gst_bus_post:<bus2> [msg 0x1f90da0] pushed on async queue
> 0:00:00.171081953 56903      0x1a83000 DEBUG                GST_BUS
> gstbus.c:377:gst_bus_post:<bus1> [msg 0x1f90da0] dropped
> 0:00:00.171085653 56903      0x1a83000 DEBUG                GST_BUS
> gstbus.c:377:gst_bus_post:<bus0> [msg 0x1f90da0] dropped
> 0:00:00.171089783 56903      0x1a83000 INFO              GST_STATES
> gstelement.c:3091:gst_element_change_state:<sink> have FAILURE
> change_state return
> 0:00:00.171094343 56903      0x1a83000 INFO              GST_STATES
> gstelement.c:2678:gst_element_abort_state:<sink> aborting state from
> NULL to READY
> 0:00:00.171098433 56903      0x1a83000 DEBUG             GST_STATES
> gstelement.c:3041:gst_element_set_state_func:<sink> returned FAILURE
> 0:00:00.171103513 56903      0x1a83000 INFO              GST_STATES
> gstbin.c:2944:gst_bin_change_state_func:<glimagesink0> child 'sink'
> failed to go to state 2(READY)
>
> -Brett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220712/d7e356f4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220712/d7e356f4/attachment-0001.sig>


More information about the gstreamer-devel mailing list