Mercurial > mplayer.hg
annotate libvo/video_out.h @ 4394:e8b73a96b736
show actual video:audio bitrates at status line
author | arpi |
---|---|
date | Sun, 27 Jan 2002 21:46:06 +0000 |
parents | ed5b85b713a3 |
children | df8e0f71cc3c |
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 | |
1 | 68 typedef struct vo_functions_s |
69 { | |
4352 | 70 /* |
71 * Preinitializes driver (real INITIALIZATION) | |
72 * arg - currently it's vo_subdevice | |
73 * returns: zero on successful initialization, non-zero on error. | |
74 */ | |
75 uint32_t (*preinit)(const char *arg); | |
1 | 76 /* |
4352 | 77 * Initialize (means CONFIGURE) the display driver. |
31 | 78 * params: |
79 * width,height: image source size | |
80 * d_width,d_height: size of the requested window size, just a hint | |
81 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint | |
82 * title: window title, if available | |
83 * format: fourcc of pixel format | |
84 * returns : zero on successful initialization, non-zero on error. | |
1 | 85 */ |
86 uint32_t (*init)(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format); | |
87 | |
31 | 88 /* |
89 * Query that given pixel format is supported or not. | |
90 * params: | |
91 * format: fourcc of pixel format | |
92 * returns : 1 if supported, 0 if unsupported | |
93 */ | |
1 | 94 uint32_t (*query_format)(uint32_t format); |
95 | |
96 /* | |
97 * Return driver information. | |
98 * returns : read-only pointer to a vo_info_t structure. | |
99 */ | |
100 const vo_info_t* (*get_info)(void); | |
101 | |
102 /* | |
31 | 103 * Display a new RGB/BGR frame of the video to the screen. |
104 * params: | |
105 * src[0] - pointer to the image | |
1 | 106 */ |
107 uint32_t (*draw_frame)(uint8_t *src[]); | |
108 | |
109 /* | |
31 | 110 * Draw a planar YUV slice to the buffer: |
111 * params: | |
112 * src[3] = source image planes (Y,U,V) | |
113 * stride[3] = source image planes line widths (in bytes) | |
114 * w,h = width*height of area to be copied (in Y pixels) | |
115 * x,y = position at the destination image (in Y pixels) | |
1 | 116 */ |
117 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); | |
118 | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
119 /* |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
120 * Draws OSD to the screen buffer |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
121 */ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
122 void (*draw_osd)(void); |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
123 |
1 | 124 /* |
31 | 125 * Blit/Flip buffer to the screen. Must be called after each frame! |
1 | 126 */ |
127 void (*flip_page)(void); | |
128 | |
31 | 129 /* |
130 * This func is called after every frames to handle keyboard and | |
131 * other events. It's called in PAUSE mode too! | |
132 */ | |
133 void (*check_events)(void); | |
134 | |
135 /* | |
136 * Closes driver. Should restore the original state of the system. | |
137 */ | |
1 | 138 void (*uninit)(void); |
139 | |
4352 | 140 /* |
141 * Query Video Accelerated Architecture information. | |
142 * params: | |
143 * vaa: address of struct to be filled. | |
144 * (Note: driver should memset it to ZERO if it doesn't support vaa.) | |
145 */ | |
146 void (*query_vaa)(vo_vaa_t *vaa); | |
147 | |
1 | 148 } vo_functions_t; |
149 | |
1142 | 150 char *vo_format_name(int format); |
1326 | 151 int vo_init(void); |
152 | |
1 | 153 // NULL terminated array of all drivers |
154 extern vo_functions_t* video_out_drivers[]; | |
155 | |
388 | 156 // currect resolution/bpp on screen: (should be autodetected by vo_init()) |
157 extern int vo_depthonscreen; | |
158 extern int vo_screenwidth; | |
159 extern int vo_screenheight; | |
213 | 160 |
388 | 161 // requested resolution/bpp: (-x -y -bpp options) |
162 extern int vo_dwidth; | |
163 extern int vo_dheight; | |
164 extern int vo_dbpp; | |
165 | |
1268 | 166 extern int vo_doublebuffering; |
167 extern int vo_fsmode; | |
168 | |
2707 | 169 extern int vo_pts; |
3201 | 170 extern float vo_fps; |
2707 | 171 |
1184 | 172 extern char *vo_subdevice; |
173 |