comparison libmpdemux/tv.h @ 2802:09d5c9834580

tv update
author alex
date Sat, 10 Nov 2001 23:32:10 +0000
parents 98769cea155c
children cc93d9786954
comparison
equal deleted inserted replaced
2801:318c240363c7 2802:09d5c9834580
1 #include "config.h" 1 #include "config.h"
2 2
3 #ifdef USE_TV 3 #ifdef USE_TV
4 extern float tv_param_freq; 4 #include "../libao2/afmt.h"
5 #include "../libvo/img_format.h"
6
7 extern unsigned long tv_param_freq;
5 extern char *tv_param_channel; 8 extern char *tv_param_channel;
6 extern char *tv_param_norm; 9 extern char *tv_param_norm;
7 extern int tv_param_on; 10 extern int tv_param_on;
8 extern char *tv_param_device; 11 extern char *tv_param_device;
9 extern char *tv_param_driver; 12 extern char *tv_param_driver;
10 extern int tv_param_width; 13 extern int tv_param_width;
11 extern int tv_param_height; 14 extern int tv_param_height;
15 extern int tv_param_input;
12 16
13 typedef struct tvi_info_s 17 typedef struct tvi_info_s
14 { 18 {
15 const char *name; 19 const char *name;
16 const char *short_name; 20 const char *short_name;
19 } tvi_info_t; 23 } tvi_info_t;
20 24
21 typedef struct tvi_functions_s 25 typedef struct tvi_functions_s
22 { 26 {
23 int (*init)(); 27 int (*init)();
24 int (*exit)(); 28 int (*uninit)();
25 int (*control)(); 29 int (*control)();
30 int (*start)();
26 int (*grab_video_frame)(); 31 int (*grab_video_frame)();
27 int (*get_video_framesize)(); 32 int (*get_video_framesize)();
28 int (*grab_audio_frame)(); 33 int (*grab_audio_frame)();
29 int (*get_audio_framesize)(); 34 int (*get_audio_framesize)();
30 } tvi_functions_t; 35 } tvi_functions_t;
31 36
37 typedef struct tvi_param_s {
38 const char *opt;
39 void *value;
40 } tvi_param_t;
41
32 typedef struct tvi_handle_s { 42 typedef struct tvi_handle_s {
33 tvi_info_t *info; 43 tvi_info_t *info;
34 tvi_functions_t *functions; 44 tvi_functions_t *functions;
35 void *priv; 45 void *priv;
46 tvi_param_t *params;
47 int seq;
36 } tvi_handle_t; 48 } tvi_handle_t;
49
37 50
38 #define TVI_CONTROL_FALSE 0 51 #define TVI_CONTROL_FALSE 0
39 #define TVI_CONTROL_TRUE 1 52 #define TVI_CONTROL_TRUE 1
40 #define TVI_CONTROL_NA -1 53 #define TVI_CONTROL_NA -1
41 #define TVI_CONTROL_UNKNOWN -2 54 #define TVI_CONTROL_UNKNOWN -2
42 55
56 /* ======================== CONTROLS =========================== */
43 57
44 #define TVI_CONTROL_VID_GET_FPS 1 58 /* GENERIC controls */
45 #define TVI_CONTROL_VID_GET_PLANES 2 59 #define TVI_CONTROL_IS_AUDIO 0x1
46 #define TVI_CONTROL_VID_GET_BITS 3 60 #define TVI_CONTROL_IS_VIDEO 0x2
47 #define TVI_CONTROL_VID_CHK_BITS 4 61 #define TVI_CONTROL_IS_TUNER 0x3
48 #define TVI_CONTROL_VID_SET_BITS 5
49 #define TVI_CONTROL_VID_GET_FORMAT 6
50 #define TVI_CONTROL_VID_CHK_FORMAT 7
51 #define TVI_CONTROL_VID_SET_FORMAT 8
52 #define TVI_CONTROL_VID_GET_WIDTH 9
53 #define TVI_CONTROL_VID_CHK_WIDTH 10
54 #define TVI_CONTROL_VID_SET_WIDTH 11
55 #define TVI_CONTROL_VID_GET_HEIGHT 12
56 #define TVI_CONTROL_VID_CHK_HEIGHT 13
57 #define TVI_CONTROL_VID_SET_HEIGHT 14
58 62
59 #define TVI_CONTROL_TUN_GET_FREQ 100 63 /* VIDEO controls */
60 #define TVI_CONTROL_TUN_SET_FREQ 101 64 #define TVI_CONTROL_VID_GET_FPS 0x101
65 #define TVI_CONTROL_VID_GET_PLANES 0x102
66 #define TVI_CONTROL_VID_GET_BITS 0x103
67 #define TVI_CONTROL_VID_CHK_BITS 0x104
68 #define TVI_CONTROL_VID_SET_BITS 0x105
69 #define TVI_CONTROL_VID_GET_FORMAT 0x106
70 #define TVI_CONTROL_VID_CHK_FORMAT 0x107
71 #define TVI_CONTROL_VID_SET_FORMAT 0x108
72 #define TVI_CONTROL_VID_GET_WIDTH 0x109
73 #define TVI_CONTROL_VID_CHK_WIDTH 0x110
74 #define TVI_CONTROL_VID_SET_WIDTH 0x111
75 #define TVI_CONTROL_VID_GET_HEIGHT 0x112
76 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113
77 #define TVI_CONTROL_VID_SET_HEIGHT 0x114
78
79 /* TUNER controls */
80 #define TVI_CONTROL_TUN_GET_FREQ 0x201
81 #define TVI_CONTROL_TUN_SET_FREQ 0x202
82 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */
83 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */
84 #define TVI_CONTROL_TUN_GET_NORM 0x205
85 #define TVI_CONTROL_TUN_SET_NORM 0x206
86
87 /* AUDIO controls */
88 #define TVI_CONTROL_AUD_GET_FORMAT 0x301
89 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302
90 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303
91 #define TVI_CONTROL_AUD_GET_CHANNELS 0x304
92
93 /* SPECIFIC controls */
94 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */
95 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */
96
97 //extern int demux_tv_fill_buffer(demuxer_t *demux, tvi_handle_t *tvh);
98 //extern int demux_open_tv(demuxer_t *demux, tvi_handle_t *tvh);
99 extern tvi_handle_t *tv_begin(void);
100 extern int tv_init(tvi_handle_t *tvh);
61 101
62 #endif /* USE_TV */ 102 #endif /* USE_TV */