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