Mercurial > mplayer.hg
annotate libvo/video_out.h @ 23271:85ad4dd0e439
Support theora in mkv. Sample: http://samples.mplayerhq.hu/Matroska/theora.mkv
author | reimar |
---|---|
date | Thu, 10 May 2007 14:01:53 +0000 |
parents | cd659496eafd |
children | cb16042df510 |
rev | line source |
---|---|
1 | 1 /* |
2 * video_out.h | |
3 * | |
4 * Copyright (C) Aaron Holtzman - Aug 1999 | |
31 | 5 * Strongly modified, most parts rewritten: A'rpi/ESP-team - 2000-2001 |
6781 | 6 * (C) MPlayer Developers |
1 | 7 * |
8 */ | |
4933 | 9 |
10 #ifndef __VIDEO_OUT_H | |
11 #define __VIDEO_OUT_H 1 | |
1 | 12 |
13 #include <inttypes.h> | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
14 #include <stdarg.h> |
1 | 15 |
5294 | 16 //#include "font_load.h" |
19431
ac69ba536915
Explicitly include libmpcodecs/img_format.h and libvo/fastmemcpy.h.
diego
parents:
19108
diff
changeset
|
17 #include "libmpcodecs/img_format.h" |
13787
e047e70a9767
Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents:
13091
diff
changeset
|
18 //#include "vidix/vidix.h" |
1 | 19 |
31 | 20 #define VO_EVENT_EXPOSE 1 |
21 #define VO_EVENT_RESIZE 2 | |
22 #define VO_EVENT_KEYPRESS 4 | |
23 | |
7124
eca7dbad0166
finally removed query_vaa, bes_da and vo_tune_info - the obsoleted libvo api
alex
parents:
7069
diff
changeset
|
24 /* Obsolete: VOCTRL_QUERY_VAA 1 */ |
6781 | 25 /* does the device support the required format */ |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
26 #define VOCTRL_QUERY_FORMAT 2 |
4754 | 27 /* signal a device reset seek */ |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
28 #define VOCTRL_RESET 3 |
4618 | 29 /* true if vo driver can use GUI created windows */ |
30 #define VOCTRL_GUISUPPORT 4 | |
7009 | 31 #define VOCTRL_GUI_NOWINDOW 19 |
4731 | 32 /* used to switch to fullscreen */ |
33 #define VOCTRL_FULLSCREEN 5 | |
4738 | 34 #define VOCTRL_SCREENSHOT 6 |
4754 | 35 /* signal a device pause */ |
36 #define VOCTRL_PAUSE 7 | |
37 /* start/resume playback */ | |
38 #define VOCTRL_RESUME 8 | |
4971 | 39 /* libmpcodecs direct rendering: */ |
40 #define VOCTRL_GET_IMAGE 9 | |
5502 | 41 #define VOCTRL_DRAW_IMAGE 13 |
6110 | 42 #define VOCTRL_SET_SPU_PALETTE 14 |
5002 | 43 /* decoding ahead: */ |
44 #define VOCTRL_GET_NUM_FRAMES 10 | |
45 #define VOCTRL_GET_FRAME_NUM 11 | |
46 #define VOCTRL_SET_FRAME_NUM 12 | |
6308 | 47 #define VOCTRL_GET_PANSCAN 15 |
48 #define VOCTRL_SET_PANSCAN 16 | |
6781 | 49 /* equalizer controls */ |
50 #define VOCTRL_SET_EQUALIZER 17 | |
51 #define VOCTRL_GET_EQUALIZER 18 | |
8450 | 52 //#define VOCTRL_GUI_NOWINDOW 19 |
53 /* Frame duplication */ | |
54 #define VOCTRL_DUPLICATE_FRAME 20 | |
55 // ... 21 | |
9560
ae2ce6ebc1fa
Pass start slice to the vo it make dr + slice implemantation easier
albeu
parents:
8450
diff
changeset
|
56 #define VOCTRL_START_SLICE 21 |
7009 | 57 |
11542 | 58 #define VOCTRL_ONTOP 25 |
13091 | 59 #define VOCTRL_ROOTWIN 26 |
16968
e9d849bf8050
add a switch, slave command, and vo control to toggle borderless window.
joey
parents:
16280
diff
changeset
|
60 #define VOCTRL_BORDER 27 |
19576 | 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; | |
11542 | 67 |
20973
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
19576
diff
changeset
|
68 #define VOCTRL_SET_DEINTERLACE 30 |
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
19576
diff
changeset
|
69 #define VOCTRL_GET_DEINTERLACE 31 |
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
19576
diff
changeset
|
70 |
22232 | 71 #define VOCTRL_UPDATE_SCREENINFO 32 |
72 | |
9569
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
73 // Vo can be used by xover |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
74 #define VOCTRL_XOVERLAY_SUPPORT 22 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
75 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
76 #define VOCTRL_XOVERLAY_SET_COLORKEY 24 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
77 typedef struct { |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
78 uint32_t x11; // The raw x11 color |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
79 uint16_t r,g,b; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
80 } mp_colorkey_t; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
81 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
82 #define VOCTRL_XOVERLAY_SET_WIN 23 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
83 typedef struct { |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
84 int x,y; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
85 int w,h; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
86 } mp_win_t; |
6307 | 87 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
88 #define VO_TRUE 1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
89 #define VO_FALSE 0 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
90 #define VO_ERROR -1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
91 #define VO_NOTAVAIL -2 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
92 #define VO_NOTIMPL -3 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
93 |
4736 | 94 #define VOFLAG_FULLSCREEN 0x01 |
95 #define VOFLAG_MODESWITCHING 0x02 | |
96 #define VOFLAG_SWSCALE 0x04 | |
97 #define VOFLAG_FLIPPING 0x08 | |
9569
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
98 #define VOFLAG_XOVERLAY_SUB_VO 0x10000 |
4736 | 99 |
1 | 100 typedef struct vo_info_s |
101 { | |
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; | |
111 | |
112 typedef struct vo_functions_s | |
113 { | |
8148
5b39e79af5fe
removed get_info, using the same sheme as in libmpcodecs instead
alex
parents:
8081
diff
changeset
|
114 vo_info_t *info; |
4352 | 115 /* |
116 * Preinitializes driver (real INITIALIZATION) | |
117 * arg - currently it's vo_subdevice | |
118 * returns: zero on successful initialization, non-zero on error. | |
119 */ | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
120 int (*preinit)(const char *arg); |
1 | 121 /* |
4352 | 122 * Initialize (means CONFIGURE) the display driver. |
31 | 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. | |
1 | 130 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
131 int (*config)(uint32_t width, uint32_t height, uint32_t d_width, |
4433 | 132 uint32_t d_height, uint32_t fullscreen, char *title, |
7124
eca7dbad0166
finally removed query_vaa, bes_da and vo_tune_info - the obsoleted libvo api
alex
parents:
7069
diff
changeset
|
133 uint32_t format); |
1 | 134 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
135 /* |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
136 * Control interface |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
137 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
138 int (*control)(uint32_t request, void *data, ...); |
1 | 139 |
140 /* | |
31 | 141 * Display a new RGB/BGR frame of the video to the screen. |
142 * params: | |
143 * src[0] - pointer to the image | |
1 | 144 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
145 int (*draw_frame)(uint8_t *src[]); |
1 | 146 |
147 /* | |
31 | 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) | |
1 | 154 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
155 int (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); |
1 | 156 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
157 /* |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
158 * Draws OSD to the screen buffer |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
159 */ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
160 void (*draw_osd)(void); |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
161 |
1 | 162 /* |
31 | 163 * Blit/Flip buffer to the screen. Must be called after each frame! |
1 | 164 */ |
165 void (*flip_page)(void); | |
166 | |
31 | 167 /* |
168 * This func is called after every frames to handle keyboard and | |
169 * other events. It's called in PAUSE mode too! | |
170 */ | |
171 void (*check_events)(void); | |
172 | |
173 /* | |
174 * Closes driver. Should restore the original state of the system. | |
175 */ | |
1 | 176 void (*uninit)(void); |
177 | |
178 } vo_functions_t; | |
179 | |
19108
5e767cabf4cd
marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
reynaldo
parents:
18287
diff
changeset
|
180 const char *vo_format_name(int format); |
1326 | 181 int vo_init(void); |
182 | |
7562
92188b57a062
video out driver list support (like -vc, example: -vo xmga,xv,x11,)
arpi
parents:
7539
diff
changeset
|
183 vo_functions_t* init_best_video_out(char** vo_list); |
22232 | 184 int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height, |
185 uint32_t d_width, uint32_t d_height, uint32_t flags, | |
186 char *title, uint32_t format); | |
17566
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
16968
diff
changeset
|
187 void list_video_out(void); |
7562
92188b57a062
video out driver list support (like -vc, example: -vo xmga,xv,x11,)
arpi
parents:
7539
diff
changeset
|
188 |
1 | 189 // NULL terminated array of all drivers |
190 extern vo_functions_t* video_out_drivers[]; | |
191 | |
4811
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
192 extern int vo_flags; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
193 |
5511 | 194 extern int vo_config_count; |
195 | |
18116 | 196 extern int xinerama_screen; |
197 extern int xinerama_x; | |
198 extern int xinerama_y; | |
199 | |
4618 | 200 // correct resolution/bpp on screen: (should be autodetected by vo_init()) |
388 | 201 extern int vo_depthonscreen; |
202 extern int vo_screenwidth; | |
203 extern int vo_screenheight; | |
213 | 204 |
388 | 205 // requested resolution/bpp: (-x -y -bpp options) |
4811
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
206 extern int vo_dx; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
207 extern int vo_dy; |
388 | 208 extern int vo_dwidth; |
209 extern int vo_dheight; | |
210 extern int vo_dbpp; | |
211 | |
7539
56ea9db91251
-nograbpointer, based on old patch by Christian Ohm <chr.ohm@gmx.net>
arpi
parents:
7435
diff
changeset
|
212 extern int vo_grabpointer; |
1268 | 213 extern int vo_doublebuffering; |
5431
013458752947
disabling direct rendering by default (too buggy and conflicts with osd/sub)
arpi
parents:
5294
diff
changeset
|
214 extern int vo_directrendering; |
4667 | 215 extern int vo_vsync; |
4981 | 216 extern int vo_fs; |
1268 | 217 extern int vo_fsmode; |
6304
ee65527096c2
pan&scan support with -vo xv by ?? <mplayer@svennevid.net>
arpi
parents:
6110
diff
changeset
|
218 extern float vo_panscan; |
12021
cd33d1e3b709
move refreshrate and adapter_num variables to video_out because they might be usefull for other drivers, too
faust3
parents:
11542
diff
changeset
|
219 extern int vo_adapter_num; |
cd33d1e3b709
move refreshrate and adapter_num variables to video_out because they might be usefull for other drivers, too
faust3
parents:
11542
diff
changeset
|
220 extern int vo_refresh_rate; |
12371
c000f4c23efd
keepaspect and nokeepaspect are now useable by all vos
faust3
parents:
12021
diff
changeset
|
221 extern int vo_keepaspect; |
12912
1f6bb2356d18
add var vo_rootwin and -rootwin switch for mac osx
nplourde
parents:
12371
diff
changeset
|
222 extern int vo_rootwin; |
16280
7f34acc96aa4
remove extern for variables that are already in headers.
reimar
parents:
16171
diff
changeset
|
223 extern int vo_ontop; |
16968
e9d849bf8050
add a switch, slave command, and vo control to toggle borderless window.
joey
parents:
16280
diff
changeset
|
224 extern int vo_border; |
1268 | 225 |
6755 | 226 extern int vo_gamma_brightness; |
227 extern int vo_gamma_saturation; | |
228 extern int vo_gamma_contrast; | |
229 extern int vo_gamma_hue; | |
230 extern int vo_gamma_red_intensity; | |
231 extern int vo_gamma_green_intensity; | |
232 extern int vo_gamma_blue_intensity; | |
233 | |
10785 | 234 extern int vo_nomouse_input; |
5651
b8d8d72776f2
fix playlist bug with gui and rewrite mousecursor show/hide code
pontscho
parents:
5511
diff
changeset
|
235 |
2707 | 236 extern int vo_pts; |
3201 | 237 extern float vo_fps; |
2707 | 238 |
1184 | 239 extern char *vo_subdevice; |
240 | |
10988 | 241 extern int vo_colorkey; |
242 | |
16280
7f34acc96aa4
remove extern for variables that are already in headers.
reimar
parents:
16171
diff
changeset
|
243 extern int WinID; |
7f34acc96aa4
remove extern for variables that are already in headers.
reimar
parents:
16171
diff
changeset
|
244 |
7069 | 245 #if defined(HAVE_FBDEV)||defined(HAVE_VESA) |
246 | |
247 typedef struct { | |
248 float min; | |
249 float max; | |
250 } range_t; | |
251 | |
252 extern float range_max(range_t *r); | |
253 extern int in_range(range_t *r, float f); | |
254 extern range_t *str2range(char *s); | |
255 extern char *monitor_hfreq_str; | |
256 extern char *monitor_vfreq_str; | |
257 extern char *monitor_dotclock_str; | |
258 | |
259 #endif | |
260 | |
4933 | 261 #endif |