Mercurial > mplayer.hg
annotate stream/dvbin.h @ 30302:a9e53df6d8f1
Also try linking against dxguid for SDL test.
Some broken SDL versions need it even though sdl-config does include it.
author | reimar |
---|---|
date | Sun, 17 Jan 2010 11:49:33 +0000 |
parents | b4cbeff5153e |
children | d9bbd1844876 |
rev | line source |
---|---|
15178
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
1 /* Imported from the dvbstream project |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
2 * |
18783 | 3 * Modified for use with MPlayer, for details see the changelog at |
4 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15178
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
5 * $Id$ |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
6 */ |
9610 | 7 |
26029 | 8 #ifndef MPLAYER_DVBIN_H |
9 #define MPLAYER_DVBIN_H | |
9610 | 10 |
30165 | 11 #include "config.h" |
10560 | 12 #include "stream.h" |
13 | |
19086 | 14 #define SLOF (11700*1000UL) |
15 #define LOF1 (9750*1000UL) | |
16 #define LOF2 (10600*1000UL) | |
17 | |
27370
14c5017f40d2
Change a bunch of video/audio-output-specific preprocessor directives from
diego
parents:
26029
diff
changeset
|
18 #ifdef CONFIG_DVB_HEAD |
9610 | 19 #include <linux/dvb/dmx.h> |
20 #include <linux/dvb/frontend.h> | |
14382 | 21 #include <linux/dvb/version.h> |
9610 | 22 #else |
23 #include <ost/dmx.h> | |
24 #include <ost/sec.h> | |
25 #include <ost/frontend.h> | |
26 #define fe_status_t FrontendStatus | |
27 #define fe_spectral_inversion_t SpectralInversion | |
28 #define fe_modulation_t Modulation | |
29 #define fe_code_rate_t CodeRate | |
30 #define fe_transmit_mode_t TransmitMode | |
31 #define fe_guard_interval_t GuardInterval | |
32 #define fe_bandwidth_t BandWidth | |
13155
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
33 #define fe_hierarchy_t Hierarchy |
9610 | 34 #define fe_sec_voltage_t SecVoltage |
35 #define dmx_pes_filter_params dmxPesFilterParams | |
36 #define dmx_sct_filter_params dmxSctFilterParams | |
37 #define dmx_pes_type_t dmxPesType_t | |
38 #endif | |
39 | |
14382 | 40 #undef DVB_ATSC |
41 #if defined(DVB_API_VERSION_MINOR) | |
28667
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
42 |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
43 /* kernel headers >=2.6.28 have version 5. |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
44 * |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
45 * FIXME: are there any real differences between 3.1 and 5? |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
46 */ |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
47 |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
48 #if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5 |
14382 | 49 #define DVB_ATSC 1 |
50 #endif | |
28667
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
51 |
14382 | 52 #endif |
9610 | 53 |
54 | |
55 #define DVB_CHANNEL_LOWER -1 | |
56 #define DVB_CHANNEL_HIGHER 1 | |
57 | |
10395 | 58 #include "inttypes.h" |
9610 | 59 |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
60 #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
|
61 #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
|
62 #endif |
9610 | 63 |
64 typedef struct { | |
65 char *name; | |
66 int freq, srate, diseqc, tone; | |
67 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
|
68 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; |
9610 | 69 fe_spectral_inversion_t inv; |
70 fe_modulation_t mod; | |
71 fe_transmit_mode_t trans; | |
72 fe_bandwidth_t bw; | |
73 fe_guard_interval_t gi; | |
13155
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
74 fe_code_rate_t cr, cr_lp; |
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
75 fe_hierarchy_t hier; |
9610 | 76 } dvb_channel_t; |
77 | |
78 typedef struct { | |
79 uint16_t NUM_CHANNELS; | |
80 uint16_t current; | |
12309 | 81 dvb_channel_t *channels; |
9610 | 82 } dvb_channels_list; |
83 | |
12309 | 84 typedef struct { |
85 int type; | |
86 dvb_channels_list *list; | |
87 char *name; | |
88 int devno; | |
89 } dvb_card_config_t; | |
90 | |
91 typedef struct { | |
92 int count; | |
93 dvb_card_config_t *cards; | |
94 void *priv; | |
95 } dvb_config_t; | |
9610 | 96 |
97 typedef struct { | |
10560 | 98 int card; |
20661 | 99 int fe_fd; |
100 int sec_fd; | |
101 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; | |
102 int dvr_fd; | |
9610 | 103 |
20661 | 104 dvb_config_t *config; |
105 dvb_channels_list *list; | |
10560 | 106 int tuner_type; |
107 int is_on; | |
108 int retry; | |
18561 | 109 int timeout; |
20659
31b525f90395
nonsense removal: compare old and new frequency in order to skip tuning
nicodvb
parents:
19271
diff
changeset
|
110 int last_freq; |
9610 | 111 } dvb_priv_t; |
112 | |
113 | |
10560 | 114 #define TUNER_SAT 1 |
115 #define TUNER_TER 2 | |
116 #define TUNER_CBL 3 | |
14382 | 117 #define TUNER_ATSC 4 |
9610 | 118 |
28051 | 119 int dvb_step_channel(stream_t *, int); |
120 int dvb_set_channel(stream_t *, int, int); | |
121 dvb_config_t *dvb_get_config(void); | |
122 void dvb_free_config(dvb_config_t *config); | |
9610 | 123 |
26029 | 124 #endif /* MPLAYER_DVBIN_H */ |