Mercurial > mplayer.hg
comparison stream/dvbin.h @ 19271:64d82a45a05d
introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
author | ben |
---|---|
date | Mon, 31 Jul 2006 17:39:17 +0000 |
parents | libmpdemux/dvbin.h@c51f44c008fc |
children | 31b525f90395 |
comparison
equal
deleted
inserted
replaced
19270:7d39b911f0bd | 19271:64d82a45a05d |
---|---|
1 /* Imported from the dvbstream project | |
2 * | |
3 * Modified for use with MPlayer, for details see the changelog at | |
4 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
5 * $Id$ | |
6 */ | |
7 | |
8 #ifndef DVBIN_H | |
9 #define DVBIN_H | |
10 | |
11 #include "stream.h" | |
12 | |
13 #define SLOF (11700*1000UL) | |
14 #define LOF1 (9750*1000UL) | |
15 #define LOF2 (10600*1000UL) | |
16 | |
17 #ifdef HAVE_DVB_HEAD | |
18 #include <linux/dvb/dmx.h> | |
19 #include <linux/dvb/frontend.h> | |
20 #include <linux/dvb/version.h> | |
21 #else | |
22 #include <ost/dmx.h> | |
23 #include <ost/sec.h> | |
24 #include <ost/frontend.h> | |
25 #define fe_status_t FrontendStatus | |
26 #define fe_spectral_inversion_t SpectralInversion | |
27 #define fe_modulation_t Modulation | |
28 #define fe_code_rate_t CodeRate | |
29 #define fe_transmit_mode_t TransmitMode | |
30 #define fe_guard_interval_t GuardInterval | |
31 #define fe_bandwidth_t BandWidth | |
32 #define fe_hierarchy_t Hierarchy | |
33 #define fe_sec_voltage_t SecVoltage | |
34 #define dmx_pes_filter_params dmxPesFilterParams | |
35 #define dmx_sct_filter_params dmxSctFilterParams | |
36 #define dmx_pes_type_t dmxPesType_t | |
37 #endif | |
38 | |
39 #undef DVB_ATSC | |
40 #if defined(DVB_API_VERSION_MINOR) | |
41 #if DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1 | |
42 #define DVB_ATSC 1 | |
43 #endif | |
44 #endif | |
45 | |
46 | |
47 #define DVB_CHANNEL_LOWER -1 | |
48 #define DVB_CHANNEL_HIGHER 1 | |
49 | |
50 #include "inttypes.h" | |
51 | |
52 #ifndef DMX_FILTER_SIZE | |
53 #define DMX_FILTER_SIZE 16 | |
54 #endif | |
55 | |
56 typedef struct { | |
57 char *name; | |
58 int freq, srate, diseqc, tone; | |
59 char pol; | |
60 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; | |
61 fe_spectral_inversion_t inv; | |
62 fe_modulation_t mod; | |
63 fe_transmit_mode_t trans; | |
64 fe_bandwidth_t bw; | |
65 fe_guard_interval_t gi; | |
66 fe_code_rate_t cr, cr_lp; | |
67 fe_hierarchy_t hier; | |
68 } dvb_channel_t; | |
69 | |
70 | |
71 typedef struct { | |
72 uint16_t NUM_CHANNELS; | |
73 uint16_t current; | |
74 dvb_channel_t *channels; | |
75 } dvb_channels_list; | |
76 | |
77 typedef struct { | |
78 int type; | |
79 dvb_channels_list *list; | |
80 char *name; | |
81 int devno; | |
82 } dvb_card_config_t; | |
83 | |
84 typedef struct { | |
85 int count; | |
86 dvb_card_config_t *cards; | |
87 void *priv; | |
88 } dvb_config_t; | |
89 | |
90 | |
91 typedef struct { | |
92 int card; | |
93 int fe_fd; | |
94 int sec_fd; | |
95 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; | |
96 int dvr_fd; | |
97 | |
98 dvb_config_t *config; | |
99 dvb_channels_list *list; | |
100 int tuner_type; | |
101 int is_on; | |
102 stream_t *stream; | |
103 char new_tuning[256], prev_tuning[256]; | |
104 int retry; | |
105 int timeout; | |
106 } dvb_priv_t; | |
107 | |
108 | |
109 #define TUNER_SAT 1 | |
110 #define TUNER_TER 2 | |
111 #define TUNER_CBL 3 | |
112 #define TUNER_ATSC 4 | |
113 | |
114 extern int dvb_step_channel(dvb_priv_t *, int); | |
115 extern int dvb_set_channel(dvb_priv_t *, int, int); | |
116 extern dvb_config_t *dvb_get_config(void); | |
117 | |
118 #endif |