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 632782 - bin: set_state to PLAYING of non-toplevel bin might stop at PAUSED
bin: set_state to PLAYING of non-toplevel bin might stop at PAUSED
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 655037 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-10-21 10:15 UTC by Mark Nauwelaerts
Modified: 2018-11-03 12:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mark Nauwelaerts 2010-10-21 10:15:34 UTC
... particularly if NO_PREROLL element present in bin.

Since NO_PREROLL "eats" any ASYNC, occurrence of the former tends to trigger a "fake async-done" to counter the latter, see e.g. gst_bin_add_func when adding  a NO_PREROLL element, or decodebin2 change_state function forcing async_done upon NO_PREROLL state change of bin.

In any case, bin_handle_async_done is triggered, which (silently) ignores further state change to PLAYING assuming that (some) parent will take care of it later on.  While that is the case in "normal" state changes, it need not be so in more "advanced/dynamic" custom bin scenarios (decodebin2, etc etc), depending on whether parents already reached PLAYING earlier or other ASYNC_START are pending somewhere else.  Specific cases are in e.g. bug #628214 or bug #632656.

As such, this may be intended behaviour, but it might need some tweaking or some warning/documentation indicating that a good old _set_state (..., PLAYING) needs some caution as it may "fail" silently and would have to be replaced by _set_state (..., PAUSED) followed by _set_state (..., PLAYING).
Comment 1 Mark Nauwelaerts 2010-10-21 17:21:42 UTC
It should also be noted that workarounds are in place in the aforementioned bugs (i.e. set to PAUSED followed by PLAYING).
Comment 2 Tim-Philipp Müller 2010-10-21 17:30:30 UTC
> It should also be noted that workarounds are in place in the aforementioned
> bugs (i.e. set to PAUSED followed by PLAYING).

ie. http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=9d0fefc6170b6d63e869e5ac07862003816246d2 (which we might want to revert once this is fixed properly)
Comment 3 Wim Taymans 2010-12-29 11:01:00 UTC
There is also the bin property "async-handling" for this purpose.

The idea is that you either let the toplevel bin control its elements automatically or you do everything yourself. If you decide to control the states of the elements inside the bin yourself, you should know how it works.
Comment 4 Vincent Penquerc'h 2011-07-01 14:01:42 UTC
A similar case here:

I have a bin containing a pulsesink, which is added to the pipeline, but in NULL state and disconnected.
Upon receiving a new incoming src pad from farsight, I connect the pad to the bin, and switch the bin to PLAYING. The bin will stop at PAUSED though, as pulsesink is set to async mode.
It is worth mentioning that _sync_state_to_parent will also fail to sync state, as even if the parent is in PLAYING, the bin will end up in PAUSED.
Comment 5 David Schleef 2012-01-24 01:26:56 UTC
*** Bug 655037 has been marked as a duplicate of this bug. ***
Comment 6 Tim-Philipp Müller 2016-11-12 13:16:16 UTC
Sebastian, do you know if this is still an issue these days?
Comment 7 Sebastian Dröge (slomo) 2016-11-14 08:56:53 UTC
It is, yes. It's basically 1) in https://bugzilla.gnome.org/show_bug.cgi?id=760532#c23
Comment 8 GStreamer system administrator 2018-11-03 12:14:11 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/gstreamer/issues/16.