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 684307 - playbin/playsink doesn't allow replacement of the sinks
playbin/playsink doesn't allow replacement of the sinks
Status: RESOLVED INVALID
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: 2012-09-18 16:30 UTC by Jan Schmidt
Modified: 2012-09-26 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test for playbin sink replacement (1.31 KB, text/x-python)
2012-09-26 12:25 UTC, Jan Schmidt
Details

Description Jan Schmidt 2012-09-18 16:30:52 UTC
LibreOffice has been using an idiom in 0.10 where it prerolls playbin with fakesink configured as the video-sink in order to get the video width/height, and then replaces the video-sink (setting it to NULL) and sets playbin through PAUSED->READY->PAUSED to get it recreate the sink.

With playsink in 1.0, the video chain never gets destroyed from the first time, so it continues to use fakesink.
Comment 1 Sebastian Dröge (slomo) 2012-09-26 09:18:24 UTC
In playsink the chains are only freed and new sinks can be used when going to NULL. playbin in theory could allow a new sink after every file, so even in READY.

Is it still impossible to replace a sink when going back to NULL instead of READY?
Comment 2 Jan Schmidt 2012-09-26 09:52:09 UTC
Correct - setting it to NULL also didn't make it work. My reading of the code is that the chains are actually only freed in dispose.
Comment 3 Sebastian Dröge (slomo) 2012-09-26 10:58:16 UTC
In playsink they're destroyed in READY_TO_NULL, same for playbin (deactivate_group() removes the sinks from the groups).
Comment 4 Jan Schmidt 2012-09-26 12:25:45 UTC
Created attachment 225204 [details]
Test for playbin sink replacement

You're correct. I don't know what was going wrong for Michael in his LibreOffice testing. Here's a python script which demonstrates that replacing the sink in READY works fine.
Comment 5 Michael Meeks 2012-09-26 12:32:45 UTC
Thanks for checking, no doubt some extreme badness in our gst code which is (for interest) here:

http://cgit.freedesktop.org/libreoffice/core/tree/avmedia/source/gstreamer/gstplayer.cxx

all bug-fix / cleanup patches gratefully received :-)