[vlc-devel] [PATCH] demux: adaptive: fix slow buffering

Zhao Zhili wantlamy at gmail.com
Mon Jul 31 18:05:45 CEST 2017


On Monday, July 31, 2017, Francois Cartegnie <fcvlcdev at free.fr
<javascript:_e(%7B%7D,'cvml','fcvlcdev at free.fr');>> wrote:

> Le 31/07/2017 à 16:08, Francois Cartegnie a écrit :
>
> >>              mtime_t i_deadline = mdate();
> >> -            if (i_return == AbstractStream::buffering_ongoing)
> >> +            if(i_return == AbstractStream::buffering_ongoing)
> >>                  i_deadline += (CLOCK_FREQ / 20);
> >> -            if (i_return == AbstractStream::buffering_full)
> >> +            else if(i_return == AbstractStream::buffering_full)
> >>                  i_deadline += (CLOCK_FREQ / 10);
> >>              else if(i_return == AbstractStream::buffering_end)
> >>                  i_deadline += (CLOCK_FREQ);
> >
> > I don't remember if I wanted to add delays, but,
> >
>
> Err, that wasn't even adding delays.
>
> So you're not fixing anything in the logic. Just adding else into syntax.
>
>
The original code is:

            mtime_t i_deadline = mdate();
            if (i_return == AbstractStream::buffering_ongoing)
                i_deadline += (CLOCK_FREQ / 20);
            if (i_return == AbstractStream::buffering_full)
                i_deadline += (CLOCK_FREQ / 10);
            else if(i_return == AbstractStream::buffering_end)
                i_deadline += (CLOCK_FREQ);
            else /*if(i_return == AbstractStream::buffering_suspended)*/
                i_deadline += (CLOCK_FREQ / 4);


So when i_return is AbstractStream::buffering_ongoing, i_deadline = mdate()
+ (CLOCK_FREQ / 20) + (CLOCK_FREQ / 4). 300 milliseconds are too much while
buffering_ongoing. Actually 50 milliseconds don't work well too, but it's
another topic.


> Francois
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170801/fb41f8bc/attachment.html>


More information about the vlc-devel mailing list