Project

General

Profile

Actions

Feature #4938

closed

SAT>IP: Add Transport Protocol to Input Name

Added by Mono Polimorph about 7 years ago. Updated over 6 years ago.

Status:
Fixed
Priority:
Normal
Category:
SAT>IP
Target version:
-
Start date:
2018-02-13
Due date:
% Done:

0%

Estimated time:

Description

Hi Jaroslav,

With this patch the name of the Input SAT>IP Tuners it's enhanced with the Transport Protocol. It adds to the name the configured type. With this, it's more clear in the UI to view wich tuners will use the standard RTP or the Interlaved AVP/TCP. Futhermore, when other transport protocols will be implemented (for example, multicast) the code can be updated without much effort to print the new ones.

diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c
index 43bda82..bfefdf4 100644
--- a/src/input/mpegts/satip/satip_frontend.c
+++ b/src/input/mpegts/satip/satip_frontend.c
@@ -2255,9 +2255,25 @@ satip_frontend_create
       (strncmp(lfe->mi_name, "SAT>IP ", 7) == 0 &&
        strstr(lfe->mi_name, " Tuner ") &&
        strstr(lfe->mi_name, " #"))) {
-    snprintf(lname, sizeof(lname), "SAT>IP %s Tuner #%i (%s)",
+    char transport[4];
+    switch (lfe->sf_transport_mode) {
+      case RTP_SERVER_DEFAULT:
+        strcpy(transport, lfe->sf_device->sd_tcp_mode ? "AVP" : "RTP");
+        break;
+      case RTP_UDP:
+        strcpy(transport,"RTP");
+        break;
+      case RTP_INTERLEAVED:
+        strcpy(transport,"AVP");
+        break;
+      default:
+        strcpy(transport,"\0");
+        break;
+    }
+    snprintf(lname, sizeof(lname), "SAT>IP %s Tuner #%i (%s/%s)",
              dvb_type2str(type), num,
-             satip_device_nicename(sd, nname, sizeof(nname)));
+             satip_device_nicename(sd, nname, sizeof(nname)),
+             transport);
     free(lfe->mi_name);
     lfe->mi_name = strdup(lname);
   }

I hope you commit the patch soon! ;)
Regards.


Files

Actions

Also available in: Atom PDF