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 641007 - Pipeline change in PAUSED state leads to stall
Pipeline change in PAUSED state leads to stall
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.30
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-31 08:29 UTC by Alexey Chernov
Modified: 2012-05-18 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example code on the bug (6.15 KB, text/x-csrc)
2011-01-31 08:29 UTC, Alexey Chernov
Details

Description Alexey Chernov 2011-01-31 08:29:57 UTC
Created attachment 179698 [details]
Example code on the bug

I have a pipeline with two branch connected using tee:
                 queue -- ximagesink
               /
playbin -- tee 
               \
                 queue -- fakesink

which is dynamically connected to

                 queue -- ximagesink
               /
playbin -- tee 
               \
                 queue -- videomixer -- ffmpegcolorspace --ximagesink

i.e., another video sink is connected instead of fakesink. Doing reconnections in PLAYING state is well described and works OK now. But if I try to do it in PAUSED state, the secondary branch is connected (or disconnected) successfully but as soon as I try to set pipeline to PLAYING state after all the changes it stalls and don't play anymore until I restart it (set to READY or NULL and start again). There're a number of problems:
1. The first method we use for PLAYING state, blocking a pad, doesn't work as it freeze the program on gst_pad_set_blocked and it's right as no buffers are incoming to release from the function.
2. The method with valve element temporary dropping buffers also doesn't work even with resettime element (which was also discussed) to insert some necessary events.

There're also no debug messages about the pipeline from the moment it stalls, even in DEBUG or LOG level. It seems that it simply can't be set to PLAYING state, itself, or some of the element.

Testing example code is attached.
Comment 1 Wim Taymans 2012-05-18 08:06:54 UTC
in paused, all set_blocked calls will block until data flows again. Use the async variants.