diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c index c326233..4b9b0f5 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -198,10 +198,14 @@ static const char *satip_tunercfg_tab[] = { "DVBS2-2,DVBT-2", "DVBT-1,DVBS2-1", "DVBT-2,DVBS2-2", - "DVBS2-1,DVB-C1", - "DVBS2-2,DVB-C2", + "DVBS2-1,DVBC-1", + "DVBS2-2,DVBC-2", "DVBC-1,DVBS2-1", "DVBC-2,DVBS2-2", + "DVBS2-4,DVBT-2", + "DVBS2-4,DVBC-2", + "DVBS2-4,DVBT-2,DVBC-2", + "DVBS2-8,DVBT-4,DVBC-4", NULL }; @@ -257,9 +261,10 @@ const idclass_t satip_device_class = { .type = PT_BOOL, .id = "tcp_mode", - .name = N_("RTP/AVP/TCP (embedded data)"), - .desc = N_("Enable or disable RTP/AVP/TCP transfer mode " - "(embedded data in the RTSP session) support."), + .name = N_("RTP/AVP/TCP transport supported"), + .desc = N_("The server suports the Interlaved TCP transfer mode " + "(embedded data in the RTSP session). And this option " + "enables this mode in all tuners by default."), .opts = PO_ADVANCED, .off = offsetof(satip_device_t, sd_tcp_mode), }, diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index acca4a6..c35011b 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -29,6 +29,15 @@ #include #endif + +typedef enum rtp_transport_mode +{ + RTP_SERVER_DEFAULT, // Use server configuretion + RTP_UDP, // Use regular RTP + RTP_INTERLAVED, // Use Interlaved RTP/AVP/TCP +} rtp_transport_mode_t; + + /* * */ @@ -136,6 +145,17 @@ satip_frontend_class_override_enum( void * p, const char *lang ) return m; } +static htsmsg_t * +satip_frontend_transport_mode_list ( void *o, const char *lang ) +{ + static const struct strtab tab[] = { + { N_("SERVER Config"), RTP_SERVER_DEFAULT }, + { N_("RTP over UDP"), RTP_UDP }, + { N_("TCP Interlaved"), RTP_INTERLAVED }, + }; + return strtab2htsmsg(tab, 1, lang); +} + CLASS_DOC(satip_frontend) const idclass_t satip_frontend_class = @@ -156,6 +176,15 @@ const idclass_t satip_frontend_class = }, { .type = PT_INT, + .id = "transport_mode", + .name = N_("Transport mode"), + .desc = N_("Select the transport used for this tuner."), + .list = satip_frontend_transport_mode_list, + .off = offsetof(satip_frontend_t, sf_transport_mode), + .opts = PO_ADVANCED, + }, + { + .type = PT_INT, .id = "udp_rtp_port", .name = N_("UDP RTP port number (2 ports)"), .desc = N_("Force the local UDP Port number here. The number " @@ -1569,7 +1598,7 @@ new_tune: seq = -1; lfe->sf_seq = -1; play2 = 1; - rtsp_flags = lfe->sf_device->sd_tcp_mode ? SATIP_SETUP_TCP : 0; + rtsp_flags = (lfe->sf_transport_mode == RTP_SERVER_DEFAULT)? lfe->sf_device->sd_tcp_mode : (lfe->sf_transport_mode == RTP_INTERLAVED )? SATIP_SETUP_TCP : 0; if ((rtsp_flags & SATIP_SETUP_TCP) == 0) { if (udp_bind_double(&rtp, &rtcp, diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index 7c49ea1..64ffa90 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -134,6 +134,7 @@ struct satip_frontend char *sf_type_override; int sf_master; int sf_udp_rtp_port; + int sf_transport_mode; int sf_play2; int sf_tdelay; int sf_grace_period;