Project

General

Profile

Bug #4754

SAT>IP Client: Trace SETUP, PLAY and OPTIONS commands

Added by Mono Polimorph almost 7 years ago. Updated almost 7 years ago.

Status:
Fixed
Priority:
Normal
Category:
SAT>IP
Target version:
-
Start date:
2017-11-30
Due date:
% Done:

100%

Estimated time:
Found in version:
head
Affected Versions:

Description

Hi Jaroslav,

This simple patch improves the TRACE function of the RTSP commands in the CLIENT side.

Please, commit it too! ;)
Regards.

diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c
index a842670..c3ca458 100644
--- a/src/input/mpegts/satip/satip_frontend.c
+++ b/src/input/mpegts/satip/satip_frontend.c
@@ -2015,6 +2015,7 @@ new_tune:
     if (rtsp->hc_ping_time + sec2mono(rtsp->hc_rtp_timeout / 2) < mclk() &&
         rtsp->hc_cmd == HTTP_CMD_NONE) {
       rtsp_options(rtsp);
+      tvhtrace(LS_SATIP, "OPTIONS request");
       reply = 1;
     }

diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c
index 71abaa1..a3df237 100644
--- a/src/input/mpegts/satip/satip_rtsp.c
+++ b/src/input/mpegts/satip/satip_rtsp.c
@@ -233,7 +233,7 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe,
       strcat(buf, ",21");
   } else if (flags & SATIP_SETUP_PIDS21)
     strcat(buf, "&pids=21");
-  tvhtrace(LS_SATIP, "setup params - %s", buf);
+  tvhtrace(LS_SATIP, "SETUP params - %s", buf);
   if (hc->hc_rtsp_stream_id >= 0)
     snprintf(stream = _stream, sizeof(_stream), "/stream=%li",
              hc->hc_rtsp_stream_id);
@@ -309,6 +309,7 @@ satip_rtsp_play( http_client_t *hc, const char *pids,
     snprintf(stream = _stream, sizeof(_stream), "/stream=%li",
              hc->hc_rtsp_stream_id);
   query = htsbuf_to_string(&q);
+  tvhtrace(LS_SATIP, "PLAY params - %s", query);
   r = rtsp_play(hc, stream, query);
   free(query);
   if (r >= 0 && split) {

Files

History

#1

Updated by Mono Polimorph almost 7 years ago

Hi,

I forgot to add the TEARDOWN request. Here the final patch:

diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c
index f4bbb62..4d173a0 100644
--- a/src/input/mpegts/satip/satip_frontend.c
+++ b/src/input/mpegts/satip/satip_frontend.c
@@ -1304,6 +1304,7 @@ satip_frontend_extra_shutdown
   rtsp->hc_efd = efd;

   snprintf(b, sizeof(b), "/stream=%li", stream_id);
+  tvhtrace(LS_SATIP, "TEARDOWN request");
   r = rtsp_teardown(rtsp, b, NULL);
   if (r < 0) {
     tvhtrace(LS_SATIP, "bad shutdown for session %s stream id %li", session, stream_id);
@@ -1994,6 +1995,7 @@ new_tune:
     if (rtsp->hc_ping_time + sec2mono(rtsp->hc_rtp_timeout / 2) < mclk() &&
         rtsp->hc_cmd == HTTP_CMD_NONE) {
       rtsp_options(rtsp);
+      tvhtrace(LS_SATIP, "OPTIONS request");
       reply = 1;
     }

diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c
index 71abaa1..a3df237 100644
--- a/src/input/mpegts/satip/satip_rtsp.c
+++ b/src/input/mpegts/satip/satip_rtsp.c
@@ -233,7 +233,7 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe,
       strcat(buf, ",21");
   } else if (flags & SATIP_SETUP_PIDS21)
     strcat(buf, "&pids=21");
-  tvhtrace(LS_SATIP, "setup params - %s", buf);
+  tvhtrace(LS_SATIP, "SETUP params - %s", buf);
   if (hc->hc_rtsp_stream_id >= 0)
     snprintf(stream = _stream, sizeof(_stream), "/stream=%li",
              hc->hc_rtsp_stream_id);
@@ -309,6 +309,7 @@ satip_rtsp_play( http_client_t *hc, const char *pids,
     snprintf(stream = _stream, sizeof(_stream), "/stream=%li",
              hc->hc_rtsp_stream_id);
   query = htsbuf_to_string(&q);
+  tvhtrace(LS_SATIP, "PLAY params - %s", query);
   r = rtsp_play(hc, stream, query);
   free(query);
   if (r >= 0 && split) {

Please, commit it! ;)

#2

Updated by Jaroslav Kysela almost 7 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|9303145bd511751186a06c30f56e36bb9ebad907.

#3

Updated by Mono Polimorph almost 7 years ago

Jaroslav Kysela wrote:

Applied in changeset commit:tvheadend|9303145bd511751186a06c30f56e36bb9ebad907.

Thank you!
And good for improving it! ;)

Also available in: Atom PDF