3 * @brief Digital TV module common header
5 /*****************************************************************************
6 * Copyright © 2011 Rémi Denis-Courmont
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1
11 * of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 ****************************************************************************/
44 typedef struct dvb_device dvb_device_t;
46 dvb_device_t *dvb_open (vlc_object_t *obj);
47 void dvb_close (dvb_device_t *);
48 ssize_t dvb_read (dvb_device_t *, void *, size_t);
50 int dvb_add_pid (dvb_device_t *, uint16_t);
51 void dvb_remove_pid (dvb_device_t *, uint16_t);
53 unsigned dvb_enum_systems (dvb_device_t *);
54 float dvb_get_signal_strength (dvb_device_t *);
55 float dvb_get_snr (dvb_device_t *);
59 void dvb_set_ca_pmt (dvb_device_t *, struct dvbpsi_pmt_s *);
62 int dvb_set_inversion (dvb_device_t *, int);
63 int dvb_tune (dvb_device_t *);
65 #define VLC_FEC(a,b) (((a) << 16u) | (b))
66 #define VLC_FEC_AUTO 0xFFFFFFFF
67 #define VLC_GUARD(a,b) (((a) << 16u) | (b))
68 #define VLC_GUARD_AUTO 0xFFFFFFFF
71 int dvb_set_dvbc (dvb_device_t *, uint32_t freq, const char *mod,
72 uint32_t srate, uint32_t fec);
75 int dvb_set_dvbs (dvb_device_t *, uint64_t freq, uint32_t srate, uint32_t fec);
76 int dvb_set_dvbs2 (dvb_device_t *, uint64_t freq, const char *mod,
77 uint32_t srate, uint32_t fec, int pilot, int rolloff);
78 int dvb_set_sec (dvb_device_t *, uint64_t freq, char pol,
79 uint32_t lowf, uint32_t highf, uint32_t switchf);
82 int dvb_set_dvbt (dvb_device_t *, uint32_t freq, const char *mod,
83 uint32_t fec_hp, uint32_t fec_lp, uint32_t bandwidth,
84 int transmission, uint32_t guard, int hierarchy);
85 int dvb_set_dvbt2 (dvb_device_t *, uint32_t freq, const char *mod,
86 uint32_t fec, uint32_t bandwidth,
87 int transmission, uint32_t guard);
90 int dvb_set_atsc (dvb_device_t *, uint32_t freq, const char *mod);
91 int dvb_set_cqam (dvb_device_t *, uint32_t freq, const char *mod);
94 /* TODO: modulation? */
95 int dvb_set_isdbs (dvb_device_t *, uint64_t freq, uint16_t ts_id);
98 typedef struct isdbt_layer
100 const char *modulation;
102 uint8_t segment_count;
103 uint8_t time_interleaving;
106 int dvb_set_isdbt (dvb_device_t *, uint32_t freq, uint32_t bandwith,
107 int transmission, uint32_t guard, const isdbt_layer_t[3]);
109 typedef struct isdbt_sound
111 uint8_t subchannel_id;
112 uint8_t segment_index;
113 uint8_t segment_count;