]> git.sesse.net Git - vlc/blob - include/video_decoder.h
Initial revision
[vlc] / include / video_decoder.h
1 /*******************************************************************************
2  * video_decoder.h : video decoder thread
3  * (c)1999 VideoLAN
4  *******************************************************************************
5  *******************************************************************************
6  * Requires:
7  *  <pthread.h>
8  *  "config.h"
9  *  "common.h"
10  *  "mtime.h"
11  *  "input.h"
12  *  "video.h"
13  *  "video_output.h"
14  *  "decoder_fifo.h"
15  *******************************************************************************/
16
17 /*******************************************************************************
18  * vdec_thread_t: video decoder thread descriptor
19  *******************************************************************************
20  * ??
21  *******************************************************************************/
22 typedef struct vdec_thread_s
23 {
24     /* Thread properties and locks */
25     boolean_t           b_die;                                   /* `die' flag */
26     boolean_t           b_run;                                   /* `run' flag */
27     boolean_t           b_error;                               /* `error' flag */
28     boolean_t           b_active;                             /* `active' flag */
29     pthread_t           thread_id;                 /* id for pthread functions */
30
31     /* Thread configuration */
32     /* ?? */
33  /*??*/
34     int *pi_status;
35     
36
37     /* Input properties */
38     input_thread_t *    p_input;                               /* input thread */
39     decoder_fifo_t      fifo;                                /* PES input fifo */
40
41     /* Output properties */
42     vout_thread_t *     p_vout;                         /* video output thread */
43     int                 i_stream;                           /* video stream id */
44     
45         
46 #ifdef STATS
47     /* Statistics */
48     count_t         c_loops;                               /* number of loops */
49     count_t         c_idle_loops;                     /* number of idle loops */
50     count_t         c_pictures;                    /* number of pictures read */
51     count_t         c_i_pictures;                /* number of I pictures read */
52     count_t         c_p_pictures;                /* number of P pictures read */
53     count_t         c_b_pictures;                /* number of B pictures read */    
54     count_t         c_decoded_pictures;         /* number of pictures decoded */
55     count_t         c_decoded_i_pictures;     /* number of I pictures decoded */
56     count_t         c_decoded_p_pictures;     /* number of P pictures decoded */
57     count_t         c_decoded_b_pictures;     /* number of B pictures decoded */
58 #endif
59 } vdec_thread_t;
60
61 /*******************************************************************************
62  * Prototypes
63  *******************************************************************************/
64
65 /* Thread management functions */
66 vdec_thread_t * vdec_CreateThread       ( video_cfg_t *p_cfg, input_thread_t *p_input,
67                                           vout_thread_t *p_vout, int *pi_status );
68 void             vdec_DestroyThread      ( vdec_thread_t *p_vdec, int *pi_status );
69
70 /* Time management functions */
71 /* ?? */
72
73 /* Dynamic thread settings */
74 /* ?? */