Mercurial > mplayer.hg
annotate libvo/video_out.h @ 25978:a8ff60976ccb
FLAT objects cannot have multiple sections, so using the L1 attributes breaks
linking. The FDPIC relocs also break for any other format. Thus check the
compiler environment and select the appropriate sections/relocs.
patch by Mike Frysinger, vapier.adi a gmail d com
author | diego |
---|---|
date | Sat, 16 Feb 2008 15:17:59 +0000 |
parents | 88e8649d97e0 |
children | 4129c8cfa742 |
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 |
23689
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
23605
diff
changeset
|
10 #ifndef VIDEO_OUT_H |
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
23605
diff
changeset
|
11 #define VIDEO_OUT_H |
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 | |
4754 | 34 /* signal a device pause */ |
35 #define VOCTRL_PAUSE 7 | |
36 /* start/resume playback */ | |
37 #define VOCTRL_RESUME 8 | |
4971 | 38 /* libmpcodecs direct rendering: */ |
39 #define VOCTRL_GET_IMAGE 9 | |
5502 | 40 #define VOCTRL_DRAW_IMAGE 13 |
6110 | 41 #define VOCTRL_SET_SPU_PALETTE 14 |
5002 | 42 /* decoding ahead: */ |
43 #define VOCTRL_GET_NUM_FRAMES 10 | |
44 #define VOCTRL_GET_FRAME_NUM 11 | |
45 #define VOCTRL_SET_FRAME_NUM 12 | |
6308 | 46 #define VOCTRL_GET_PANSCAN 15 |
47 #define VOCTRL_SET_PANSCAN 16 | |
6781 | 48 /* equalizer controls */ |
49 #define VOCTRL_SET_EQUALIZER 17 | |
50 #define VOCTRL_GET_EQUALIZER 18 | |
8450 | 51 //#define VOCTRL_GUI_NOWINDOW 19 |
52 /* Frame duplication */ | |
53 #define VOCTRL_DUPLICATE_FRAME 20 | |
54 // ... 21 | |
9560
ae2ce6ebc1fa
Pass start slice to the vo it make dr + slice implemantation easier
albeu
parents:
8450
diff
changeset
|
55 #define VOCTRL_START_SLICE 21 |
7009 | 56 |
11542 | 57 #define VOCTRL_ONTOP 25 |
13091 | 58 #define VOCTRL_ROOTWIN 26 |
16968
e9d849bf8050
add a switch, slave command, and vo control to toggle borderless window.
joey
parents:
16280
diff
changeset
|
59 #define VOCTRL_BORDER 27 |
19576 | 60 #define VOCTRL_DRAW_EOSD 28 |
61 #define VOCTRL_GET_EOSD_RES 29 | |
62 typedef struct { | |
63 int w, h; // screen dimensions, including black borders | |
64 int mt, mb, ml, mr; // borders (top, bottom, left, right) | |
65 } mp_eosd_res_t; | |
11542 | 66 |
20973
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
19576
diff
changeset
|
67 #define VOCTRL_SET_DEINTERLACE 30 |
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
19576
diff
changeset
|
68 #define VOCTRL_GET_DEINTERLACE 31 |
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
19576
diff
changeset
|
69 |
22232 | 70 #define VOCTRL_UPDATE_SCREENINFO 32 |
71 | |
9569
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
72 // 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
|
73 #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
|
74 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
75 #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
|
76 typedef struct { |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
77 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
|
78 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
|
79 } mp_colorkey_t; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
80 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
81 #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
|
82 typedef struct { |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
83 int x,y; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
84 int w,h; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
85 } mp_win_t; |
6307 | 86 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
87 #define VO_TRUE 1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
88 #define VO_FALSE 0 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
89 #define VO_ERROR -1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
90 #define VO_NOTAVAIL -2 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
91 #define VO_NOTIMPL -3 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
92 |
4736 | 93 #define VOFLAG_FULLSCREEN 0x01 |
94 #define VOFLAG_MODESWITCHING 0x02 | |
95 #define VOFLAG_SWSCALE 0x04 | |
96 #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
|
97 #define VOFLAG_XOVERLAY_SUB_VO 0x10000 |
4736 | 98 |
1 | 99 typedef struct vo_info_s |
100 { | |
101 /* driver name ("Matrox Millennium G200/G400" */ | |
102 const char *name; | |
103 /* short name (for config strings) ("mga") */ | |
104 const char *short_name; | |
105 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */ | |
106 const char *author; | |
107 /* any additional comments */ | |
108 const char *comment; | |
109 } vo_info_t; | |
110 | |
111 typedef struct vo_functions_s | |
112 { | |
25216 | 113 const vo_info_t *info; |
4352 | 114 /* |
115 * Preinitializes driver (real INITIALIZATION) | |
116 * arg - currently it's vo_subdevice | |
117 * returns: zero on successful initialization, non-zero on error. | |
118 */ | |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
119 int (*preinit)(const char *arg); |
1 | 120 /* |
4352 | 121 * Initialize (means CONFIGURE) the display driver. |
31 | 122 * params: |
123 * width,height: image source size | |
124 * d_width,d_height: size of the requested window size, just a hint | |
125 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint | |
126 * title: window title, if available | |
127 * format: fourcc of pixel format | |
128 * returns : zero on successful initialization, non-zero on error. | |
1 | 129 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
130 int (*config)(uint32_t width, uint32_t height, uint32_t d_width, |
4433 | 131 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
|
132 uint32_t format); |
1 | 133 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
134 /* |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
135 * Control interface |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
136 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
137 int (*control)(uint32_t request, void *data, ...); |
1 | 138 |
139 /* | |
31 | 140 * Display a new RGB/BGR frame of the video to the screen. |
141 * params: | |
142 * src[0] - pointer to the image | |
1 | 143 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
144 int (*draw_frame)(uint8_t *src[]); |
1 | 145 |
146 /* | |
31 | 147 * Draw a planar YUV slice to the buffer: |
148 * params: | |
149 * src[3] = source image planes (Y,U,V) | |
150 * stride[3] = source image planes line widths (in bytes) | |
151 * w,h = width*height of area to be copied (in Y pixels) | |
152 * x,y = position at the destination image (in Y pixels) | |
1 | 153 */ |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
13787
diff
changeset
|
154 int (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); |
1 | 155 |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
156 /* |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
157 * Draws OSD to the screen buffer |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
158 */ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
159 void (*draw_osd)(void); |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
160 |
1 | 161 /* |
31 | 162 * Blit/Flip buffer to the screen. Must be called after each frame! |
1 | 163 */ |
164 void (*flip_page)(void); | |
165 | |
31 | 166 /* |
167 * This func is called after every frames to handle keyboard and | |
168 * other events. It's called in PAUSE mode too! | |
169 */ | |
170 void (*check_events)(void); | |
171 | |
172 /* | |
173 * Closes driver. Should restore the original state of the system. | |
174 */ | |
1 | 175 void (*uninit)(void); |
176 | |
177 } vo_functions_t; | |
178 | |
25219
e82ecde2cbd4
Mark several uses of vo_functions_t as const to stop some of the current
reimar
parents:
25216
diff
changeset
|
179 const vo_functions_t* init_best_video_out(char** vo_list); |
e82ecde2cbd4
Mark several uses of vo_functions_t as const to stop some of the current
reimar
parents:
25216
diff
changeset
|
180 int config_video_out(const vo_functions_t *vo, uint32_t width, uint32_t height, |
22232 | 181 uint32_t d_width, uint32_t d_height, uint32_t flags, |
182 char *title, uint32_t format); | |
17566
f580a7755ac5
Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents:
16968
diff
changeset
|
183 void list_video_out(void); |
7562
92188b57a062
video out driver list support (like -vc, example: -vo xmga,xv,x11,)
arpi
parents:
7539
diff
changeset
|
184 |
1 | 185 // NULL terminated array of all drivers |
25219
e82ecde2cbd4
Mark several uses of vo_functions_t as const to stop some of the current
reimar
parents:
25216
diff
changeset
|
186 extern const vo_functions_t* const video_out_drivers[]; |
1 | 187 |
4811
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
188 extern int vo_flags; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
189 |
5511 | 190 extern int vo_config_count; |
191 | |
18116 | 192 extern int xinerama_screen; |
193 extern int xinerama_x; | |
194 extern int xinerama_y; | |
195 | |
4618 | 196 // correct resolution/bpp on screen: (should be autodetected by vo_init()) |
388 | 197 extern int vo_depthonscreen; |
198 extern int vo_screenwidth; | |
199 extern int vo_screenheight; | |
213 | 200 |
388 | 201 // 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
|
202 extern int vo_dx; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
203 extern int vo_dy; |
388 | 204 extern int vo_dwidth; |
205 extern int vo_dheight; | |
206 extern int vo_dbpp; | |
207 | |
7539
56ea9db91251
-nograbpointer, based on old patch by Christian Ohm <chr.ohm@gmx.net>
arpi
parents:
7435
diff
changeset
|
208 extern int vo_grabpointer; |
1268 | 209 extern int vo_doublebuffering; |
5431
013458752947
disabling direct rendering by default (too buggy and conflicts with osd/sub)
arpi
parents:
5294
diff
changeset
|
210 extern int vo_directrendering; |
4667 | 211 extern int vo_vsync; |
4981 | 212 extern int vo_fs; |
1268 | 213 extern int vo_fsmode; |
6304
ee65527096c2
pan&scan support with -vo xv by ?? <mplayer@svennevid.net>
arpi
parents:
6110
diff
changeset
|
214 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
|
215 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
|
216 extern int vo_refresh_rate; |
12371
c000f4c23efd
keepaspect and nokeepaspect are now useable by all vos
faust3
parents:
12021
diff
changeset
|
217 extern int vo_keepaspect; |
12912
1f6bb2356d18
add var vo_rootwin and -rootwin switch for mac osx
nplourde
parents:
12371
diff
changeset
|
218 extern int vo_rootwin; |
16280
7f34acc96aa4
remove extern for variables that are already in headers.
reimar
parents:
16171
diff
changeset
|
219 extern int vo_ontop; |
16968
e9d849bf8050
add a switch, slave command, and vo control to toggle borderless window.
joey
parents:
16280
diff
changeset
|
220 extern int vo_border; |
1268 | 221 |
24027
0530865bb02a
Declare all vo_gamma variables in libvo/video_out.h and remove them from
diego
parents:
23689
diff
changeset
|
222 extern int vo_gamma_gamma; |
6755 | 223 extern int vo_gamma_brightness; |
224 extern int vo_gamma_saturation; | |
225 extern int vo_gamma_contrast; | |
226 extern int vo_gamma_hue; | |
227 extern int vo_gamma_red_intensity; | |
228 extern int vo_gamma_green_intensity; | |
229 extern int vo_gamma_blue_intensity; | |
230 | |
10785 | 231 extern int vo_nomouse_input; |
5651
b8d8d72776f2
fix playlist bug with gui and rewrite mousecursor show/hide code
pontscho
parents:
5511
diff
changeset
|
232 |
2707 | 233 extern int vo_pts; |
3201 | 234 extern float vo_fps; |
2707 | 235 |
1184 | 236 extern char *vo_subdevice; |
237 | |
10988 | 238 extern int vo_colorkey; |
239 | |
16280
7f34acc96aa4
remove extern for variables that are already in headers.
reimar
parents:
16171
diff
changeset
|
240 extern int WinID; |
7f34acc96aa4
remove extern for variables that are already in headers.
reimar
parents:
16171
diff
changeset
|
241 |
25595
88e8649d97e0
cosmetics: Whitespace changes, add comments to some #endif directives.
diego
parents:
25535
diff
changeset
|
242 #if defined(HAVE_FBDEV) || defined(HAVE_VESA) |
7069 | 243 |
244 typedef struct { | |
245 float min; | |
246 float max; | |
247 } range_t; | |
248 | |
249 extern float range_max(range_t *r); | |
250 extern int in_range(range_t *r, float f); | |
251 extern range_t *str2range(char *s); | |
252 extern char *monitor_hfreq_str; | |
253 extern char *monitor_vfreq_str; | |
254 extern char *monitor_dotclock_str; | |
255 | |
25595
88e8649d97e0
cosmetics: Whitespace changes, add comments to some #endif directives.
diego
parents:
25535
diff
changeset
|
256 #endif /* defined(HAVE_FBDEV) || defined(HAVE_VESA) */ |
25535
3baf6a2283da
Add explanatory comments to the #endif part of multiple inclusion guards.
diego
parents:
25219
diff
changeset
|
257 |
3baf6a2283da
Add explanatory comments to the #endif part of multiple inclusion guards.
diego
parents:
25219
diff
changeset
|
258 #endif /* VIDEO_OUT_H */ |