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 537050 - [playbin2] QOS event problems
[playbin2] QOS event problems
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 602437
 
 
Reported: 2008-06-07 00:16 UTC by Michael Smith
Modified: 2010-02-09 10:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playbin2: Transform QoS events to be meaningful for upstream elements (8.37 KB, patch)
2009-11-19 18:49 UTC, Sebastian Dröge (slomo)
needs-work Details | Review
playbin2: Transform QoS events to be meaningful for upstream elements (8.51 KB, patch)
2009-11-22 11:15 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Michael Smith 2008-06-07 00:16:24 UTC
I haven't investigated this one in too much depth yet, so there's not a lot of detail here.

If I run -base/gst/playback/test7 with 2 or more URIs (both files containing AAC/H264) (You will probably need the patch from #537045 to make this work at all), then once it gets to the 2nd file, it starts displaying only keyframes.

Looking at the debug output, this is because it's receiving QoS events with a timestamp around the duration of the first file. Since the timestamps in the second file are around zero, it thinks everything's very late, and drops back to keyframe-only mode.

Not sure who is wrong here (ffdec? basesink?).
Comment 1 Michael Smith 2008-06-07 00:51:19 UTC
Looked at it a bit more. QoS events have a timestamp in running time.

ffmpegdec appropriately corrects for this using gst_segment_to_running_time. However, ffmpegdec's segment doesn't have the right accumulated segment time from previous segments to do this.

How should this be fixed? Who is responsible for it?
Comment 2 Michael Smith 2008-06-09 17:24:23 UTC
Wim on irc suggests that we could make the input-selector adjust the QoS events it sends upstream.
Comment 3 Michael Smith 2008-06-09 21:13:53 UTC
On further inspection.. whilst making input-selector adjust QoS events may well be a good idea anyway, it doesn't help for this specific case.

playbin2 throws away and recreates the input-selector elements for each new group, so we can't do that here. Perhaps it can be done in playsink, though?

Comment 4 Sebastian Dröge (slomo) 2009-11-18 08:04:12 UTC
Yes, it can only be done in playsink because event the playbin2<->playsink links are recreated. Doing it there (and in input-selector but that's another issue, it could only lead to false QoS dropping when switching video streams) is a good idea I guess.
Comment 5 Sebastian Dröge (slomo) 2009-11-18 09:11:28 UTC
I'll take a look at this later, shouldn't be too hard if there's an easy way to get the running time of the sinks inside playsink.
Comment 6 Sebastian Dröge (slomo) 2009-11-19 18:49:25 UTC
Created attachment 148137 [details] [review]
playbin2: Transform QoS events to be meaningful for upstream elements

This is necessary because the sinks don't notice the group switches
and the decoders/demuxers have a different running time than the
sinks.

Fixes bug #537050.
Comment 7 Sebastian Dröge (slomo) 2009-11-22 11:15:34 UTC
Created attachment 148259 [details] [review]
playbin2: Transform QoS events to be meaningful for upstream elements

This is necessary because the sinks don't notice the group switches
and the decoders/demuxers have a different running time than the
sinks.

Fixes bug #537050.
Comment 8 Sebastian Dröge (slomo) 2009-11-23 07:06:42 UTC
commit 127390941904f213e31963c048a4a440a23eb6f8
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Nov 19 19:28:12 2009 +0100

    playbin2: Transform QoS events to be meaningful for upstream elements
    
    This is necessary because the sinks don't notice the group switches
    and the decoders/demuxers have a different running time than the
    sinks.
    
    Fixes bug #537050.