diff --git a/config.c b/config.c index 2243aaa..e077e5c 100644 --- a/config.c +++ b/config.c @@ -19,6 +19,7 @@ cSatipConfig::cSatipConfig(void) useBytesM(1), portRangeStartM(0), portRangeStopM(0), + useRtpOverTcpM(false), detachedModeM(false), disableServerQuirksM(false), useSingleModelServersM(false) diff --git a/config.h b/config.h index b11b1d8..87a469e 100644 --- a/config.h +++ b/config.h @@ -21,6 +21,7 @@ private: unsigned int useBytesM; unsigned int portRangeStartM; unsigned int portRangeStopM; + bool useRtpOverTcpM; bool detachedModeM; bool disableServerQuirksM; bool useSingleModelServersM; @@ -69,6 +70,7 @@ public: int GetCICAM(unsigned int indexP) const; unsigned int GetEITScan(void) const { return eitScanM; } unsigned int GetUseBytes(void) const { return useBytesM; } + bool GetUseRtpOverTcp(void) const { return useRtpOverTcpM; } bool GetDetachedMode(void) const { return detachedModeM; } bool GetDisableServerQuirks(void) const { return disableServerQuirksM; } bool GetUseSingleModelServers(void) const { return useSingleModelServersM; } @@ -85,6 +87,7 @@ public: void SetCICAM(unsigned int indexP, int cicamP); void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; } void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; } + void SetUseRtpOverTcp(bool onOffP) { useRtpOverTcpM = onOffP; } void SetDetachedMode(bool onOffP) { detachedModeM = onOffP; } void SetDisableServerQuirks(bool onOffP) { disableServerQuirksM = onOffP; } void SetUseSingleModelServers(bool onOffP) { useSingleModelServersM = onOffP; } diff --git a/po/ca_ES.po b/po/ca_ES.po index 1eac371..a22b176 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -178,6 +178,15 @@ msgstr "Filtra" msgid "Define an ill-behaving filter to be blacklisted." msgstr "Definir un filtre mal comportar a la llista negra." +msgid "Use RTP-over-TCP mode" +msgstr "" + +msgid "" +"Define whether the RTP-over-TCP mode shall be used.\n" +"\n" +"This setting affects only SAT>IP devices supporting the feature." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Activa SAT>IP servers:" diff --git a/po/de_DE.po b/po/de_DE.po index 1a0c4a7..b6881b8 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -178,6 +178,15 @@ msgstr "Filter" msgid "Define an ill-behaving filter to be blacklisted." msgstr "Bestimme einen fehlerhaften Filter der ausgeblendet werden soll." +msgid "Use RTP-over-TCP mode" +msgstr "" + +msgid "" +"Define whether the RTP-over-TCP mode shall be used.\n" +"\n" +"This setting affects only SAT>IP devices supporting the feature." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Aktive SAT>IP Server:" diff --git a/po/es_ES.po b/po/es_ES.po index 5200c21..1986b1f 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -178,6 +178,15 @@ msgstr "Filtra" msgid "Define an ill-behaving filter to be blacklisted." msgstr "Define un filtro para poner en la lista negra." +msgid "Use RTP-over-TCP mode" +msgstr "" + +msgid "" +"Define whether the RTP-over-TCP mode shall be used.\n" +"\n" +"This setting affects only SAT>IP devices supporting the feature." +msgstr "" + msgid "Active SAT>IP servers:" msgstr "Activa SAT>IP servers:" diff --git a/po/fi_FI.po b/po/fi_FI.po index 5cd9d72..d522ddc 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -177,6 +177,18 @@ msgstr "Suodatin" msgid "Define an ill-behaving filter to be blacklisted." msgstr "Määrittele käytöstä poistettava suodatin, joka lisätään mustalle listalle." +msgid "Use RTP-over-TCP mode" +msgstr "Käytä RTP-over-TCP -moodia" + +msgid "" +"Define whether the RTP-over-TCP mode shall be used.\n" +"\n" +"This setting affects only SAT>IP devices supporting the feature." +msgstr "" +"Määrittele RTP-over-TCP -moodin käyttöönotto.\n" +"\n" +"Tämä asetus vaikuttaa vain SAT>IP-laitteisiin, jotka tukevat kyseistä ominaisuutta." + msgid "Active SAT>IP servers:" msgstr "Aktiiviset SAT>IP-palvelimet:" diff --git a/rtsp.c b/rtsp.c index 562626e..3d1319e 100644 --- a/rtsp.c +++ b/rtsp.c @@ -171,9 +171,9 @@ bool cSatipRtsp::Options(const char *uriP) return result; } -bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP) +bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP, bool useTcpP) { - debug1("%s (%s, %d, %d) [device %d]", __PRETTY_FUNCTION__, uriP, rtpPortP, rtcpPortP, tunerM.GetId()); + debug1("%s (%s, %d, %d, %d) [device %d]", __PRETTY_FUNCTION__, uriP, rtpPortP, rtcpPortP, useTcpP, tunerM.GetId()); bool result = false; if (handleM && !isempty(uriP)) { @@ -190,7 +190,8 @@ bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP) default: case cmUnicast: // RTP/AVP;unicast;client_port=- - transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP); + // RTP/AVP/TCP;unicast;client_port=- + transport = cString::sprintf("RTP/AVP%s;unicast;client_port=%d-%d", useTcpP ? "/TCP" : "", rtpPortP, rtcpPortP); break; } diff --git a/rtsp.h b/rtsp.h index 1897ac6..4cefe6c 100644 --- a/rtsp.h +++ b/rtsp.h @@ -56,7 +56,7 @@ public: cString RtspUnescapeString(const char *strP); void Reset(void); bool Options(const char *uriP); - bool Setup(const char *uriP, int rtpPortP, int rtcpPortP); + bool Setup(const char *uriP, int rtpPortP, int rtcpPortP, bool useTcpP); bool SetSession(const char *sessionP); bool Describe(const char *uriP); bool Play(const char *uriP); diff --git a/satip.c b/satip.c index 7ef2a86..4cb0cd0 100644 --- a/satip.c +++ b/satip.c @@ -386,6 +386,8 @@ bool cPluginSatip::SetupParse(const char *nameP, const char *valueP) for (unsigned int i = 0; i < DisabledFiltersCount; ++i) SatipConfig.SetDisabledFilters(i, DisabledFilters[i]); } + else if (!strcasecmp(nameP, "UseRtpOverTcp")) + SatipConfig.SetUseRtpOverTcp(atoi(valueP)); else return false; return true; diff --git a/server.c b/server.c index 6506249..9ae8b0c 100644 --- a/server.c +++ b/server.c @@ -102,6 +102,14 @@ cSatipServer::cSatipServer(const char *addressP, const int portP, const char *mo quirkM |= eSatipQuirkSessionId; quirksM = cString::sprintf("%s%sSessionId", *quirksM, isempty(*quirksM) ? "" : ","); } + // These devices contain support for RTP over TCP: + if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400 + strstr(*descriptionM, "DIGIBIT") || // Telestar Digibit R1 + strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400 + ) { + quirkM |= eSatipQuirkRtpOverTcp; + quirksM = cString::sprintf("%s%sRtpOverTcp", *quirksM, isempty(*quirksM) ? "" : ","); + } // These devices contain a play (add/delpids) parameter bug: if (strstr(*descriptionM, "fritzdvbc") // Fritz!WLAN Repeater DVB-C ) { diff --git a/server.h b/server.h index cdccd3a..63821b6 100644 --- a/server.h +++ b/server.h @@ -67,11 +67,12 @@ private: public: enum eSatipQuirk { - eSatipQuirkNone = 0x00, - eSatipQuirkSessionId = 0x01, - eSatipQuirkPlayPids = 0x02, - eSatipQuirkForceLock = 0x04, - eSatipQuirkMask = 0x0F + eSatipQuirkNone = 0x00, + eSatipQuirkSessionId = 0x01, + eSatipQuirkPlayPids = 0x02, + eSatipQuirkForceLock = 0x04, + eSatipQuirkRtpOverTcp = 0x08, + eSatipQuirkMask = 0x0F }; cSatipServer(const char *addressP, const int portP, const char *modelP, const char *descriptionP); virtual ~cSatipServer(); diff --git a/setup.c b/setup.c index 479ea97..a67dd14 100644 --- a/setup.c +++ b/setup.c @@ -332,6 +332,7 @@ eOSState cSatipMenuInfo::ProcessKey(eKeys keyP) cSatipPluginSetup::cSatipPluginSetup() : detachedModeM(SatipConfig.GetDetachedMode()), deviceCountM(0), + useRtpOverTcpM(SatipConfig.GetUseRtpOverTcp()), operatingModeM(SatipConfig.GetOperatingMode()), ciExtensionM(SatipConfig.GetCIExtension()), eitScanM(SatipConfig.GetEITScan()), @@ -400,6 +401,8 @@ void cSatipPluginSetup::Setup(void) helpM.Append(tr("Define an ill-behaving filter to be blacklisted.")); } } + Add(new cMenuEditBoolItem(tr("Use RTP-over-TCP mode"), &useRtpOverTcpM)); + helpM.Append(tr("Define whether the RTP-over-TCP mode shall be used.\n\nThis setting affects only SAT>IP devices supporting the feature.")); Add(new cOsdItem(tr("Active SAT>IP servers:"), osUnknown, false)); helpM.Append(""); @@ -546,6 +549,7 @@ void cSatipPluginSetup::StoreFilters(const char *nameP, int *valuesP) void cSatipPluginSetup::Store(void) { // Store values into setup.conf + SetupStore("UseRtpOverTcp", useRtpOverTcpM); SetupStore("OperatingMode", operatingModeM); SetupStore("EnableCIExtension", ciExtensionM); SetupStore("EnableEITScan", eitScanM); @@ -553,6 +557,7 @@ void cSatipPluginSetup::Store(void) StoreSources("DisabledSources", disabledSourcesM); StoreFilters("DisabledFilters", disabledFilterIndexesM); // Update global config + SatipConfig.SetUseRtpOverTcp(useRtpOverTcpM); SatipConfig.SetOperatingMode(operatingModeM); SatipConfig.SetCIExtension(ciExtensionM); SatipConfig.SetEITScan(eitScanM); diff --git a/setup.h b/setup.h index d8dcd66..b00137a 100644 --- a/setup.h +++ b/setup.h @@ -17,6 +17,7 @@ class cSatipPluginSetup : public cMenuSetupPage private: bool detachedModeM; int deviceCountM; + int useRtpOverTcpM; int operatingModeM; const char *operatingModeTextsM[cSatipConfig::eOperatingModeCount]; int ciExtensionM; diff --git a/tuner.c b/tuner.c index a475cd8..d49791a 100644 --- a/tuner.c +++ b/tuner.c @@ -221,10 +221,11 @@ bool cSatipTuner::Connect(void) } else if (rtspM.Options(*connectionUri)) { cString uri = cString::sprintf("%s?%s", *connectionUri, *streamParamM); + bool useTcp = SatipConfig.GetUseRtpOverTcp() && nextServerM.IsValid() && nextServerM.IsQuirk(cSatipServer::eSatipQuirkRtpOverTcp); // Flush any old content //rtpM.Flush(); //rtcpM.Flush(); - if (rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port())) { + if (rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port(), useTcp)) { keepAliveM.Set(timeoutM); if (nextServerM.IsValid()) { currentServerM = nextServerM;