]> git.sesse.net Git - vlc/blob - include/video_output.h
GGI fonctionnel. N'oubliez pas de d�finit GII_INPUT.
[vlc] / include / video_output.h
1 /*******************************************************************************
2  * video_output.h : video output thread
3  * (c)1999 VideoLAN
4  *******************************************************************************
5  * This module describes the programming interface for video output threads.
6  * It includes functions allowing to open a new thread, send pictures to a
7  * thread, and destroy a previously oppenned video output thread.
8  *******************************************************************************/
9
10 /*******************************************************************************
11  * vout_thread_t: video output thread descriptor
12  *******************************************************************************
13  * Any independant video output device, such as an X11 window or a GGI device,
14  * is represented by a video output thread, and described using following 
15  * structure.
16  *******************************************************************************/
17 typedef struct vout_thread_s
18 {
19     /* Thread properties and locks */
20     boolean_t           b_die;                                   /* `die' flag */
21     boolean_t           b_error;                               /* `error' flag */
22     boolean_t           b_active;                             /* `active' flag */
23     pthread_t           thread_id;                 /* id for pthread functions */
24     pthread_mutex_t     lock;                                   /* thread lock */
25     int *               pi_status;                    /* temporary status flag */
26
27     /* Common display properties */
28     int                 i_width;                /* current output method width */
29     int                 i_height;              /* current output method height */
30     int                 i_screen_depth;                      /* bits per pixel */
31     int                 i_bytes_per_pixel;                /* real screen depth */
32     float               f_x_ratio;                 /* horizontal display ratio */
33     float               f_y_ratio;                   /* vertical display ratio */
34
35 #ifdef STATS    
36     /* Statistics */
37     count_t         c_loops;                               /* number of loops */
38     count_t         c_idle_loops;                     /* number of idle loops */
39     count_t         c_pictures;           /* number of pictures added to heap */
40 #endif
41
42     /* Output method */
43     p_vout_sys_t        p_sys;                         /* system output method */
44
45     /* Video heap */
46     int                 i_pictures;                       /* current heap size */
47     picture_t           p_picture[VOUT_MAX_PICTURES];              /* pictures */
48
49     /* YUV translation tables, for 15,16 and 24/32 bpp displays. 16 bits and 32
50      * bits pointers points on the same data.
51      * CAUTION: these tables are translated: their origin is -384 */
52     u16 *           pi_trans16_red;
53     u16 *           pi_trans16_green;
54     u16 *           pi_trans16_blue;
55     u32 *           pi_trans32_red;
56     u32 *           pi_trans32_green;
57     u32 *           pi_trans32_blue;          
58 } vout_thread_t;
59
60 /*******************************************************************************
61  * Prototypes
62  *******************************************************************************/
63 vout_thread_t * vout_CreateThread               ( 
64 #ifdef VIDEO_X11
65                                                   char *psz_display, Window root_window, 
66 #endif
67                                                   int i_width, int i_height, int *pi_status
68                                                 );
69
70 void            vout_DestroyThread              ( vout_thread_t *p_vout, int *pi_status );
71
72 picture_t *     vout_CreatePicture              ( vout_thread_t *p_vout, int i_type, 
73                                                   int i_width, int i_height, int i_bytes_per_line );
74 void            vout_DestroyPicture             ( vout_thread_t *p_vout, picture_t *p_pic );
75 void            vout_DisplayPicture             ( vout_thread_t *p_vout, picture_t *p_pic );
76 void            vout_LinkPicture                ( vout_thread_t *p_vout, picture_t *p_pic );
77 void            vout_UnlinkPicture              ( vout_thread_t *p_vout, picture_t *p_pic );
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94