playbin3: NEED_CONTEXT events not propagated to app when creating sinks
@rawoul
Submitted by Arnaud Vrac Link to original bug (#790124)
Description
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.