[vlc-devel] Question of pts delay and clock jitter testing
David R. Robison
david.robison at openroadsconsulting.com
Tue Jan 20 20:19:08 CET 2015
In the EsOutControlLocked funtion in src/input/es_out.c there is a check
to see if the pts delay is greater than a configured clock jitter amount:
const mtime_t i_jitter_max = INT64_C(1000) * var_InheritInteger(
p_sys->p_input, "clock-jitter" );
if( i_pts_delay > __MIN( i_pts_delay_base + i_jitter_max,
INPUT_PTS_DELAY_MAX ) )
{
msg_Err( p_sys->p_input,
"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 */
/* 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 );
}
I may be confused, but should the conditional be reversed? Should the
jitter be ignored if the i_pts_delay is less than __MIN(
i_pts_delay_base + i_jitter_max, INPUT_PTS_DELAY_MAX ) rather than
greater than?
David
--
----------------------------------------------------------------------------
David R Robison
*Principal Systems Engineer*
+1 757 546 3401 (o)
+1 757 286 0022 (m)
david.robison at openroadsconsulting.com
<mailto:david.robison at openroadsconsulting.com>
www.openroadsconsulting.com
----------------------------------------------------------------------------
Open Roads Consulting
A Q-Free Company
103 Watson Rd. Chesapeake VA 23320
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150120/be877624/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orci-qfree.png
Type: image/png
Size: 8284 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150120/be877624/attachment.png>
More information about the vlc-devel
mailing list