From 05f63edc7bcede1c0e1b8580b3f973d09e774a08 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Feb 2017 13:30:59 +0100 Subject: Revert "dvb: add support for DVB-T2" This reverts commit df91e492fd3365cf7db9c6ba4a721f8fcce0521c. Multiple issues such as weird code with undefined behavior (like (like conf_file*). The PR wasn't properly reviewed anyway (my error), so this commit should be reviewed and then merged again. --- stream/dvbin.h | 90 ++++++++++++++++------------------------------------------ 1 file changed, 25 insertions(+), 65 deletions(-) (limited to 'stream/dvbin.h') diff --git a/stream/dvbin.h b/stream/dvbin.h index 02b6a72968..e461364c48 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -62,13 +62,12 @@ typedef struct { char *name; - unsigned int freq, srate, diseqc; + int freq, srate, diseqc, tone; char pol; - unsigned int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; - bool is_dvb_x2; - unsigned int delsys; - unsigned int stream_id; - unsigned int service_id; + int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; + bool is_dvb_s2; + int stream_id; + int service_id; fe_spectral_inversion_t inv; fe_modulation_t mod; fe_transmit_mode_t trans; @@ -79,96 +78,57 @@ typedef struct { } dvb_channel_t; typedef struct { - unsigned int NUM_CHANNELS; - unsigned int current; + uint16_t NUM_CHANNELS; + uint16_t current; dvb_channel_t *channels; -} dvb_channels_list_t; +} dvb_channels_list; typedef struct { + int type; + dvb_channels_list *list; + char *name; int devno; - unsigned int delsys_mask; - dvb_channels_list_t *list; -} dvb_adapter_config_t; +} dvb_card_config_t; typedef struct { - unsigned int adapters_count; - dvb_adapter_config_t *adapters; - unsigned int cur_adapter; + int count; + dvb_card_config_t *cards; + int card; int fe_fd; int dvr_fd; int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; + dvb_channels_list *list; + int tuner_type; int is_on; int retry; int timeout; - unsigned int last_freq; + int last_freq; bool switching_channel; bool stream_used; } dvb_state_t; -typedef struct { +typedef struct dvb_params { struct mp_log *log; dvb_state_t *state; char *cfg_prog; - int cfg_devno; + int cfg_card; int cfg_timeout; char *cfg_file; int cfg_full_transponder; } dvb_priv_t; - -/* Keep in sync with enum fe_delivery_system. */ -#ifndef DVB_USE_S2API -# define SYS_DVBC_ANNEX_A 1 -# define SYS_DVBT 3 -# define SYS_DVBS 5 -# define SYS_DVBS2 6 -# define SYS_ATSC 11 -# define SYS_DVBT2 16 -# define SYS_DVBC_ANNEX_C 18 -#endif -#define SYS_DVB__COUNT__ (SYS_DVBC_ANNEX_C + 1) - - -#define DELSYS_BIT(__bit) (((unsigned int)1) << (__bit)) - -#define DELSYS_SET(__mask, __bit) \ - (__mask) |= DELSYS_BIT((__bit)) - -#define DELSYS_IS_SET(__mask, __bit) \ - (0 != ((__mask) & DELSYS_BIT((__bit)))) - - -#ifdef DVB_ATSC -#define DELSYS_SUPP_MASK \ - ( \ - DELSYS_BIT(SYS_DVBC_ANNEX_A) | \ - DELSYS_BIT(SYS_DVBT) | \ - DELSYS_BIT(SYS_DVBS) | \ - DELSYS_BIT(SYS_DVBS2) | \ - DELSYS_BIT(SYS_ATSC) | \ - DELSYS_BIT(SYS_DVBT2) | \ - DELSYS_BIT(SYS_DVBC_ANNEX_C) \ - ) -#else -#define DELSYS_SUPP_MASK \ - ( \ - DELSYS_BIT(SYS_DVBC_ANNEX_A) | \ - DELSYS_BIT(SYS_DVBT) | \ - DELSYS_BIT(SYS_DVBS) | \ - DELSYS_BIT(SYS_DVBS2) | \ - DELSYS_BIT(SYS_DVBT2) | \ - DELSYS_BIT(SYS_DVBC_ANNEX_C) \ - ) -#endif - +#define TUNER_SAT 1 +#define TUNER_TER 2 +#define TUNER_CBL 3 +#define TUNER_ATSC 4 int dvb_step_channel(stream_t *, int); -int dvb_set_channel(stream_t *, unsigned int, unsigned int); +int dvb_set_channel(stream_t *, int, int); dvb_state_t *dvb_get_state(stream_t *); void dvb_free_state(dvb_state_t *); -- cgit v1.2.3