Replace some Hungarian comments, thanks to Denes Balatoni for the translation.
[mplayer/greg.git] / libvo / video_out.h
blob7bfc2e0bb7a2e610ebdcc9703e64f762c3e16c2c
1 /*
2 * video_out.h
4 * Copyright (C) Aaron Holtzman - Aug 1999
5 * Strongly modified, most parts rewritten: A'rpi/ESP-team - 2000-2001
6 * (C) MPlayer Developers
8 */
10 #ifndef VIDEO_OUT_H
11 #define VIDEO_OUT_H
13 #include <inttypes.h>
14 #include <stdarg.h>
16 //#include "font_load.h"
17 #include "libmpcodecs/img_format.h"
18 //#include "vidix/vidix.h"
20 #define VO_EVENT_EXPOSE 1
21 #define VO_EVENT_RESIZE 2
22 #define VO_EVENT_KEYPRESS 4
24 /* Obsolete: VOCTRL_QUERY_VAA 1 */
25 /* does the device support the required format */
26 #define VOCTRL_QUERY_FORMAT 2
27 /* signal a device reset seek */
28 #define VOCTRL_RESET 3
29 /* true if vo driver can use GUI created windows */
30 #define VOCTRL_GUISUPPORT 4
31 #define VOCTRL_GUI_NOWINDOW 19
32 /* used to switch to fullscreen */
33 #define VOCTRL_FULLSCREEN 5
34 #define VOCTRL_SCREENSHOT 6
35 /* signal a device pause */
36 #define VOCTRL_PAUSE 7
37 /* start/resume playback */
38 #define VOCTRL_RESUME 8
39 /* libmpcodecs direct rendering: */
40 #define VOCTRL_GET_IMAGE 9
41 #define VOCTRL_DRAW_IMAGE 13
42 #define VOCTRL_SET_SPU_PALETTE 14
43 /* decoding ahead: */
44 #define VOCTRL_GET_NUM_FRAMES 10
45 #define VOCTRL_GET_FRAME_NUM 11
46 #define VOCTRL_SET_FRAME_NUM 12
47 #define VOCTRL_GET_PANSCAN 15
48 #define VOCTRL_SET_PANSCAN 16
49 /* equalizer controls */
50 #define VOCTRL_SET_EQUALIZER 17
51 #define VOCTRL_GET_EQUALIZER 18
52 //#define VOCTRL_GUI_NOWINDOW 19
53 /* Frame duplication */
54 #define VOCTRL_DUPLICATE_FRAME 20
55 // ... 21
56 #define VOCTRL_START_SLICE 21
58 #define VOCTRL_ONTOP 25
59 #define VOCTRL_ROOTWIN 26
60 #define VOCTRL_BORDER 27
61 #define VOCTRL_DRAW_EOSD 28
62 #define VOCTRL_GET_EOSD_RES 29
63 typedef struct {
64 int w, h; // screen dimensions, including black borders
65 int mt, mb, ml, mr; // borders (top, bottom, left, right)
66 } mp_eosd_res_t;
68 #define VOCTRL_SET_DEINTERLACE 30
69 #define VOCTRL_GET_DEINTERLACE 31
71 #define VOCTRL_UPDATE_SCREENINFO 32
73 // Vo can be used by xover
74 #define VOCTRL_XOVERLAY_SUPPORT 22
76 #define VOCTRL_XOVERLAY_SET_COLORKEY 24
77 typedef struct {
78 uint32_t x11; // The raw x11 color
79 uint16_t r,g,b;
80 } mp_colorkey_t;
82 #define VOCTRL_XOVERLAY_SET_WIN 23
83 typedef struct {
84 int x,y;
85 int w,h;
86 } mp_win_t;
88 #define VO_TRUE 1
89 #define VO_FALSE 0
90 #define VO_ERROR -1
91 #define VO_NOTAVAIL -2
92 #define VO_NOTIMPL -3
94 #define VOFLAG_FULLSCREEN 0x01
95 #define VOFLAG_MODESWITCHING 0x02
96 #define VOFLAG_SWSCALE 0x04
97 #define VOFLAG_FLIPPING 0x08
98 #define VOFLAG_XOVERLAY_SUB_VO 0x10000
100 typedef struct vo_info_s
102 /* driver name ("Matrox Millennium G200/G400" */
103 const char *name;
104 /* short name (for config strings) ("mga") */
105 const char *short_name;
106 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
107 const char *author;
108 /* any additional comments */
109 const char *comment;
110 } vo_info_t;
112 typedef struct vo_functions_s
114 vo_info_t *info;
116 * Preinitializes driver (real INITIALIZATION)
117 * arg - currently it's vo_subdevice
118 * returns: zero on successful initialization, non-zero on error.
120 int (*preinit)(const char *arg);
122 * Initialize (means CONFIGURE) the display driver.
123 * params:
124 * width,height: image source size
125 * d_width,d_height: size of the requested window size, just a hint
126 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint
127 * title: window title, if available
128 * format: fourcc of pixel format
129 * returns : zero on successful initialization, non-zero on error.
131 int (*config)(uint32_t width, uint32_t height, uint32_t d_width,
132 uint32_t d_height, uint32_t fullscreen, char *title,
133 uint32_t format);
136 * Control interface
138 int (*control)(uint32_t request, void *data, ...);
141 * Display a new RGB/BGR frame of the video to the screen.
142 * params:
143 * src[0] - pointer to the image
145 int (*draw_frame)(uint8_t *src[]);
148 * Draw a planar YUV slice to the buffer:
149 * params:
150 * src[3] = source image planes (Y,U,V)
151 * stride[3] = source image planes line widths (in bytes)
152 * w,h = width*height of area to be copied (in Y pixels)
153 * x,y = position at the destination image (in Y pixels)
155 int (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
158 * Draws OSD to the screen buffer
160 void (*draw_osd)(void);
163 * Blit/Flip buffer to the screen. Must be called after each frame!
165 void (*flip_page)(void);
168 * This func is called after every frames to handle keyboard and
169 * other events. It's called in PAUSE mode too!
171 void (*check_events)(void);
174 * Closes driver. Should restore the original state of the system.
176 void (*uninit)(void);
178 } vo_functions_t;
180 vo_functions_t* init_best_video_out(char** vo_list);
181 int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height,
182 uint32_t d_width, uint32_t d_height, uint32_t flags,
183 char *title, uint32_t format);
184 void list_video_out(void);
186 // NULL terminated array of all drivers
187 extern vo_functions_t* video_out_drivers[];
189 extern int vo_flags;
191 extern int vo_config_count;
193 extern int xinerama_screen;
194 extern int xinerama_x;
195 extern int xinerama_y;
197 // correct resolution/bpp on screen: (should be autodetected by vo_init())
198 extern int vo_depthonscreen;
199 extern int vo_screenwidth;
200 extern int vo_screenheight;
202 // requested resolution/bpp: (-x -y -bpp options)
203 extern int vo_dx;
204 extern int vo_dy;
205 extern int vo_dwidth;
206 extern int vo_dheight;
207 extern int vo_dbpp;
209 extern int vo_grabpointer;
210 extern int vo_doublebuffering;
211 extern int vo_directrendering;
212 extern int vo_vsync;
213 extern int vo_fs;
214 extern int vo_fsmode;
215 extern float vo_panscan;
216 extern int vo_adapter_num;
217 extern int vo_refresh_rate;
218 extern int vo_keepaspect;
219 extern int vo_rootwin;
220 extern int vo_ontop;
221 extern int vo_border;
223 extern int vo_gamma_gamma;
224 extern int vo_gamma_brightness;
225 extern int vo_gamma_saturation;
226 extern int vo_gamma_contrast;
227 extern int vo_gamma_hue;
228 extern int vo_gamma_red_intensity;
229 extern int vo_gamma_green_intensity;
230 extern int vo_gamma_blue_intensity;
232 extern int vo_nomouse_input;
234 extern int vo_pts;
235 extern float vo_fps;
237 extern char *vo_subdevice;
239 extern int vo_colorkey;
241 extern int WinID;
243 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
245 typedef struct {
246 float min;
247 float max;
248 } range_t;
250 extern float range_max(range_t *r);
251 extern int in_range(range_t *r, float f);
252 extern range_t *str2range(char *s);
253 extern char *monitor_hfreq_str;
254 extern char *monitor_vfreq_str;
255 extern char *monitor_dotclock_str;
257 #endif
259 #endif