After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790124 - playbin3: NEED_CONTEXT events not propagated to app when creating sinks
playbin3: NEED_CONTEXT events not propagated to app when creating sinks
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-09 15:15 UTC by Arnaud Vrac
Modified: 2018-11-03 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Arnaud Vrac 2017-11-09 15:15:33 UTC
Some sinks can require an external context from the application, for example waylandsink and glimagesink require a wayland display or gl display handle when going from NULL to READY.

However, in playbin3 the sinks are created by playsink, which first tries to set the element state to READY. Since the element is still orphaned at this point, the NEED_CONTEXT messages are not propagated to the message bus, and thus the app (or playbin) cannot reply with a proper context.

This means it is impossible to properly embed waylandsink or glimagesink in an application using playbin3.

Note that this only seems to happen with playbin3: playbin2 creates the sink in the autoplug-select signal, and it correctly assigns a bus handler first before setting the sink to READY, and playsink uses the sink provided by playbin2. In playbin3 apparently the autoplug-select signal is not used.
Comment 1 Nicolas Dufresne (ndufresne) 2017-11-09 16:00:18 UTC
Can't we just put it back to NULL, add it, and then sync it's state ?
Comment 2 Arnaud Vrac 2017-11-09 16:16:50 UTC
That would work but it would create a gl or wayland context for nothing. I'm not sure what the plan is to replace the autoplug-select and other signals in playbin3, but the new mechanism that will be implemented should fix this issue.
Comment 3 Edward Hervey 2018-02-10 13:52:44 UTC
isn't this automatic these days ? i.e. when you add an element to a bin the context is set on it.
Comment 4 Nicolas Dufresne (ndufresne) 2018-02-10 14:24:10 UTC
This is a special case. We are required to have a context to pass to ready state for autoplugging. So yes, it's automatic if the element is parented when set to ready.  According to the report, it's not.

Note that context sharing also go through pads, so not being linked also limit how well the context propagates.
Comment 5 GStreamer system administrator 2018-11-03 12:01:45 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/401.