Mercurial > mplayer.hg
annotate libvo/video_out.h @ 2808:a78ac799a300
QP_store==null bugfix and no opendivx bugfix
author | michael |
---|---|
date | Sun, 11 Nov 2001 01:18:40 +0000 |
parents | 97efb75dceb8 |
children | 039a973b3dda |
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" |
1 | 13 |
31 | 14 #define VO_EVENT_EXPOSE 1 |
15 #define VO_EVENT_RESIZE 2 | |
16 #define VO_EVENT_KEYPRESS 4 | |
17 | |
1 | 18 typedef struct vo_info_s |
19 { | |
20 /* driver name ("Matrox Millennium G200/G400" */ | |
21 const char *name; | |
22 /* short name (for config strings) ("mga") */ | |
23 const char *short_name; | |
24 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */ | |
25 const char *author; | |
26 /* any additional comments */ | |
27 const char *comment; | |
28 } vo_info_t; | |
29 | |
30 typedef struct vo_functions_s | |
31 { | |
32 /* | |
33 * Initialize the display driver. | |
31 | 34 * params: |
35 * width,height: image source size | |
36 * d_width,d_height: size of the requested window size, just a hint | |
37 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint | |
38 * title: window title, if available | |
39 * format: fourcc of pixel format | |
40 * returns : zero on successful initialization, non-zero on error. | |
1 | 41 */ |
42 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); | |
43 | |
31 | 44 /* |
45 * Query that given pixel format is supported or not. | |
46 * params: | |
47 * format: fourcc of pixel format | |
48 * returns : 1 if supported, 0 if unsupported | |
49 */ | |
1 | 50 uint32_t (*query_format)(uint32_t format); |
51 | |
52 /* | |
53 * Return driver information. | |
54 * returns : read-only pointer to a vo_info_t structure. | |
55 */ | |
56 const vo_info_t* (*get_info)(void); | |
57 | |
58 /* | |
31 | 59 * Display a new RGB/BGR frame of the video to the screen. |
60 * params: | |
61 * src[0] - pointer to the image | |
1 | 62 */ |
63 uint32_t (*draw_frame)(uint8_t *src[]); | |
64 | |
65 /* | |
31 | 66 * Draw a planar YUV slice to the buffer: |
67 * params: | |
68 * src[3] = source image planes (Y,U,V) | |
69 * stride[3] = source image planes line widths (in bytes) | |
70 * w,h = width*height of area to be copied (in Y pixels) | |
71 * x,y = position at the destination image (in Y pixels) | |
1 | 72 */ |
73 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y); | |
74 | |
1501
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
75 /* |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
76 * Draws OSD to the screen buffer |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
77 */ |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
78 void (*draw_osd)(void); |
d40f2b686846
changes according to -utf8 option, draw_osd() function added
atlka
parents:
1326
diff
changeset
|
79 |
1 | 80 /* |
31 | 81 * Blit/Flip buffer to the screen. Must be called after each frame! |
1 | 82 */ |
83 void (*flip_page)(void); | |
84 | |
31 | 85 /* |
86 * This func is called after every frames to handle keyboard and | |
87 * other events. It's called in PAUSE mode too! | |
88 */ | |
89 void (*check_events)(void); | |
90 | |
91 /* | |
92 * Closes driver. Should restore the original state of the system. | |
93 */ | |
1 | 94 void (*uninit)(void); |
95 | |
96 } vo_functions_t; | |
97 | |
1142 | 98 char *vo_format_name(int format); |
1326 | 99 int vo_init(void); |
100 | |
1 | 101 // NULL terminated array of all drivers |
102 extern vo_functions_t* video_out_drivers[]; | |
103 | |
388 | 104 // currect resolution/bpp on screen: (should be autodetected by vo_init()) |
105 extern int vo_depthonscreen; | |
106 extern int vo_screenwidth; | |
107 extern int vo_screenheight; | |
213 | 108 |
388 | 109 // requested resolution/bpp: (-x -y -bpp options) |
110 extern int vo_dwidth; | |
111 extern int vo_dheight; | |
112 extern int vo_dbpp; | |
113 | |
1268 | 114 extern int vo_doublebuffering; |
115 extern int vo_fsmode; | |
116 | |
2707 | 117 extern int vo_pts; |
118 | |
1184 | 119 extern char *vo_subdevice; |
120 |