diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c index 0e3f3272..9a238543 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -105,6 +105,13 @@ const idclass_t satip_device_class = .opts = PO_ADVANCED, .off = offsetof(satip_device_t, sd_pids_deladd), }, + { + .type = PT_BOOL, + .id = "pids0", + .name = "PIDs in setup", + .opts = PO_ADVANCED, + .off = offsetof(satip_device_t, sd_pids0), + }, { .type = PT_STR, .id = "addr", @@ -263,6 +270,9 @@ satip_device_hack( satip_device_t *sd ) sd->sd_pids_deladd = 0; tvhwarn("satip", "Detected old Inverto firmware V1.13.0.105 and less"); tvhwarn("satip", "Upgrade to V1.16.0.120 - http://http://www.inverto.tv/support/ - IDL400s"); + } else if (strstr(sd->sd_info.location, ":8888/octonet.xml")) { + /* OctopusNet requires pids in the SETUP RTSP command */ + sd->sd_pids0 = 1; } } diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 80ebee2e..756908f7 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -531,6 +531,11 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name, * DVB-T: * ver=1.1;tuner=,,,,,,,,\ * ,,,,,;pids=,..., + * + * DVB-C (OctopusNet): + * ver=0.9;tuner=,<0>,,<0>,,,,;pids=,... + * example: + * ver=0.9;tuner=1,0,1,0,362.000,6900,dvbc,256qam;pids=0,1,16,17,18 */ /* level: @@ -567,7 +572,25 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name, s = (char *)rtcp + 16; tvhtrace("satip", "Status string: '%s'", s); status = SIGNAL_NONE; - if (strncmp(s, "ver=1.0;", 8) == 0) { + if (strncmp(s, "ver=0.9;tuner=", 14) == 0) { + n = http_tokenize(s + 14, argv, 4, ','); + if (n < 4) + return; + if (atoi(argv[0]) != lfe->sf_number) + return; + mmi->mmi_stats.signal = + (atoi(argv[1]) * 100) / lfe->sf_device->sd_sig_scale; + if (atoi(argv[2]) > 0) + status = SIGNAL_GOOD; + mmi->mmi_stats.snr = atoi(argv[3]); + if (status == SIGNAL_GOOD && + mmi->mmi_stats.signal == 0 && mmi->mmi_stats.snr == 0) { + /* some values that we're tuned */ + mmi->mmi_stats.signal = 50; + mmi->mmi_stats.snr = 12; + } + goto ok; + } else if (strncmp(s, "ver=1.0;", 8) == 0) { if ((s = strstr(s + 8, ";tuner=")) == NULL) return; s += 7; @@ -825,7 +848,8 @@ satip_frontend_input_thread ( void *aux ) r = satip_rtsp_setup(rtsp, lfe->sf_position, lfe->sf_number, - lfe->sf_rtp_port, &lm->lm_tuning); + lfe->sf_rtp_port, &lm->lm_tuning, + lfe->sf_device->sd_pids0); if (r < 0) { tvherror("satip", "%s - failed to tune", buf); return NULL; diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index 5e35f985..a1051c2b 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -78,6 +78,7 @@ struct satip_device int sd_pids_len; int sd_pids_deladd; int sd_sig_scale; + int sd_pids0; }; struct satip_frontend @@ -202,7 +203,8 @@ int satip_satconf_get_position int satip_rtsp_setup( http_client_t *hc, int src, int fe, int udp_port, - const dvb_mux_conf_t *dmc ); + const dvb_mux_conf_t *dmc, + int pids0 ); int satip_rtsp_play( http_client_t *hc, const char *pids, diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c index 4d52a74d..ed0bc831 100644 --- a/src/input/mpegts/satip/satip_rtsp.c +++ b/src/input/mpegts/satip/satip_rtsp.c @@ -70,7 +70,7 @@ satip_rtsp_add_val(const char *name, char *buf, uint32_t val) int satip_rtsp_setup( http_client_t *hc, int src, int fe, - int udp_port, const dvb_mux_conf_t *dmc ) + int udp_port, const dvb_mux_conf_t *dmc, int pids0 ) { static tvh2satip_t msys[] = { { .t = DVB_SYS_DVBT, "dvbt" }, @@ -175,7 +175,10 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, ADD(dmc_fe_delsys, msys, "dvbc"); ADD(dmc_fe_modulation, mtype, "64qam"); /* missing plp */ - ADD(u.dmc_fe_qpsk.fec_inner, fec, "auto"); + if (dmc->u.dmc_fe_qam.fec_inner != DVB_FEC_NONE && + dmc->u.dmc_fe_qam.fec_inner != DVB_FEC_AUTO) + /* note: OctopusNet device does not handle 'fec=auto' */ + ADD(u.dmc_fe_qam.fec_inner, fec, "auto"); } else { if (dmc->u.dmc_fe_ofdm.bandwidth != DVB_BANDWIDTH_AUTO && dmc->u.dmc_fe_ofdm.bandwidth != DVB_BANDWIDTH_NONE) @@ -192,6 +195,8 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, dmc->u.dmc_fe_ofdm.guard_interval != DVB_GUARD_INTERVAL_NONE) ADD(u.dmc_fe_ofdm.guard_interval, gi, "18"); } + if (pids0) + strcat(buf, "&pids=0"); tvhtrace("satip", "setup params - %s", buf); if (hc->hc_rtsp_stream_id >= 0) snprintf(stream = _stream, sizeof(_stream), "/stream=%li",