GNOME Bugzilla – Bug 537050
[playbin2] QOS event problems
Last modified: 2010-02-09 10:11:47 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?).
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?
Wim on irc suggests that we could make the input-selector adjust the QoS events it sends upstream.
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?
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.
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.
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.
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.
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.