From 7c71d410b9d631abf4aeb9e815dd29eaae6c5bc8 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 27 May 2016 20:39:54 +0200 Subject: [PATCH] dvb: split DVB-S muxes with different modulation and FEC It seems that broadcasters do not sync the actual parameters across all transponders (19.2E, 16E etc.). This means that TVH tries to replace parameters, but it's not possible. So create duplicate muxes - and allow users to remove them when broadcasters will behave as they should. --- src/input/mpegts/dvb.h | 7 +++++++ src/input/mpegts/mpegts_network_dvb.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/input/mpegts/dvb.h b/src/input/mpegts/dvb.h index ac0fe0f44..d0ccb4b5c 100644 --- a/src/input/mpegts/dvb.h +++ b/src/input/mpegts/dvb.h @@ -647,6 +647,13 @@ const char *dvb_sat_position_to_str( int position, char *buf, size_t buflen ); const int dvb_sat_position_from_str( const char *buf ); +static inline int dvb_modulation_is_none_or_auto ( int modulation ) +{ + return modulation == DVB_MOD_NONE || + modulation == DVB_MOD_AUTO || + modulation == DVB_MOD_QAM_AUTO; +} + #endif /* ENABLE_MPEGTS_DVB */ void dvb_init ( void ); diff --git a/src/input/mpegts/mpegts_network_dvb.c b/src/input/mpegts/mpegts_network_dvb.c index edf8990a6..b10a33aa5 100644 --- a/src/input/mpegts/mpegts_network_dvb.c +++ b/src/input/mpegts/mpegts_network_dvb.c @@ -533,6 +533,14 @@ dvb_network_find_mux /* DVB-S extra checks */ if (lm->lm_tuning.dmc_fe_type == DVB_TYPE_S) { + /* Same modulation */ + if (!dvb_modulation_is_none_or_auto(lm->lm_tuning.dmc_fe_modulation) && + !dvb_modulation_is_none_or_auto(dmc->dmc_fe_modulation) && + lm->lm_tuning.dmc_fe_modulation != dmc->dmc_fe_modulation) continue; + + /* Same FEC */ + if (lm->lm_tuning.u.dmc_fe_qpsk.fec_inner != dmc->u.dmc_fe_qpsk.fec_inner) continue; + /* Same polarisation */ if (lm->lm_tuning.u.dmc_fe_qpsk.polarisation != dmc->u.dmc_fe_qpsk.polarisation) continue; -- 2.47.3