]> git.sesse.net Git - vlc/blob - include/vpar_synchro.h
96c346171bcc298b5f139dbe5b646f5a8ec5a179
[vlc] / include / vpar_synchro.h
1 /*****************************************************************************
2  * vpar_synchro.h : video parser blocks management
3  * (c)1999 VideoLAN
4  *****************************************************************************
5  *****************************************************************************
6  * Requires:
7  *  "config.h"
8  *  "common.h"
9  *  "mtime.h"
10  *  "vlc_thread.h"
11  *  "input.h"
12  *  "video.h"
13  *  "video_output.h"
14  *  "decoder_fifo.h"
15  *  "video_fifo.h"
16  *****************************************************************************/
17
18 /*****************************************************************************
19  * video_synchro_t and video_synchro_tab_s : timers for the video synchro
20  *****************************************************************************/
21 typedef struct video_synchro_tab_s
22 {
23     double mean;
24     double deviation;
25     
26 } video_synchro_tab_t;
27
28 typedef struct video_synchro_s
29 {
30     int modulo;
31
32     /* P images since the last I */
33     int current_p_count;
34     double p_count_predict;
35     /* B images since the last I */
36     int current_b_count;
37     double b_count_predict;
38
39     /* 1 for linear count, 2 for binary count, 3 for ternary count */
40     video_synchro_tab_t tab_p[6];
41     video_synchro_tab_t tab_b[6];
42
43 } video_synchro_t;
44
45 /*****************************************************************************
46  * Prototypes
47  *****************************************************************************/
48 boolean_t vpar_SynchroChoose( struct vpar_thread_s * p_vpar, int i_coding_type, 
49                          int i_structure );
50 void vpar_SynchroTrash( struct vpar_thread_s * p_vpar, int i_coding_type,
51                         int i_structure );
52 void vpar_SynchroDecode( struct vpar_thread_s * p_vpar, int i_coding_type,
53                             int i_structure );
54 void vpar_SynchroEnd( struct vpar_thread_s * p_vpar );
55 mtime_t vpar_SynchroDate( struct vpar_thread_s * p_vpar );