Mercurial > mplayer.hg
annotate libmpdemux/dvbin.h @ 15140:0b29b871f5b4
credits for Jeff Clagg
author | diego |
---|---|
date | Wed, 13 Apr 2005 01:56:53 +0000 |
parents | 42d792053cde |
children | 8dd7a656eaf8 |
rev | line source |
---|---|
9610 | 1 |
2 #ifndef DVBIN_H | |
3 #define DVBIN_H | |
4 | |
10560 | 5 #include "dvb_defaults.h" |
6 #include "stream.h" | |
7 | |
9610 | 8 #ifdef HAVE_DVB_HEAD |
9 #include <linux/dvb/dmx.h> | |
10 #include <linux/dvb/frontend.h> | |
14382 | 11 #include <linux/dvb/version.h> |
9610 | 12 #else |
13 #include <ost/dmx.h> | |
14 #include <ost/sec.h> | |
15 #include <ost/frontend.h> | |
16 #define fe_status_t FrontendStatus | |
17 #define fe_spectral_inversion_t SpectralInversion | |
18 #define fe_modulation_t Modulation | |
19 #define fe_code_rate_t CodeRate | |
20 #define fe_transmit_mode_t TransmitMode | |
21 #define fe_guard_interval_t GuardInterval | |
22 #define fe_bandwidth_t BandWidth | |
13155
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
23 #define fe_hierarchy_t Hierarchy |
9610 | 24 #define fe_sec_voltage_t SecVoltage |
25 #define dmx_pes_filter_params dmxPesFilterParams | |
26 #define dmx_sct_filter_params dmxSctFilterParams | |
27 #define dmx_pes_type_t dmxPesType_t | |
28 #endif | |
29 | |
14382 | 30 #undef DVB_ATSC |
31 #if defined(DVB_API_VERSION_MINOR) | |
32 #if DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1 | |
33 #define DVB_ATSC 1 | |
34 #endif | |
35 #endif | |
9610 | 36 |
37 | |
38 #define DVB_CHANNEL_LOWER -1 | |
39 #define DVB_CHANNEL_HIGHER 1 | |
40 | |
10395 | 41 #include "inttypes.h" |
9610 | 42 |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
43 #ifndef DMX_FILTER_SIZE |
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
44 #define DMX_FILTER_SIZE 16 |
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
45 #endif |
9610 | 46 |
47 typedef struct { | |
48 char *name; | |
49 int freq, srate, diseqc, tone; | |
50 char pol; | |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
51 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; |
9610 | 52 fe_spectral_inversion_t inv; |
53 fe_modulation_t mod; | |
54 fe_transmit_mode_t trans; | |
55 fe_bandwidth_t bw; | |
56 fe_guard_interval_t gi; | |
13155
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
57 fe_code_rate_t cr, cr_lp; |
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
58 fe_hierarchy_t hier; |
9610 | 59 } dvb_channel_t; |
60 | |
61 | |
62 typedef struct { | |
63 uint16_t NUM_CHANNELS; | |
64 uint16_t current; | |
12309 | 65 dvb_channel_t *channels; |
9610 | 66 } dvb_channels_list; |
67 | |
12309 | 68 typedef struct { |
69 int type; | |
70 dvb_channels_list *list; | |
71 char *name; | |
72 int devno; | |
73 } dvb_card_config_t; | |
74 | |
75 typedef struct { | |
76 int count; | |
77 dvb_card_config_t *cards; | |
78 void *priv; | |
79 } dvb_config_t; | |
9610 | 80 |
81 | |
82 typedef struct { | |
10560 | 83 int card; |
9610 | 84 int fe_fd; |
85 int sec_fd; | |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
86 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; |
9610 | 87 int dvr_fd; |
88 | |
12309 | 89 dvb_config_t *config; |
9610 | 90 dvb_channels_list *list; |
10560 | 91 int tuner_type; |
92 int is_on; | |
93 stream_t *stream; | |
94 char new_tuning[256], prev_tuning[256]; | |
95 int retry; | |
9610 | 96 } dvb_priv_t; |
97 | |
98 | |
10560 | 99 #define TUNER_SAT 1 |
100 #define TUNER_TER 2 | |
101 #define TUNER_CBL 3 | |
14382 | 102 #define TUNER_ATSC 4 |
9610 | 103 |
10560 | 104 extern int dvb_step_channel(dvb_priv_t *, int); |
12309 | 105 extern int dvb_set_channel(dvb_priv_t *, int, int); |
106 extern dvb_config_t *dvb_get_config(); | |
9610 | 107 |
108 #endif |