[vlc-devel] [PATCH] Inproved buffering accuracy and no rebuffering on ignored

David R Robison drrobison at openroadsconsulting.com
Fri Oct 4 18:49:19 CEST 2013


There were two things I was trying to accomplish:

1) prevent overbuffering. This is why I check on the set group PCR as well.
2) Ignore jitter. I set the --clock-jitter=0 and I do not want to clear 
the buffer or resize the buffer. I just want to keep on playing video. 
With our live video our priority is minimal buffering rather than 
"smooth" playback.

I hope this i clear.
David

David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: drrobison at openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526

On 10/4/2013 12:32 PM, Rémi Denis-Courmont wrote:
> Le mardi 1 octobre 2013 10:40:31 David Robison a écrit :
>> Here is the final patch, Any comments?
> Sorry for the delay but this is, well, a component that has proven hard to
> validate.
>
> Is it so that you want to just pause playback without changing buffering when
> there is an underrun?
>
>> diff --git a/src/input/es_out.c b/src/input/es_out.c
>> index 68acf5e..c2431ba 100644
>> --- a/src/input/es_out.c
>> +++ b/src/input/es_out.c
>> @@ -2309,14 +2309,14 @@ static int EsOutControlLocked( es_out_t *out, int
>> i_query, va_list args ) EsOutIsExtraBufferingAllowed( out ),
>>                               i_pcr, mdate() );
>>   
>> -        if( p_pgrm == p_sys->p_pgrm )
>> +        if( p_sys->b_buffering )
>>           {
>> -            if( p_sys->b_buffering )
>> -            {
>> -                /* Check buffering state on master clock update */
>> -                EsOutDecodersStopBuffering( out, false );
>> -            }
>> -            else if( b_late && ( !p_sys->p_input->p->p_sout ||
>> +            /* Check buffering state on master clock update */
>> +            EsOutDecodersStopBuffering( out, false );
>> +        }
>> +        else if( p_pgrm == p_sys->p_pgrm )
>> +        {
> Won't this potentially needless break playback if an unselected program has
> buffering problems? I would think there was a reason for the check.
>
>> +            if( b_late && ( !p_sys->p_input->p->p_sout ||
>>                                    !p_sys->p_input->p->b_out_pace_control ) )
>> {
>>                   const mtime_t i_pts_delay_base = p_sys->i_pts_delay -
>> p_sys->i_pts_jitter; @@ -2330,19 +2330,23 @@ static int EsOutControlLocked(
>> es_out_t *out, int i_query, va_list args ) "ES_OUT_SET_(GROUP_)PCR  is
>> called too late (jitter of %d ms ignored)", (int)(i_pts_delay -
>> i_pts_delay_base) / 1000 ); i_pts_delay = p_sys->i_pts_delay;
>> +
>> +                    /* reset clock */
>> +                    for( int i = 0; i < p_sys->i_pgrm; i++ )
>> +                      input_clock_Reset( p_sys->pgrm[i]->p_clock );
>>                   }
>>                   else
>>                   {
>>                       msg_Err( p_sys->p_input,
>>                                "ES_OUT_SET_(GROUP_)PCR  is called too late
>> (pts_delay increased to %d ms)", (int)(i_pts_delay/1000) );
>> -                }
>>   
>> -                /* Force a rebufferization when we are too late */
>> +                    /* Force a rebufferization when we are too late */
>>   
>> -                /* It is not really good, as we throw away already buffered
>> data -                 * TODO have a mean to correctly reenter
>> bufferization */ -                es_out_Control( out, ES_OUT_RESET_PCR );
>> +                    /* It is not really good, as we throw away already
>> buffered data +                     * TODO have a mean to correctly reenter
>> bufferization */ +                    es_out_Control( out, ES_OUT_RESET_PCR
>> );
>> +                }
>>   
>>                   es_out_SetJitter( out, i_pts_delay_base, i_pts_delay -
>> i_pts_delay_base, p_sys->i_cr_average ); }
>> -- 
>> 1.7.9.5
>>
>>    _____
>> From: Rémi Denis-Courmont [mailto:remi at remlab.net]
>> To: Mailing list for VLC media player developers
>> [mailto:vlc-devel at videolan.org] Sent: Thu, 26 Sep 2013 10:03:03 -0400
>> Subject: Re: [vlc-devel] [PATCH] Do not rebuffer if not increasing
>> buffer	size
>>
>> Is there any easy way to test it?



This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
If you are not the intended recipient, please delete this email immediately.




More information about the vlc-devel mailing list