Mercurial > mplayer.hg
annotate libmpdemux/tv.h @ 2896:3a44575edc30
Added --enable-libvo2, NOTE: it doesn't compile with libvo2 yet!
author | mswitch |
---|---|
date | Wed, 14 Nov 2001 10:49:12 +0000 |
parents | c63562f5f56f |
children | bce9c945b29c |
rev | line source |
---|---|
2790 | 1 |
2819
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2818
diff
changeset
|
2 extern int tv_param_on; |
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2818
diff
changeset
|
3 |
2790 | 4 #ifdef USE_TV |
2830 | 5 //#include "../libao2/afmt.h" |
6 //#include "../libvo/img_format.h" | |
7 //#include "../libvo/fastmemcpy.h" | |
8 //#include "mp_msg.h" | |
2802 | 9 |
2837 | 10 extern char *tv_param_freq; |
2790 | 11 extern char *tv_param_channel; |
12 extern char *tv_param_norm; | |
13 extern char *tv_param_device; | |
14 extern char *tv_param_driver; | |
15 extern int tv_param_width; | |
16 extern int tv_param_height; | |
2802 | 17 extern int tv_param_input; |
2817 | 18 extern char *tv_param_outfmt; |
2790 | 19 |
20 typedef struct tvi_info_s | |
21 { | |
22 const char *name; | |
23 const char *short_name; | |
24 const char *author; | |
25 const char *comment; | |
26 } tvi_info_t; | |
27 | |
28 typedef struct tvi_functions_s | |
29 { | |
30 int (*init)(); | |
2802 | 31 int (*uninit)(); |
2790 | 32 int (*control)(); |
2802 | 33 int (*start)(); |
2790 | 34 int (*grab_video_frame)(); |
35 int (*get_video_framesize)(); | |
36 int (*grab_audio_frame)(); | |
37 int (*get_audio_framesize)(); | |
38 } tvi_functions_t; | |
39 | |
2802 | 40 typedef struct tvi_param_s { |
41 const char *opt; | |
42 void *value; | |
43 } tvi_param_t; | |
44 | |
2790 | 45 typedef struct tvi_handle_s { |
2802 | 46 tvi_info_t *info; |
47 tvi_functions_t *functions; | |
48 void *priv; | |
49 tvi_param_t *params; | |
50 int seq; | |
2790 | 51 } tvi_handle_t; |
52 | |
2802 | 53 |
2790 | 54 #define TVI_CONTROL_FALSE 0 |
55 #define TVI_CONTROL_TRUE 1 | |
56 #define TVI_CONTROL_NA -1 | |
57 #define TVI_CONTROL_UNKNOWN -2 | |
58 | |
2802 | 59 /* ======================== CONTROLS =========================== */ |
2790 | 60 |
2802 | 61 /* GENERIC controls */ |
62 #define TVI_CONTROL_IS_AUDIO 0x1 | |
63 #define TVI_CONTROL_IS_VIDEO 0x2 | |
64 #define TVI_CONTROL_IS_TUNER 0x3 | |
65 | |
66 /* VIDEO controls */ | |
67 #define TVI_CONTROL_VID_GET_FPS 0x101 | |
68 #define TVI_CONTROL_VID_GET_PLANES 0x102 | |
69 #define TVI_CONTROL_VID_GET_BITS 0x103 | |
70 #define TVI_CONTROL_VID_CHK_BITS 0x104 | |
71 #define TVI_CONTROL_VID_SET_BITS 0x105 | |
72 #define TVI_CONTROL_VID_GET_FORMAT 0x106 | |
73 #define TVI_CONTROL_VID_CHK_FORMAT 0x107 | |
74 #define TVI_CONTROL_VID_SET_FORMAT 0x108 | |
75 #define TVI_CONTROL_VID_GET_WIDTH 0x109 | |
76 #define TVI_CONTROL_VID_CHK_WIDTH 0x110 | |
77 #define TVI_CONTROL_VID_SET_WIDTH 0x111 | |
78 #define TVI_CONTROL_VID_GET_HEIGHT 0x112 | |
79 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113 | |
80 #define TVI_CONTROL_VID_SET_HEIGHT 0x114 | |
2790 | 81 |
2802 | 82 /* TUNER controls */ |
83 #define TVI_CONTROL_TUN_GET_FREQ 0x201 | |
84 #define TVI_CONTROL_TUN_SET_FREQ 0x202 | |
85 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */ | |
86 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */ | |
87 #define TVI_CONTROL_TUN_GET_NORM 0x205 | |
88 #define TVI_CONTROL_TUN_SET_NORM 0x206 | |
89 | |
90 /* AUDIO controls */ | |
91 #define TVI_CONTROL_AUD_GET_FORMAT 0x301 | |
92 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302 | |
93 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303 | |
94 #define TVI_CONTROL_AUD_GET_CHANNELS 0x304 | |
95 | |
96 /* SPECIFIC controls */ | |
97 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */ | |
98 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */ | |
99 | |
100 //extern int demux_tv_fill_buffer(demuxer_t *demux, tvi_handle_t *tvh); | |
101 //extern int demux_open_tv(demuxer_t *demux, tvi_handle_t *tvh); | |
102 extern tvi_handle_t *tv_begin(void); | |
103 extern int tv_init(tvi_handle_t *tvh); | |
2790 | 104 |
105 #endif /* USE_TV */ |