]> git.sesse.net Git - vlc/blob - src/input/input_pcr.h
8c25582ca07e76a93603fff04c597958b8eaa245
[vlc] / src / input / input_pcr.h
1 /*****************************************************************************
2  * input_pcr.h: PCR management interface
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  *
6  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
7  *
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.
12  * 
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.
17  *
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  *****************************************************************************/
22
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
28
29 /* Maximum gap allowed between two PCRs. */
30 #define PCR_MAX_GAP 1000000
31
32 /* synchro states */
33 #define SYNCHRO_NOT_STARTED 1
34 #define SYNCHRO_START       2
35 #define SYNCHRO_REINIT      3
36
37 /*****************************************************************************
38  * Prototypes
39  *****************************************************************************/
40 int            input_PcrInit        ( input_thread_t *p_input );
41 void           input_PcrDecode      ( input_thread_t *p_input, es_descriptor_t* p_es,
42                                        u8* p_pcr_data );
43 void           input_PcrEnd         ( input_thread_t *p_input );