Mercurial > mplayer.hg
annotate libvo/video_out.h @ 4956:84f465d2ff16
KEY_ENTER->quit binding. why doesn't 'pt_step 1' exits if no more file left?
author | arpi |
---|---|
date | Wed, 06 Mar 2002 21:59:24 +0000 |
parents | 429994672d8c |
children | fa002f25631e |
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 |
1 | 6 * |
7 */ | |
4933 | 8 |
9 #ifndef __VIDEO_OUT_H | |
10 #define __VIDEO_OUT_H 1 | |
1 | 11 |
12 #include <inttypes.h> | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
13 #include <stdarg.h> |
1 | 14 |
213 | 15 #include "font_load.h" |
408 | 16 #include "img_format.h" |
4352 | 17 #include "../vidix/vidix.h" |
1 | 18 |
31 | 19 #define VO_EVENT_EXPOSE 1 |
20 #define VO_EVENT_RESIZE 2 | |
21 #define VO_EVENT_KEYPRESS 4 | |
22 | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
23 /* takes a pointer to a vo_vaa_s struct */ |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
24 #define VOCTRL_QUERY_VAA 1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
25 /* takes a pointer to uint32_t fourcc */ |
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 | |
4731 | 31 /* used to switch to fullscreen */ |
32 #define VOCTRL_FULLSCREEN 5 | |
4738 | 33 /* user wants to have screen shot. (currently without args)*/ |
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 | |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
39 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
40 #define VO_TRUE 1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
41 #define VO_FALSE 0 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
42 #define VO_ERROR -1 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
43 #define VO_NOTAVAIL -2 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
44 #define VO_NOTIMPL -3 |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
45 |
4736 | 46 #define VOFLAG_FULLSCREEN 0x01 |
47 #define VOFLAG_MODESWITCHING 0x02 | |
48 #define VOFLAG_SWSCALE 0x04 | |
49 #define VOFLAG_FLIPPING 0x08 | |
50 | |
1 | 51 typedef struct vo_info_s |
52 { | |
53 /* driver name ("Matrox Millennium G200/G400" */ | |
54 const char *name; | |
55 /* short name (for config strings) ("mga") */ | |
56 const char *short_name; | |
57 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */ | |
58 const char *author; | |
59 /* any additional comments */ | |
60 const char *comment; | |
61 } vo_info_t; | |
62 | |
4352 | 63 /* Direct access to BES */ |
64 typedef struct bes_da_s | |
65 { | |
66 vidix_rect_t dest; /* This field should be filled by x,y,w,h | |
67 from vidix:src but pitches from | |
68 vidix:dest */ | |
69 int flags; /* Probably will work only when flag == 0 */ | |
70 /* memory model */ | |
4618 | 71 unsigned frame_size; /* destination frame size */ |
72 unsigned num_frames; /* number of available frames */ | |
4352 | 73 unsigned offsets[VID_PLAY_MAXFRAMES]; /* relative offset of each frame from begin of video memory */ |
74 vidix_yuv_t offset; /* relative offsets within frame for yuv planes */ | |
75 void* dga_addr; /* linear address of BES */ | |
76 }bes_da_t; | |
77 | |
78 /* | |
79 Video Accelearted Architecture. | |
80 Every field of this structure can be set to NULL that means that | |
81 features is not supported | |
82 */ | |
83 typedef struct vo_vaa_s | |
84 { | |
85 uint32_t flags; /* currently undefined */ | |
86 /* | |
87 * Query Direct Access to BES | |
88 * info - information to be filled | |
89 * returns: 0 on success errno on error. | |
90 */ | |
91 int (*query_bes_da)(bes_da_t *info); | |
92 int (*get_video_eq)(vidix_video_eq_t *info); | |
93 int (*set_video_eq)(const vidix_video_eq_t *info); | |
94 int (*get_num_fx)(unsigned *info); | |
95 int (*get_oem_fx)(vidix_oem_fx_t *info); | |
96 int (*set_oem_fx)(const vidix_oem_fx_t *info); | |
97 int (*set_deint)(const vidix_deinterlace_t *info); | |
98 }vo_vaa_t; | |
99 | |
4433 | 100 /* Misc info to tuneup vo driver */ |
101 typedef struct vo_tune_info_s | |
102 { | |
103 int pitch[3]; /* Should be 0 if unknown else power of 2 */ | |
104 }vo_tune_info_t; | |
105 | |
1 | 106 typedef struct vo_functions_s |
107 { | |
4352 | 108 /* |
109 * Preinitializes driver (real INITIALIZATION) | |
110 * arg - currently it's vo_subdevice | |
111 * returns: zero on successful initialization, non-zero on error. | |
112 */ | |
113 uint32_t (*preinit)(const char *arg); | |
1 | 114 /* |
4352 | 115 * Initialize (means CONFIGURE) the display driver. |
31 | 116 * params: |
117 * width,height: image source size | |
118 * d_width,d_height: size of the requested window size, just a hint | |
119 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint | |
120 * title: window title, if available | |
121 * format: fourcc of pixel format | |
122 * returns : zero on successful initialization, non-zero on error. | |
1 | 123 */ |
4433 | 124 uint32_t (*config)(uint32_t width, uint32_t height, uint32_t d_width, |
125 uint32_t d_height, uint32_t fullscreen, char *title, | |
126 uint32_t format,const vo_tune_info_t *); | |
1 | 127 |
4592
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
128 /* |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
129 * Control interface |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
130 */ |
5fbfd8545c3b
query_ stuff replaced by new control() - patch by David Holm
arpi
parents:
4433
diff
changeset
|
131 uint32_t (*control)(uint32_t request, void *data, ...); |
1 | 132 |
133 /* | |
134 * Return driver information. | |
135 * returns : read-only pointer to a vo_info_t structure. | |
136 */ | |
137 const vo_info_t* (*get_info)(void); | |
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 */ |
144 uint32_t (*draw_frame)(uint8_t *src[]); | |
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 */ |
154 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); | |
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 | |
1142 | 179 char *vo_format_name(int format); |
1326 | 180 int vo_init(void); |
181 | |
1 | 182 // NULL terminated array of all drivers |
183 extern vo_functions_t* video_out_drivers[]; | |
184 | |
4811
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
185 extern int vo_flags; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
186 |
4618 | 187 // correct resolution/bpp on screen: (should be autodetected by vo_init()) |
388 | 188 extern int vo_depthonscreen; |
189 extern int vo_screenwidth; | |
190 extern int vo_screenheight; | |
213 | 191 |
388 | 192 // 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
|
193 extern int vo_dx; |
38a9cddd9e4d
added vo_dx,vo_dy (used currently only by X based outputs)
alex
parents:
4754
diff
changeset
|
194 extern int vo_dy; |
388 | 195 extern int vo_dwidth; |
196 extern int vo_dheight; | |
197 extern int vo_dbpp; | |
198 | |
1268 | 199 extern int vo_doublebuffering; |
4667 | 200 extern int vo_vsync; |
1268 | 201 extern int vo_fsmode; |
202 | |
2707 | 203 extern int vo_pts; |
3201 | 204 extern float vo_fps; |
2707 | 205 |
1184 | 206 extern char *vo_subdevice; |
207 | |
4933 | 208 #endif |