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 602437 - [playbin2] [gapless] Completely broken when switching between files with audio/video only
[playbin2] [gapless] Completely broken when switching between files with audi...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 537050
Blocks: 440952 602691
 
 
Reported: 2009-11-19 19:11 UTC by Sebastian Dröge (slomo)
Modified: 2010-07-16 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playbin2: Only keep track of the segments of a main stream (9.97 KB, patch)
2009-12-06 17:49 UTC, Sebastian Dröge (slomo)
none Details | Review

Description Sebastian Dröge (slomo) 2009-11-19 19:11:47 UTC
See summary, this probably caused using a single clock or something.

Can easily be reproduced by using test7 from gst-plugins-base/gst/playback on a file with audio only followed by a file with video only or the other way around.
Comment 1 Sebastian Dröge (slomo) 2009-11-19 19:15:49 UTC
This also depends a bit on bug #537050, on top of that patch something is necessary to keep the running time between different types of streams.
Comment 2 Sebastian Dröge (slomo) 2009-12-04 15:52:11 UTC
Wim says that playsink needs to set the running time on the sinks so that they're all in sync, even if one sink doesn't get data for some groups.

Can be done by keeping track of the segments in playsink and newsegment events. For streams to be synchronized the running time should be the same on all of them.


The same needs to be done in playbin2 now for the QoS event adjusting.
Comment 3 Sebastian Dröge (slomo) 2009-12-06 17:49:04 UTC
Created attachment 149203 [details] [review]
playbin2: Only keep track of the segments of a main stream

To have all streams synchronized they need to have the same
running times, which means that we can simply take the running
time from one stream.
Comment 4 Sebastian Dröge (slomo) 2009-12-06 17:50:20 UTC
(In reply to comment #3)
> Created an attachment (id=149203) [details] [review]
> playbin2: Only keep track of the segments of a main stream
> 
> To have all streams synchronized they need to have the same
> running times, which means that we can simply take the running
> time from one stream.

This now makes sure that on the playbin2 side, for the QoS event adjusting, the running time is always correct.
Comment 5 Sebastian Dröge (slomo) 2009-12-06 18:04:14 UTC
Not sure if this is the best solution though: what happens if another stream than the selected main stream is a bit longer?
Comment 6 Sebastian Dröge (slomo) 2010-07-14 19:51:14 UTC
I have a patch and will push it after release.
Comment 7 Sebastian Dröge (slomo) 2010-07-16 15:41:50 UTC
commit 405b47a79ac92b73a4994aea73ceadc6ea043ec6
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Jul 11 14:44:10 2010 +0200

    playsink: Fix gapless playback in many non-simple scenarios
    
    Before gapless playback failed when switching between audio-only,
    video-only and audio-video files, when choosing different clocks
    and when the different streams had different durations.
    
    This is now handled by a helper element, which keeps track of the
    running times of all streams and synchronizes them.
    
    Fixes bug #602437.

commit f835533cb4c9b4af51bb1f8f1af50bf7955bda46
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Jul 11 14:43:52 2010 +0200

    playbin2: Remove QOS event adjustments for gapless playback mode