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 566654 - playbin2: does not come back from NULL after switching URIs on about_to_finish
playbin2: does not come back from NULL after switching URIs on about_to_finish
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-05 17:24 UTC by Steven Robertson
Modified: 2009-01-07 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the issue (9.01 KB, patch)
2009-01-06 17:07 UTC, Wim Taymans
none Details | Review
Patch to fix more issues (10.37 KB, patch)
2009-01-07 12:11 UTC, Wim Taymans
committed Details | Review

Description Steven Robertson 2009-01-05 17:24:37 UTC
When using playbin2's gapless output, this works:

* Start playing a file.
* Set pipeline to the NULL state.
* Set pipeline to the PLAYING state.

works fine, but this:

* Start playing a file.
* Catch about_to_finish and swap in a new URI.
* Wait a moment for the new URI to begin playing.
* Set pipeline to the NULL state.
* Set pipeline to the PLAYING state.

fails in one of several ways (deadlock, a spew of warnings, segfault, or a combination thereof).  Similar behavior happens with READY instead of NULL and/or PAUSED instead of PLAYING.

Thanks for your help.
Comment 1 Wim Taymans 2009-01-06 17:07:07 UTC
Created attachment 125861 [details] [review]
patch to fix the issue

 * remove the EOS hack
 * lock unused uridecodebins when deactivating the group
 * reuse uridecodebins

This patch fixes it for my simple testapp that does what the bugreport says (and some more state change hammering)
Comment 2 Wim Taymans 2009-01-07 12:11:24 UTC
Created attachment 125922 [details] [review]
Patch to fix more issues

In addition to the previous patch:

* unlock the state change when the playbin2 is going to NULL so that all
  uridecodebins correctly go to NULL
* lock the state of the groups again after going to NULL
Comment 3 Jan Schmidt 2009-01-07 12:58:05 UTC
Did you want to get this into this release?
Comment 4 Wim Taymans 2009-01-07 13:52:45 UTC
        * gst/playback/gstplaybin2.c: (gst_play_bin_class_init),
        (gst_play_bin_set_uri), (gst_play_bin_set_suburi),
        (no_more_pads_cb), (drained_cb), (group_set_locked_state_unlocked),
        (activate_group), (deactivate_group), (groups_set_locked_state),
        (gst_play_bin_change_state):
        Fix some comments and docs.
        Post an error message when we fail to link the selector to the sink.
        Remove pushing of EOS, this seems unneeded.
        Lock the state of deactivated groups so that they don't accidentally 
        reactivate when the playbin2 state changes.
        Reuse uridecodebins.
        Unlock and relock state of groups when playbin goes to NULL.
        Fixes #566654.
        Fixes #566341.

        * gst/playback/gsturidecodebin.c: (pad_removed_cb), (type_found):
        Only do something in the pad removed callback when we are dealing with
        our sourcepads because the sinkpads don't have a ghostpad.