[Bug 701404] dashdemux: should not buffer the entire Period

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jul 3 13:23:36 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=701404
  GStreamer | gst-plugins-bad | 1.x

--- Comment #15 from Greg Rutz <greg at gsr-tek.com> 2013-07-03 20:23:30 UTC ---
(In reply to comment #14) 
> This patch misses some kind of condition waiting to avoid looping continuously
> knowing that there isn't room for buffering
> 
> ::: ext/dash/gstdashdemux.c
> @@ +1533,3 @@
> +  buffered_duration = gst_dash_demux_get_buffering_time (demux);
> +  while ((GST_TIME_AS_MSECONDS (buffered_duration) < minBufferTime) &&
> +      buffered_duration <= demux->max_buffering_time) {
> 
> The task is called repeatedly anyway, not sure we want a while here without any
> cancel checks.

I agree.  I'm not sure we should have a while here.  I am working on this as
part of bug 700423.  I think the function should download one fragment for each
stream and then return.  There should be other logic that determines whether
the GstTask is paused or remains running.

> And why shouldn't it be:
> 
> while ((GST_TIME_AS_MSECONDS (buffered_duration) < minBufferTime) ||
> buffered_duration <= demux->max_buffering_time) ?
> 
> After all this is a "minimum buffering time".

I think we need to agree on (and document) exactly how the logic will determine
how much is buffered because that determines how quickly representations
changes will be seen by the viewer.  Maybe this:

1) If max_buffering_time is set:
    a) If max_buffering_time is greater than minBufferTime, buffer
max_buffering time
    b) If max_buffering_time is less than or equal to minBufferTime, buffer
minBufferTime
2) If max_buffering_time is not set, buffer minBufferTime

min_buffering_time should always be respected.  The value should be smartly
populated by the content generator to ensure data is always available based on
the representation bandwidth.  I also think that users should strive to have
this value as small as possible (which is why minBufferTime is used if
max_buffering_time is not set).  If the user wants to override this value (and
thus make representation switches slower) they can set max_buffering_time.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list