annotate libvo/video_out.h @ 3572:dc8fe516de8f

"I updatet codecs.html and translated whole new file: bugsreports.html. In all three files I set the charset encodding." Justyna Bia\263a <nell@skrzynka.pl>
author gabucino
date Mon, 17 Dec 2001 23:54:13 +0000
parents 039a973b3dda
children ed5b85b713a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * video_out.h
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 * Copyright (C) Aaron Holtzman - Aug 1999
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
5 * Strongly modified, most parts rewritten: A'rpi/ESP-team - 2000-2001
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 #include <inttypes.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10
213
6ec8f6ab6cb1 subtitle+OSD font support
arpi_esp
parents: 31
diff changeset
11 #include "font_load.h"
408
b61c5c4484f8 - applied overlay patch by Jens H
atmosfear
parents: 388
diff changeset
12 #include "img_format.h"
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
14 #define VO_EVENT_EXPOSE 1
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
15 #define VO_EVENT_RESIZE 2
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
16 #define VO_EVENT_KEYPRESS 4
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
17
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 typedef struct vo_info_s
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 /* driver name ("Matrox Millennium G200/G400" */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 const char *name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 /* short name (for config strings) ("mga") */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 const char *short_name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 /* author ("Aaron Holtzman <aholtzma@ess.engr.uvic.ca>") */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 const char *author;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 /* any additional comments */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 const char *comment;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 } vo_info_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 typedef struct vo_functions_s
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 * Initialize the display driver.
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
34 * params:
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
35 * width,height: image source size
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
36 * d_width,d_height: size of the requested window size, just a hint
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
37 * fullscreen: flag, 0=windowd 1=fullscreen, just a hint
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
38 * title: window title, if available
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
39 * format: fourcc of pixel format
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
40 * returns : zero on successful initialization, non-zero on error.
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
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);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
44 /*
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
45 * Query that given pixel format is supported or not.
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
46 * params:
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
47 * format: fourcc of pixel format
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
48 * returns : 1 if supported, 0 if unsupported
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
49 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 uint32_t (*query_format)(uint32_t format);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 * Return driver information.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 * returns : read-only pointer to a vo_info_t structure.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 const vo_info_t* (*get_info)(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 /*
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
59 * Display a new RGB/BGR frame of the video to the screen.
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
60 * params:
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
61 * src[0] - pointer to the image
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 uint32_t (*draw_frame)(uint8_t *src[]);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 /*
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
66 * Draw a planar YUV slice to the buffer:
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
67 * params:
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
68 * src[3] = source image planes (Y,U,V)
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
69 * stride[3] = source image planes line widths (in bytes)
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
70 * w,h = width*height of area to be copied (in Y pixels)
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
71 * x,y = position at the destination image (in Y pixels)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 uint32_t (*draw_slice)(uint8_t *src[], int stride[], int w,int h, int x,int y);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
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
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 /*
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
81 * Blit/Flip buffer to the screen. Must be called after each frame!
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 void (*flip_page)(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
85 /*
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
86 * This func is called after every frames to handle keyboard and
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
87 * other events. It's called in PAUSE mode too!
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
88 */
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
89 void (*check_events)(void);
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
90
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
91 /*
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
92 * Closes driver. Should restore the original state of the system.
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
93 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 void (*uninit)(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 } vo_functions_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97
1142
6b6c173d050f added prototype of vo_format_name
al3x
parents: 408
diff changeset
98 char *vo_format_name(int format);
1326
76478d16903d added prototype of vo_init()
arpi
parents: 1268
diff changeset
99 int vo_init(void);
76478d16903d added prototype of vo_init()
arpi
parents: 1268
diff changeset
100
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 // NULL terminated array of all drivers
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 extern vo_functions_t* video_out_drivers[];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103
388
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
104 // currect resolution/bpp on screen: (should be autodetected by vo_init())
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
105 extern int vo_depthonscreen;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
106 extern int vo_screenwidth;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
107 extern int vo_screenheight;
213
6ec8f6ab6cb1 subtitle+OSD font support
arpi_esp
parents: 31
diff changeset
108
388
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
109 // requested resolution/bpp: (-x -y -bpp options)
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
110 extern int vo_dwidth;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
111 extern int vo_dheight;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
112 extern int vo_dbpp;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
113
1268
9877eaacff9e extern vo_doublebuffering cleanup
arpi
parents: 1184
diff changeset
114 extern int vo_doublebuffering;
9877eaacff9e extern vo_doublebuffering cleanup
arpi
parents: 1184
diff changeset
115 extern int vo_fsmode;
9877eaacff9e extern vo_doublebuffering cleanup
arpi
parents: 1184
diff changeset
116
2707
97efb75dceb8 vo_pts added
arpi
parents: 1501
diff changeset
117 extern int vo_pts;
3201
039a973b3dda Newest DXR3 patch (improved 1.0rc2) by David Holm.
atmos4
parents: 2707
diff changeset
118 extern float vo_fps;
2707
97efb75dceb8 vo_pts added
arpi
parents: 1501
diff changeset
119
1184
e8c3f89ecd96 vo_subdevice implemented
al3x
parents: 1142
diff changeset
120 extern char *vo_subdevice;
e8c3f89ecd96 vo_subdevice implemented
al3x
parents: 1142
diff changeset
121