]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb: split DVB-S muxes with different modulation and FEC
authorJaroslav Kysela <perex@perex.cz>
Fri, 27 May 2016 18:39:54 +0000 (20:39 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 27 May 2016 18:40:02 +0000 (20:40 +0200)
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
src/input/mpegts/mpegts_network_dvb.c

index ac0fe0f444fb4e97b0d9ad839b9077a1cda113a0..d0ccb4b5c8942c4153bf3e6439bc79e2ec1e8e43 100644 (file)
@@ -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 );
index edf8990a6654ba90f1a12410f0d0992be17ef8d3..b10a33aa5666e8bfebd7114c438b02125f5e1541 100644 (file)
@@ -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;