Mercurial > mplayer.hg
annotate libvo/video_out.h @ 4441:90814d64a840
removed obosolete Terminate_Display_Process. using vo_x11_uninit. support UYVY format
author | alex |
---|---|
date | Thu, 31 Jan 2002 11:49:30 +0000 |
parents | df8e0f71cc3c |
children | 5fbfd8545c3b |
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 */ | |
8 | |
9 #include <inttypes.h> | |
10 | |
213 | 11 #include "font_load.h" |
408 | 12 #include "img_format.h" |
4352 | 13 #include "../vidix/vidix.h" |
1 | 14 |
31 | 15 #define VO_EVENT_EXPOSE 1 |
16 #define VO_EVENT_RESIZE 2 | |
17 #define VO_EVENT_KEYPRESS 4 | |
18 | |
1 | 19 typedef struct vo_info_s |
20 { | |
21 /* driver name ("Matrox Millennium G200/G400" */ | |
22 const char *name; | |
23 /* short name (for config strings) ("mga") */ | |
24 const char *short_name; | |
25 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */ | |
26 const char *author; | |
27 /* any additional comments */ | |
28 const char *comment; | |
29 } vo_info_t; | |
30 | |
4352 | 31 /* Direct access to BES */ |
32 typedef struct bes_da_s | |
33 { | |
34 vidix_rect_t dest; /* This field should be filled by x,y,w,h | |
35 from vidix:src but pitches from | |
36 vidix:dest */ | |
37 int flags; /* Probably will work only when flag == 0 */ | |
38 /* memory model */ | |
39 unsigned frame_size; /* destinition frame size */ | |
40 unsigned num_frames; /* number available frames */ | |
41 unsigned offsets[VID_PLAY_MAXFRAMES]; /* relative offset of each frame from begin of video memory */ | |
42 vidix_yuv_t offset; /* relative offsets within frame for yuv planes */ | |
43 void* dga_addr; /* linear address of BES */ | |
44 }bes_da_t; | |
45 | |
46 /* | |
47 Video Accelearted Architecture. | |
48 Every field of this structure can be set to NULL that means that | |
49 features is not supported | |
50 */ | |
51 typedef struct vo_vaa_s | |
52 { | |
53 uint32_t flags; /* currently undefined */ | |
54 /* | |
55 * Query Direct Access to BES | |
56 * info - information to be filled | |
57 * returns: 0 on success errno on error. | |
58 */ | |
59 int (*query_bes_da)(bes_da_t *info); | |
60 int (*get_video_eq)(vidix_video_eq_t *info); | |
61 int (*set_video_eq)(const vidix_video_eq_t *info); | |
62 int (*get_num_fx)(unsigned *info); | |
63 int (*get_oem_fx)(vidix_oem_fx_t *info); | |
64 int (*set_oem_fx)(const vidix_oem_fx_t *info); | |
65 int (*set_deint)(const vidix_deinterlace_t *info); | |
66 }vo_vaa_t; | |
67 | |
4433 | 68 /* Misc info to tuneup vo driver */ |
69 typedef struct vo_tune_info_s | |
70 { | |
71 int pitch[3]; /* Should be 0 if unknown else power of 2 */ | |
72 }vo_tune_info_t; | |
73 | |
1 | 74 typedef struct vo_functions_s |
75 { | |
4352 | 76 /* |
77 * Preinitializes driver (real INITIALIZATION) | |
78 * arg - currently it's vo_subdevice | |
79 * returns: zero on successful initialization, non-zero on error. | |
80 */ | |
81 uint32_t (*preinit)(const char *arg); | |
1 | 82 /* |
4352 | 83 * Initialize (means CONFIGURE) the display driver. |
31 | 84 * params: |
85 * width,height: image source size | |
86 * d_width,d_height: size of the requested window size, just a hint | |
87 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint | |
88 * title: window title, if available | |
89 * format: fourcc of pixel format | |
90 * returns : zero on successful initialization, non-zero on error. | |
1 | 91 */ |
4433 | 92 uint32_t (*config)(uint32_t width, uint32_t height, uint32_t d_width, |
93 uint32_t d_height, uint32_t fullscreen, char *title, | |
94 uint32_t format,const vo_tune_info_t *); | |
1 | 95 |
31 | 96 /* |
97 * Query that given pixel format is supported or not. | |
98 * params: | |
99 * format: fourcc of pixel format | |
100 * returns : 1 if supported, 0 if unsupported | |
101 */ | |
1 | 102 uint32_t (*query_format)(uint32_t format); |
103 | |
104 /* | |
105 * Return driver information. | |
106 * returns : read-only pointer to a vo_info_t structure. | |
107 */ | |
108 const vo_info_t* (*get_info)(void); | |
109 | |
110 /* | |
31 | 111 * Display a new RGB/BGR frame of the video to the screen. |
112 * params: | |
113 * src[0] - pointer to the image | |
1 | 114 */ |
115 uint32_t (*draw_frame)(uint8_t *src[]); | |
116 | |
117 /* | |
31 | 118 * Draw a planar YUV slice to the buffer: |
119 * params: | |
120 * src[3] = source image planes (Y,U,V) | |
121 * stride[3] = source image planes line widths (in bytes) | |
122 * w,h = width*height of area to be copied (in Y pixels) | |
123 * x,y = position at the destination image (in Y pixels) | |
1 | 124 */ |
125 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); | |
126 | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
127 /* |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
128 * Draws OSD to the screen buffer |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
129 */ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
130 void (*draw_osd)(void); |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
131 |
1 | 132 /* |
31 | 133 * Blit/Flip buffer to the screen. Must be called after each frame! |
1 | 134 */ |
135 void (*flip_page)(void); | |
136 | |
31 | 137 /* |
138 * This func is called after every frames to handle keyboard and | |
139 * other events. It's called in PAUSE mode too! | |
140 */ | |
141 void (*check_events)(void); | |
142 | |
143 /* | |
144 * Closes driver. Should restore the original state of the system. | |
145 */ | |
1 | 146 void (*uninit)(void); |
147 | |
4352 | 148 /* |
149 * Query Video Accelerated Architecture information. | |
150 * params: | |
151 * vaa: address of struct to be filled. | |
152 * (Note: driver should memset it to ZERO if it doesn't support vaa.) | |
153 */ | |
154 void (*query_vaa)(vo_vaa_t *vaa); | |
155 | |
1 | 156 } vo_functions_t; |
157 | |
1142 | 158 char *vo_format_name(int format); |
1326 | 159 int vo_init(void); |
160 | |
1 | 161 // NULL terminated array of all drivers |
162 extern vo_functions_t* video_out_drivers[]; | |
163 | |
388 | 164 // currect resolution/bpp on screen: (should be autodetected by vo_init()) |
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) |
170 extern int vo_dwidth; | |
171 extern int vo_dheight; | |
172 extern int vo_dbpp; | |
173 | |
1268 | 174 extern int vo_doublebuffering; |
175 extern int vo_fsmode; | |
176 | |
2707 | 177 extern int vo_pts; |
3201 | 178 extern float vo_fps; |
2707 | 179 |
1184 | 180 extern char *vo_subdevice; |
181 |