]> git.sesse.net Git - vlc/blob - include/video.h
Gestion des touches en GGI (ouf !)
[vlc] / include / video.h
1 /*******************************************************************************
2  * video.h: common video definitions
3  * (c)1999 VideoLAN
4  *******************************************************************************
5  * This header is required by all modules which have to handle pictures. It
6  * includes all common video types and constants.
7  *******************************************************************************
8  * Requires:
9  *  "config.h"
10  *  "common.h"
11  *  "mtime.h"
12  *******************************************************************************/
13
14 /*******************************************************************************
15  * yuv_data_t: type for storing one Y, U or V sample.
16  *******************************************************************************/
17 typedef u8 yuv_data_t;
18
19 /*******************************************************************************
20  * picture_t: video picture                                            
21  *******************************************************************************
22  * Any picture destined to be displayed by a video output thread should be 
23  * stored in this structure from it's creation to it's effective display.
24  * Picture type and flags should only be modified by the output thread. Note
25  * that an empty picture MUST have its flags set to 0.
26  *******************************************************************************/
27 typedef struct
28 {
29     /* Type and flags - should NOT be modified except by the vout thread */
30     int             i_type;                                    /* picture type */
31     int             i_status;                                 /* picture flags */
32     int             i_matrix_coefficients;       /* in YUV type, encoding type */    
33     
34     /* Picture properties - those properties are fixed at initialization and 
35      * should NOT be modified. Note that for YUV pictures, i_bytes_per_line is
36      * the number of bytes for Y samples - the total size allocated will depend
37      * of the picture format */
38     int             i_width;                                  /* picture width */
39     int             i_height;                                /* picture height */
40     int             i_bytes_per_line;        /* total number of bytes per line */
41     
42     /* Link reference counter - it can be modified using vout_Link and 
43      * vout_Unlink functions, or directly if the picture is independant */
44     int             i_refcount;                      /* link reference counter */
45
46     /* Macroblock counter - the decoder use it to verify if it has
47      * decoded all the macroblocks of the picture */
48     int             i_deccount;
49     vlc_mutex_t     lock_deccount;
50     
51     /* Video properties - those properties should not be modified once 
52      * the picture is in a heap, but can be freely modified if it is 
53      * independant */
54     mtime_t         date;                                      /* display date */
55
56     /* Picture data - data can always be freely modified. p_data itself 
57      * (the pointer) should NEVER be modified. In YUV format, the p_y, p_u and
58      * p_v data pointers refers to different areas of p_data, and should not
59      * be freed */   
60     void *          p_data;                                    /* picture data */
61     yuv_data_t *    p_y;          /* pointer to beginning of Y image in p_data */
62     yuv_data_t *    p_u;          /* pointer to beginning of U image in p_data */
63     yuv_data_t *    p_v;          /* pointer to beginning of V image in p_data */
64 } picture_t;
65
66
67 /* Pictures types */
68 #define EMPTY_PICTURE           0       /* picture slot is empty and available */
69 #define YUV_420_PICTURE         100                       /* 4:2:0 YUV picture */
70 #define YUV_422_PICTURE         101                       /* 4:2:2 YUV picture */
71 #define YUV_444_PICTURE         102                       /* 4:4:4 YUV picture */
72
73 /* Pictures status */
74 #define FREE_PICTURE            0         /* picture is free and not allocated */
75 #define RESERVED_PICTURE        1         /* picture is allocated and reserved */
76 #define READY_PICTURE           2              /* picture is ready for display */
77 #define DISPLAYED_PICTURE       3  /* picture has been displayed but is linked */
78 #define DESTROYED_PICTURE       4     /* picture is allocated but no more used */
79
80
81
82
83
84
85
86