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 ****************************************************************************/
29 typedef struct delsys delsys_t;
31 extern const delsys_t dvbc, dvbs, dvbs2, dvbt, atsc, cqam;
33 typedef struct dvb_device dvb_device_t;
35 dvb_device_t *dvb_open (vlc_object_t *obj, bool tune);
36 void dvb_close (dvb_device_t *);
37 ssize_t dvb_read (dvb_device_t *, void *, size_t);
39 int dvb_add_pid (dvb_device_t *, uint16_t);
40 void dvb_remove_pid (dvb_device_t *, uint16_t);
42 const delsys_t *dvb_guess_system (dvb_device_t *);
43 float dvb_get_signal_strength (dvb_device_t *);
44 float dvb_get_snr (dvb_device_t *);
46 int dvb_set_inversion (dvb_device_t *, int);
47 int dvb_tune (dvb_device_t *);
49 #define VLC_FEC(a,b) (((a) << 16u) | (b))
50 #define VLC_FEC_AUTO 0xFFFFFFFF
51 #define VLC_GUARD(a,b) (((a) << 16u) | (b))
52 #define VLC_GUARD_AUTO 0xFFFFFFFF
55 int dvb_set_dvbc (dvb_device_t *, uint32_t freq, const char *mod,
56 uint32_t srate, uint32_t fec);
59 int dvb_set_dvbs (dvb_device_t *, uint32_t freq, uint32_t srate, uint32_t fec);
60 int dvb_set_dvbs2 (dvb_device_t *, uint32_t freq, const char *mod,
61 uint32_t srate, uint32_t fec, int pilot, int rolloff);
62 int dvb_set_sec (dvb_device_t *, uint32_t freq, char pol,
63 uint32_t lowf, uint32_t highf, uint32_t switchf);
66 int dvb_set_dvbt (dvb_device_t *, uint32_t freq, const char *mod,
67 uint32_t fec_hp, uint32_t fec_lp, uint32_t bandwidth,
68 int transmission, uint32_t guard, int hierarchy);
71 int dvb_set_atsc (dvb_device_t *, uint32_t freq, const char *mod);
72 int dvb_set_cqam (dvb_device_t *, uint32_t freq, const char *mod);
75 typedef struct isdbt_layer
77 const char *modulation;
78 const char *code_rate;
79 uint8_t segment_count;
80 uint8_t time_interleaving;
83 typedef struct isdbt_sound
85 uint8_t subchannel_id;
86 uint8_t segment_index; uint8_t segment_cound;
89 int dvb_set_isdbt (dvb_device_t *, uint32_t freq, const isdbt_layer_t *a,
90 const isdbt_layer_t *b, const isdbt_layer_t *c,
91 const isdbt_sound_t *sb);