Document lmin and lmax lavcopts; mpeg vrc_buf_size values
[mplayer/greg.git] / libvo / video_out.h
blobdc0ff6997e56cf2dfacc14d7b3650e324a703dcb
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 1
13 #include <inttypes.h>
14 #include <stdarg.h>
16 //#include "font_load.h"
17 #include "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 // Vo can be used by xover
59 #define VOCTRL_XOVERLAY_SUPPORT 22
61 #define VOCTRL_XOVERLAY_SET_COLORKEY 24
62 typedef struct {
63 uint32_t x11; // The raw x11 color
64 uint16_t r,g,b;
65 } mp_colorkey_t;
67 #define VOCTRL_XOVERLAY_SET_WIN 23
68 typedef struct {
69 int x,y;
70 int w,h;
71 } mp_win_t;
73 #define VO_TRUE 1
74 #define VO_FALSE 0
75 #define VO_ERROR -1
76 #define VO_NOTAVAIL -2
77 #define VO_NOTIMPL -3
79 #define VOFLAG_FULLSCREEN 0x01
80 #define VOFLAG_MODESWITCHING 0x02
81 #define VOFLAG_SWSCALE 0x04
82 #define VOFLAG_FLIPPING 0x08
83 #define VOFLAG_XOVERLAY_SUB_VO 0x10000
85 typedef struct vo_info_s
87 /* driver name ("Matrox Millennium G200/G400" */
88 const char *name;
89 /* short name (for config strings) ("mga") */
90 const char *short_name;
91 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
92 const char *author;
93 /* any additional comments */
94 const char *comment;
95 } vo_info_t;
97 typedef struct vo_functions_s
99 vo_info_t *info;
101 * Preinitializes driver (real INITIALIZATION)
102 * arg - currently it's vo_subdevice
103 * returns: zero on successful initialization, non-zero on error.
105 uint32_t (*preinit)(const char *arg);
107 * Initialize (means CONFIGURE) the display driver.
108 * params:
109 * width,height: image source size
110 * d_width,d_height: size of the requested window size, just a hint
111 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint
112 * title: window title, if available
113 * format: fourcc of pixel format
114 * returns : zero on successful initialization, non-zero on error.
116 uint32_t (*config)(uint32_t width, uint32_t height, uint32_t d_width,
117 uint32_t d_height, uint32_t fullscreen, char *title,
118 uint32_t format);
121 * Control interface
123 uint32_t (*control)(uint32_t request, void *data, ...);
126 * Display a new RGB/BGR frame of the video to the screen.
127 * params:
128 * src[0] - pointer to the image
130 uint32_t (*draw_frame)(uint8_t *src[]);
133 * Draw a planar YUV slice to the buffer:
134 * params:
135 * src[3] = source image planes (Y,U,V)
136 * stride[3] = source image planes line widths (in bytes)
137 * w,h = width*height of area to be copied (in Y pixels)
138 * x,y = position at the destination image (in Y pixels)
140 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
143 * Draws OSD to the screen buffer
145 void (*draw_osd)(void);
148 * Blit/Flip buffer to the screen. Must be called after each frame!
150 void (*flip_page)(void);
153 * This func is called after every frames to handle keyboard and
154 * other events. It's called in PAUSE mode too!
156 void (*check_events)(void);
159 * Closes driver. Should restore the original state of the system.
161 void (*uninit)(void);
163 } vo_functions_t;
165 char *vo_format_name(int format);
166 int vo_init(void);
168 vo_functions_t* init_best_video_out(char** vo_list);
169 void list_video_out();
171 // NULL terminated array of all drivers
172 extern vo_functions_t* video_out_drivers[];
174 extern int vo_flags;
176 extern int vo_config_count;
178 // correct resolution/bpp on screen: (should be autodetected by vo_init())
179 extern int vo_depthonscreen;
180 extern int vo_screenwidth;
181 extern int vo_screenheight;
183 // requested resolution/bpp: (-x -y -bpp options)
184 extern int vo_dx;
185 extern int vo_dy;
186 extern int vo_dwidth;
187 extern int vo_dheight;
188 extern int vo_dbpp;
190 extern int vo_grabpointer;
191 extern int vo_doublebuffering;
192 extern int vo_directrendering;
193 extern int vo_vsync;
194 extern int vo_fs;
195 extern int vo_fsmode;
196 extern float vo_panscan;
198 extern int vo_gamma_brightness;
199 extern int vo_gamma_saturation;
200 extern int vo_gamma_contrast;
201 extern int vo_gamma_hue;
202 extern int vo_gamma_red_intensity;
203 extern int vo_gamma_green_intensity;
204 extern int vo_gamma_blue_intensity;
206 extern int vo_mouse_timer_const;
207 extern int vo_nomouse_input;
209 extern int vo_pts;
210 extern float vo_fps;
212 extern char *vo_subdevice;
214 extern int vo_colorkey;
216 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)
218 typedef struct {
219 float min;
220 float max;
221 } range_t;
223 extern float range_max(range_t *r);
224 extern int in_range(range_t *r, float f);
225 extern range_t *str2range(char *s);
226 extern char *monitor_hfreq_str;
227 extern char *monitor_vfreq_str;
228 extern char *monitor_dotclock_str;
230 #endif
232 #endif