Mercurial > mplayer.hg
annotate libvo/video_out.h @ 15947:e3d7f52776ff
added support for vbr audio (frames are parsed individually); fixed small bugs in the management of pes_extension
author | nicodvb |
---|---|
date | Sun, 10 Jul 2005 08:36:39 +0000 |
parents | e047e70a9767 |
children | fd51fd1ff231 |
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" |
408 | 17 #include "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 |
11542 | 60 |
9569
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
61 // 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
|
62 #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
|
63 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
64 #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
|
65 typedef struct { |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
66 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
|
67 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
|
68 } mp_colorkey_t; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
69 |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
70 #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
|
71 typedef struct { |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
72 int x,y; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
73 int w,h; |
894d02a6469e
vo_xover is a new vo that should make easy to have x11 support for
albeu
parents:
9560
diff
changeset
|
74 } mp_win_t; |
6307 | 75 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
76 #define VO_TRUE 1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
77 #define VO_FALSE 0 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
78 #define VO_ERROR -1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
79 #define VO_NOTAVAIL -2 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
80 #define VO_NOTIMPL -3 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
81 |
4736 | 82 #define VOFLAG_FULLSCREEN 0x01 |
83 #define VOFLAG_MODESWITCHING 0x02 | |
84 #define VOFLAG_SWSCALE 0x04 | |
85 #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
|
86 #define VOFLAG_XOVERLAY_SUB_VO 0x10000 |
4736 | 87 |
1 | 88 typedef struct vo_info_s |
89 { | |
90 /* driver name ("Matrox Millennium G200/G400" */ | |
91 const char *name; | |
92 /* short name (for config strings) ("mga") */ | |
93 const char *short_name; | |
94 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */ | |
95 const char *author; | |
96 /* any additional comments */ | |
97 const char *comment; | |
98 } vo_info_t; | |
99 | |
100 typedef struct vo_functions_s | |
101 { | |
8148
5b39e79af5fe
removed get_info, using the same sheme as in libmpcodecs instead
alex
parents:
8081
diff
changeset
|
102 vo_info_t *info; |
4352 | 103 /* |
104 * Preinitializes driver (real INITIALIZATION) | |
105 * arg - currently it's vo_subdevice | |
106 * returns: zero on successful initialization, non-zero on error. | |
107 */ | |
108 uint32_t (*preinit)(const char *arg); | |
1 | 109 /* |
4352 | 110 * Initialize (means CONFIGURE) the display driver. |
31 | 111 * params: |
112 * width,height: image source size | |
113 * d_width,d_height: size of the requested window size, just a hint | |
114 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint | |
115 * title: window title, if available | |
116 * format: fourcc of pixel format | |
117 * returns : zero on successful initialization, non-zero on error. | |
1 | 118 */ |
4433 | 119 uint32_t (*config)(uint32_t width, uint32_t height, uint32_t d_width, |
120 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
|
121 uint32_t format); |
1 | 122 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
123 /* |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
124 * Control interface |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
125 */ |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
126 uint32_t (*control)(uint32_t request, void *data, ...); |
1 | 127 |
128 /* | |
31 | 129 * Display a new RGB/BGR frame of the video to the screen. |
130 * params: | |
131 * src[0] - pointer to the image | |
1 | 132 */ |
133 uint32_t (*draw_frame)(uint8_t *src[]); | |
134 | |
135 /* | |
31 | 136 * Draw a planar YUV slice to the buffer: |
137 * params: | |
138 * src[3] = source image planes (Y,U,V) | |
139 * stride[3] = source image planes line widths (in bytes) | |
140 * w,h = width*height of area to be copied (in Y pixels) | |
141 * x,y = position at the destination image (in Y pixels) | |
1 | 142 */ |
143 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); | |
144 | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
145 /* |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
146 * Draws OSD to the screen buffer |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
147 */ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
148 void (*draw_osd)(void); |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
149 |
1 | 150 /* |
31 | 151 * Blit/Flip buffer to the screen. Must be called after each frame! |
1 | 152 */ |
153 void (*flip_page)(void); | |
154 | |
31 | 155 /* |
156 * This func is called after every frames to handle keyboard and | |
157 * other events. It's called in PAUSE mode too! | |
158 */ | |
159 void (*check_events)(void); | |
160 | |
161 /* | |
162 * Closes driver. Should restore the original state of the system. | |
163 */ | |
1 | 164 void (*uninit)(void); |
165 | |
166 } vo_functions_t; | |
167 | |
1142 | 168 char *vo_format_name(int format); |
1326 | 169 int vo_init(void); |
170 | |
7562
92188b57a062
video out driver list support (like -vc, example: -vo xmga,xv,x11,)
arpi
parents:
7539
diff
changeset
|
171 vo_functions_t* init_best_video_out(char** vo_list); |
92188b57a062
video out driver list support (like -vc, example: -vo xmga,xv,x11,)
arpi
parents:
7539
diff
changeset
|
172 void list_video_out(); |
92188b57a062
video out driver list support (like -vc, example: -vo xmga,xv,x11,)
arpi
parents:
7539
diff
changeset
|
173 |
1 | 174 // NULL terminated array of all drivers |
175 extern vo_functions_t* video_out_drivers[]; | |
176 | |
4811
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
177 extern int vo_flags; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
178 |
5511 | 179 extern int vo_config_count; |
180 | |
4618 | 181 // correct resolution/bpp on screen: (should be autodetected by vo_init()) |
388 | 182 extern int vo_depthonscreen; |
183 extern int vo_screenwidth; | |
184 extern int vo_screenheight; | |
213 | 185 |
388 | 186 // 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
|
187 extern int vo_dx; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
188 extern int vo_dy; |
388 | 189 extern int vo_dwidth; |
190 extern int vo_dheight; | |
191 extern int vo_dbpp; | |
192 | |
7539
56ea9db91251
-nograbpointer, based on old patch by Christian Ohm <chr.ohm@gmx.net>
arpi
parents:
7435
diff
changeset
|
193 extern int vo_grabpointer; |
1268 | 194 extern int vo_doublebuffering; |
5431
013458752947
disabling direct rendering by default (too buggy and conflicts with osd/sub)
arpi
parents:
5294
diff
changeset
|
195 extern int vo_directrendering; |
4667 | 196 extern int vo_vsync; |
4981 | 197 extern int vo_fs; |
1268 | 198 extern int vo_fsmode; |
6304
ee65527096c2
pan&scan support with -vo xv by ?? <mplayer@svennevid.net>
arpi
parents:
6110
diff
changeset
|
199 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
|
200 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
|
201 extern int vo_refresh_rate; |
12371
c000f4c23efd
keepaspect and nokeepaspect are now useable by all vos
faust3
parents:
12021
diff
changeset
|
202 extern int vo_keepaspect; |
12912
1f6bb2356d18
add var vo_rootwin and -rootwin switch for mac osx
nplourde
parents:
12371
diff
changeset
|
203 extern int vo_rootwin; |
1268 | 204 |
6755 | 205 extern int vo_gamma_brightness; |
206 extern int vo_gamma_saturation; | |
207 extern int vo_gamma_contrast; | |
208 extern int vo_gamma_hue; | |
209 extern int vo_gamma_red_intensity; | |
210 extern int vo_gamma_green_intensity; | |
211 extern int vo_gamma_blue_intensity; | |
212 | |
5651
b8d8d72776f2
fix playlist bug with gui and rewrite mousecursor show/hide code
pontscho
parents:
5511
diff
changeset
|
213 extern int vo_mouse_timer_const; |
10785 | 214 extern int vo_nomouse_input; |
5651
b8d8d72776f2
fix playlist bug with gui and rewrite mousecursor show/hide code
pontscho
parents:
5511
diff
changeset
|
215 |
2707 | 216 extern int vo_pts; |
3201 | 217 extern float vo_fps; |
2707 | 218 |
1184 | 219 extern char *vo_subdevice; |
220 | |
10988 | 221 extern int vo_colorkey; |
222 | |
7069 | 223 #if defined(HAVE_FBDEV)||defined(HAVE_VESA) |
224 | |
225 typedef struct { | |
226 float min; | |
227 float max; | |
228 } range_t; | |
229 | |
230 extern float range_max(range_t *r); | |
231 extern int in_range(range_t *r, float f); | |
232 extern range_t *str2range(char *s); | |
233 extern char *monitor_hfreq_str; | |
234 extern char *monitor_vfreq_str; | |
235 extern char *monitor_dotclock_str; | |
236 | |
237 #endif | |
238 | |
4933 | 239 #endif |