annotate stream/dvbin.h @ 26583:6559b9364ca3

Add compilation rule for libvo/aspecttest and (hackishly) fix linking.
author diego
date Wed, 30 Apr 2008 14:29:17 +0000
parents 4129c8cfa742
children 14c5017f40d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18561
diff changeset
3 * Modified for use with MPlayer, for details see the changelog at
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18561
diff changeset
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
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
7
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
8 #ifndef MPLAYER_DVBIN_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
9 #define MPLAYER_DVBIN_H
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
10
10560
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
11 #include "stream.h"
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
12
19086
c51f44c008fc moved LOF macros from dvb_defaults.h
nicodvb
parents: 18783
diff changeset
13 #define SLOF (11700*1000UL)
c51f44c008fc moved LOF macros from dvb_defaults.h
nicodvb
parents: 18783
diff changeset
14 #define LOF1 (9750*1000UL)
c51f44c008fc moved LOF macros from dvb_defaults.h
nicodvb
parents: 18783
diff changeset
15 #define LOF2 (10600*1000UL)
c51f44c008fc moved LOF macros from dvb_defaults.h
nicodvb
parents: 18783
diff changeset
16
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
17 #ifdef HAVE_DVB_HEAD
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
18 #include <linux/dvb/dmx.h>
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
19 #include <linux/dvb/frontend.h>
14382
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
20 #include <linux/dvb/version.h>
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
21 #else
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
22 #include <ost/dmx.h>
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
23 #include <ost/sec.h>
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
24 #include <ost/frontend.h>
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
25 #define fe_status_t FrontendStatus
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
26 #define fe_spectral_inversion_t SpectralInversion
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
27 #define fe_modulation_t Modulation
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
28 #define fe_code_rate_t CodeRate
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
29 #define fe_transmit_mode_t TransmitMode
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
30 #define fe_guard_interval_t GuardInterval
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
31 #define fe_bandwidth_t BandWidth
13155
fd40ef23053b added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents: 12803
diff changeset
32 #define fe_hierarchy_t Hierarchy
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
33 #define fe_sec_voltage_t SecVoltage
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
34 #define dmx_pes_filter_params dmxPesFilterParams
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
35 #define dmx_sct_filter_params dmxSctFilterParams
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
36 #define dmx_pes_type_t dmxPesType_t
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
37 #endif
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
38
14382
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
39 #undef DVB_ATSC
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
40 #if defined(DVB_API_VERSION_MINOR)
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
41 #if DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
42 #define DVB_ATSC 1
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
43 #endif
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
44 #endif
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
45
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
46
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
47 #define DVB_CHANNEL_LOWER -1
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
48 #define DVB_CHANNEL_HIGHER 1
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
49
10395
362a0e40491b fix compilation (uint*_t undefined)
colin
parents: 9611
diff changeset
50 #include "inttypes.h"
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
51
12803
168238f8c715 added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents: 12309
diff changeset
52 #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
53 #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
54 #endif
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
55
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
56 typedef struct {
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
57 char *name;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
58 int freq, srate, diseqc, tone;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
59 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
60 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt;
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
61 fe_spectral_inversion_t inv;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
62 fe_modulation_t mod;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
63 fe_transmit_mode_t trans;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
64 fe_bandwidth_t bw;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
65 fe_guard_interval_t gi;
13155
fd40ef23053b added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents: 12803
diff changeset
66 fe_code_rate_t cr, cr_lp;
fd40ef23053b added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents: 12803
diff changeset
67 fe_hierarchy_t hier;
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
68 } dvb_channel_t;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
69
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
70 typedef struct {
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
71 uint16_t NUM_CHANNELS;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
72 uint16_t current;
12309
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
73 dvb_channel_t *channels;
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
74 } dvb_channels_list;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
75
12309
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
76 typedef struct {
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
77 int type;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
78 dvb_channels_list *list;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
79 char *name;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
80 int devno;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
81 } dvb_card_config_t;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
82
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
83 typedef struct {
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
84 int count;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
85 dvb_card_config_t *cards;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
86 void *priv;
5c375ea5fb0f new configuration structure, gcc warn silencing
nicodvb
parents: 11872
diff changeset
87 } dvb_config_t;
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
88
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
89 typedef struct {
10560
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
90 int card;
20661
d698ee121edc cosmetics: reformatted with only tabs
nicodvb
parents: 20659
diff changeset
91 int fe_fd;
d698ee121edc cosmetics: reformatted with only tabs
nicodvb
parents: 20659
diff changeset
92 int sec_fd;
d698ee121edc cosmetics: reformatted with only tabs
nicodvb
parents: 20659
diff changeset
93 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt;
d698ee121edc cosmetics: reformatted with only tabs
nicodvb
parents: 20659
diff changeset
94 int dvr_fd;
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
95
20661
d698ee121edc cosmetics: reformatted with only tabs
nicodvb
parents: 20659
diff changeset
96 dvb_config_t *config;
d698ee121edc cosmetics: reformatted with only tabs
nicodvb
parents: 20659
diff changeset
97 dvb_channels_list *list;
10560
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
98 int tuner_type;
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
99 int is_on;
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
100 int retry;
18561
15fbdb09330f configurable tuning timeout
nicodvb
parents: 17566
diff changeset
101 int timeout;
20659
31b525f90395 nonsense removal: compare old and new frequency in order to skip tuning
nicodvb
parents: 19271
diff changeset
102 int last_freq;
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
103 } dvb_priv_t;
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
104
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
105
10560
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
106 #define TUNER_SAT 1
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
107 #define TUNER_TER 2
11826d9f90c7 this patch fixes
arpi
parents: 10395
diff changeset
108 #define TUNER_CBL 3
14382
42d792053cde added support for ATSC tuner and conf.file
nicodvb
parents: 13155
diff changeset
109 #define TUNER_ATSC 4
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
110
25377
31e0937ebe38 dvb cleanup: call dvb_(set|step)_channel() without dereferencing stream->priv (1000l to me)
nicodvb
parents: 20661
diff changeset
111 extern int dvb_step_channel(stream_t *, int);
31e0937ebe38 dvb cleanup: call dvb_(set|step)_channel() without dereferencing stream->priv (1000l to me)
nicodvb
parents: 20661
diff changeset
112 extern int dvb_set_channel(stream_t *, int, int);
17566
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 15178
diff changeset
113 extern dvb_config_t *dvb_get_config(void);
25379
9befb9809011 get rid of the file-static dvb_config and free the config at close() . Patch by Andrew Calkin and me
nicodvb
parents: 25377
diff changeset
114 extern void dvb_free_config(dvb_config_t *config);
9610
76c6d8f1ebf5 this is a combo patch that:
arpi
parents:
diff changeset
115
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
116 #endif /* MPLAYER_DVBIN_H */