:
-Option | Description
------------------|------------
-**Auto** | Keep the mux if it doesn't already exist.
-**Keep** | Always keep the mux regardless of whether it exists or not.
-**Reject** | Always reject.
+Option | Description
+------------------------|------------------------------------------
+**Auto** | Keep the mux if it doesn't already exist.
+**Keep** | Always keep the mux regardless of whether it exists or not.
+**Reject** | Always reject.
+**Reject exact match** | Always reject but allow partial match.
( const char *uuid, const idclass_t *idc, htsmsg_t *conf );
dvb_mux_t *dvb_network_find_mux
- ( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid, int check );
+ ( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid, int check, int approx_match );
const idclass_t *dvb_network_mux_class(mpegts_network_t *mn);
int dvb_network_get_orbital_pos(mpegts_network_t *mn);
/* Create */
LIST_FOREACH(dmc, &sfn->sfn_muxes, dmc_link) {
- if (!(mm = dvb_network_find_mux(ln, dmc, MPEGTS_ONID_NONE, MPEGTS_TSID_NONE, 0))) {
+ if (!(mm = dvb_network_find_mux(ln, dmc, MPEGTS_ONID_NONE, MPEGTS_TSID_NONE, 0, 0))) {
mm = dvb_mux_create0(ln, MPEGTS_ONID_NONE, MPEGTS_TSID_NONE,
dmc, NULL, NULL);
if (mm)
dvb_mux_t *
dvb_network_find_mux
- ( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid, int check )
+ ( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid, int check, int approx_match )
{
int deltaf, deltar;
mpegts_mux_t *mm, *mm_alt = NULL;
if (lm->lm_tuning.dmc_fe_type != dmc->dmc_fe_type) continue;
/* Also, the system type should match (DVB-S/DVB-S2) */
- if (lm->lm_tuning.dmc_fe_delsys != dmc->dmc_fe_delsys) continue;
+ if (!approx_match && (lm->lm_tuning.dmc_fe_delsys != dmc->dmc_fe_delsys)) continue;
/* if ONID/TSID are a perfect match (and this is DVB-S, allow greater deltaf) */
if (lm->lm_tuning.dmc_fe_type == DVB_TYPE_S) {
if (dvb_network_check_symbol_rate(lm, dmc, deltar)) continue;
/* DVB-S extra checks */
- if (lm->lm_tuning.dmc_fe_type == DVB_TYPE_S) {
+ if (!approx_match && (lm->lm_tuning.dmc_fe_type == DVB_TYPE_S)) {
/* Same modulation */
if (!dvb_modulation_is_none_or_auto(lm->lm_tuning.dmc_fe_modulation) &&
}
ln = (dvb_network_t*)mn;
- mm = dvb_network_find_mux(ln, dmc, onid, tsid, 0);
+ mm = dvb_network_find_mux(ln, dmc, onid, tsid, 0, 0);
if (!mm && (ln->mn_autodiscovery != MN_DISCOVERY_DISABLE || force)) {
cls = dvb_network_mux_class((mpegts_network_t *)ln);
save |= cls == &dvb_mux_dvbt_class && dmc->dmc_fe_type == DVB_TYPE_T;
if (!mn2) mn2 = mn;
mux = (mpegts_mux_t *)
dvb_network_find_mux((dvb_network_t *)mn, &rs->dmc,
- MPEGTS_ONID_NONE, MPEGTS_TSID_NONE, 1);
+ MPEGTS_ONID_NONE, MPEGTS_TSID_NONE, 1, rtsp_muxcnf == MUXCNF_REJECT_EXACT_MATCH );
if (mux) {
dmc = ((dvb_mux_t *)mux)->lm_tuning;
rs->perm_lock = 0;
dvb_mux_conf_str(&rs->dmc, buf, sizeof(buf));
tvhwarn("satips", "%i/%s/%i: unable to create mux %s%s",
rs->frontend, rs->session, rs->stream, buf,
- rtsp_muxcnf == MUXCNF_REJECT ? " (configuration)" : "");
+ (rtsp_muxcnf == MUXCNF_REJECT || rtsp_muxcnf == MUXCNF_REJECT_EXACT_MATCH ) ? " (configuration)" : "");
goto endclean;
}
if (rs->mux == mux && rs->subs)
static htsmsg_t *satip_server_class_muxcfg_list ( void *o, const char *lang )
{
static const struct strtab tab[] = {
- { N_("Auto"), MUXCNF_AUTO },
- { N_("Keep"), MUXCNF_KEEP },
- { N_("Reject"), MUXCNF_REJECT }
+ { N_("Auto"), MUXCNF_AUTO },
+ { N_("Keep"), MUXCNF_KEEP },
+ { N_("Reject"), MUXCNF_REJECT },
+ { N_("Reject exact match"), MUXCNF_REJECT_EXACT_MATCH }
};
return strtab2htsmsg(tab, 1, lang);
}
#include "udp.h"
#include "http.h"
-#define MUXCNF_AUTO 0
-#define MUXCNF_KEEP 1
-#define MUXCNF_REJECT 2
+#define MUXCNF_AUTO 0
+#define MUXCNF_KEEP 1
+#define MUXCNF_REJECT 2
+#define MUXCNF_REJECT_EXACT_MATCH 3
#define RTSP_TCP_DATA 1000000