]> git.sesse.net Git - vlc/blob - include/video_decoder.h
* Fonction de d�codage des Blocs MPEG2intra.
[vlc] / include / video_decoder.h
1 /*****************************************************************************
2  * video_decoder.h : video decoder thread
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  *****************************************************************************/
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     vlc_thread_t        thread_id;                /* id for thread functions */
30
31     /* Thread configuration */
32     /* ?? */
33  /*??*/
34 //    int *pi_status;
35     
36     /* Input properties */
37     struct vpar_thread_s *    p_vpar;                 /* video_parser thread */
38         
39     /* Lookup tables */
40 #ifdef MPEG2_COMPLIANT
41     u8              pi_crop_buf[VDEC_CROPRANGE];
42     u8 *            pi_crop,
43 #endif
44
45 #ifdef STATS
46     /* Statistics */
47     count_t         c_loops;                              /* number of loops */
48     count_t         c_idle_loops;                    /* number of idle loops */
49     count_t         c_decoded_pictures;        /* number of pictures decoded */
50     count_t         c_decoded_i_pictures;    /* number of I pictures decoded */
51     count_t         c_decoded_p_pictures;    /* number of P pictures decoded */
52     count_t         c_decoded_b_pictures;    /* number of B pictures decoded */
53 #endif
54 } vdec_thread_t;
55
56 /* Move this somewhere else ASAP !! */
57 #define data_t short
58
59 /*****************************************************************************
60  * Function pointers
61  *****************************************************************************/
62 typedef void (*f_addb_t)( vdec_thread_t*, elem_t*, data_t*, int );
63
64 /*****************************************************************************
65  * Prototypes
66  *****************************************************************************/
67 struct vpar_thread_s;
68
69 /* Thread management functions */
70 vdec_thread_t * vdec_CreateThread       ( struct vpar_thread_s *p_vpar /*, int *pi_status */ );
71 void            vdec_DestroyThread      ( vdec_thread_t *p_vdec /*, int *pi_status */ );
72 void vdec_AddBlock( vdec_thread_t*, elem_t*, data_t*, int );
73 void vdec_CopyBlock( vdec_thread_t*, elem_t*, data_t*, int );
74 void vdec_DummyBlock( vdec_thread_t*, elem_t*, data_t*, int );