1 /*****************************************************************************
2 * input_pcr.h: PCR management interface
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
6 * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
21 *****************************************************************************/
23 /* Maximum number of samples used to compute the dynamic average value,
24 * it is also the maximum of c_average in the pcr_descriptor_struct.
25 * We use the following formula :
26 * new_average = (old_average * c_average + new_sample_value) / (c_average +1) */
27 #define PCR_MAX_AVERAGE_COUNTER 40
29 /* Maximum gap allowed between two PCRs. */
30 #define PCR_MAX_GAP 1000000
33 #define SYNCHRO_NOT_STARTED 1
34 #define SYNCHRO_START 2
35 #define SYNCHRO_REINIT 3
37 /*****************************************************************************
39 *****************************************************************************/
40 int input_PcrInit ( input_thread_t *p_input );
41 void input_PcrDecode ( input_thread_t *p_input, es_descriptor_t* p_es,
43 void input_PcrEnd ( input_thread_t *p_input );