]> git.sesse.net Git - vlc/blob - include/video_output.h
Gestion des touches en GGI (ouf !)
[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     boolean_t           b_info;              /* print additionnal informations */    
29     boolean_t           b_grayscale;             /* color or grayscale display */    
30     int                 i_width;                /* current output method width */
31     int                 i_height;              /* current output method height */
32     int                 i_bytes_per_line;/* bytes per line (including virtual) */    
33     int                 i_screen_depth;                      /* bits per pixel */
34     int                 i_bytes_per_pixel;                /* real screen depth */
35     float               f_x_ratio;                 /* horizontal display ratio */
36     float               f_y_ratio;                   /* vertical display ratio */
37     float               f_gamma;                                      /* gamma */    
38
39     /* Changed properties values - some of them are treated directly by the
40      * thread, the over may be ignored or handled by vout_SysManage */
41     boolean_t           b_gamma_change;              /* gamma change indicator */    
42     int                 i_new_width;                              /* new width */    
43     int                 i_new_height;                            /* new height */    
44
45 #ifdef STATS    
46     /* Statistics - these numbers are not supposed to be accurate */
47     count_t             c_loops;                            /* number of loops */
48     count_t             c_idle_loops;                  /* number of idle loops */
49     count_t             c_fps_samples;                       /* picture counts */    
50     mtime_t             fps_sample[ VOUT_FPS_SAMPLES ];   /* FPS samples dates */
51 #endif
52
53 #ifdef DEBUG_VIDEO
54     /* Video debugging informations */
55     mtime_t             picture_render_time;    /* last picture rendering time */
56 #endif
57
58     /* Output method */
59     p_vout_sys_t        p_sys;                         /* system output method */
60
61     /* Video heap */
62     picture_t           p_picture[VOUT_MAX_PICTURES];              /* pictures */
63
64     /* YUV translation tables - they have to be casted to the appropriate width 
65      * on use. All tables are allocated in the same memory block, based at
66      * p_trans_base, and shifted depending of the output thread configuration */
67     byte_t *            p_trans_base;       /* base for all translation tables */    
68     void *              p_trans_red;                            /* regular red */
69     void *              p_trans_green;                        /* regular green */
70     void *              p_trans_blue;                          /* regular blue */
71     void *              p_trans_gray;                          /* regular gray */
72     void *              p_trans_optimized;           /* optimized (all colors) */
73 } vout_thread_t;
74
75 /*******************************************************************************
76  * Prototypes
77  *******************************************************************************/
78 vout_thread_t * vout_CreateThread               ( 
79 #ifdef VIDEO_X11
80                                                   char *psz_display, Window root_window, 
81 #endif
82                                                   int i_width, int i_height, int *pi_status
83                                                 );
84
85 void            vout_DestroyThread              ( vout_thread_t *p_vout, int *pi_status );
86
87 picture_t *     vout_CreatePicture              ( vout_thread_t *p_vout, int i_type, 
88                                                   int i_width, int i_height, int i_bytes_per_line );
89 void            vout_DestroyPicture             ( vout_thread_t *p_vout, picture_t *p_pic );
90 void            vout_DisplayPicture             ( vout_thread_t *p_vout, picture_t *p_pic );
91 void            vout_LinkPicture                ( vout_thread_t *p_vout, picture_t *p_pic );
92 void            vout_UnlinkPicture              ( vout_thread_t *p_vout, picture_t *p_pic );
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109