annotate libvo/video_out.h @ 980:e9dedf1e544e

-framedrop fixed for VfW (I hope :))
author arpi_esp
date Sun, 03 Jun 2001 23:54:41 +0000
parents b61c5c4484f8
children 6b6c173d050f
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
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 /*
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
76 * Blit/Flip buffer to the screen. Must be called after each frame!
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 void (*flip_page)(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
80 /*
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
81 * This func is called after every frames to handle keyboard and
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
82 * other events. It's called in PAUSE mode too!
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
83 */
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
84 void (*check_events)(void);
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
85
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
86 /*
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
87 * Closes driver. Should restore the original state of the system.
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
88 */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 void (*uninit)(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 } vo_functions_t;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 // NULL terminated array of all drivers
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 extern vo_functions_t* video_out_drivers[];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95
388
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
96 // currect resolution/bpp on screen: (should be autodetected by vo_init())
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
97 extern int vo_depthonscreen;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
98 extern int vo_screenwidth;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
99 extern int vo_screenheight;
213
6ec8f6ab6cb1 subtitle+OSD font support
arpi_esp
parents: 31
diff changeset
100
388
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
101 // requested resolution/bpp: (-x -y -bpp options)
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
102 extern int vo_dwidth;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
103 extern int vo_dheight;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
104 extern int vo_dbpp;
ccb5ebfaaeac -bpp changes
arpi_esp
parents: 218
diff changeset
105