]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Improve a few debug messages.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 1 Jan 2022 19:01:20 +0000 (19:01 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 1 Jan 2022 19:01:20 +0000 (19:01 +0000)
player.c
rtp.c
rtsp.c

index 27b8e69289c5f24d58645a8f01854e91837506f3..db753ba8dd544fc122a52da14dd41ab459fff0ca 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1063,7 +1063,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
 
               int64_t lt = conn->first_packet_time_to_play - local_time_now;
 
-              if (lt < 130000000) {
+              if (lt < 100000000) {
                 debug(1,
                       "Connection %d: Short lead time for first frame %" PRId64
                       ": %f seconds. Flushing 0.5 seconds",
diff --git a/rtp.c b/rtp.c
index cf53c545ed08ca570942290c4342987c1c2e3768..bc3fe8fb2f848099d690c80fb3aabe3bfecc3570 100644 (file)
--- a/rtp.c
+++ b/rtp.c
@@ -1452,9 +1452,8 @@ int get_ptp_anchor_local_time_info(rtsp_conn_info *conn, uint32_t *anchorRTP,
       *anchorRTP = conn->last_anchor_rtptime;
     if (anchorLocalTime != NULL)
       *anchorLocalTime = conn->last_anchor_local_time;
-
-    response = clock_ok;
   }
+  
   return response;
 }
 
diff --git a/rtsp.c b/rtsp.c
index 68180a566ad54ec2d376faa6ac9140d9252d50d0..0a68425e520fbabb81e547b7ac2db50d22e71b79 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -2633,7 +2633,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
       plist_get_string_val(timingProtocol, &timingProtocolString);
       if (timingProtocolString) {
         if (strcmp(timingProtocolString, "PTP") == 0) {
-          debug(2, "Connection %d: SETUP: PTP setup detected.", conn->connection_number);
+          debug(1, "Connection %d: PTP connection from %s:%u to self at %s:%u.", conn->connection_number, conn->client_ip_string, conn->client_rtsp_port,
+                conn->self_ip_string, conn->self_rtsp_port);
           conn->airplay_stream_category = ptp_stream;
           conn->timing_type = ts_ptp;
           get_play_lock(conn);
@@ -2653,8 +2654,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
             uint8_t isRemoteControlOnlyBoolean = 0;
             plist_get_bool_val(isRemoteControlOnly, &isRemoteControlOnlyBoolean);
             if (isRemoteControlOnlyBoolean != 0) {
-              debug(1, "Connection %d: SETUP: Remote Control setup detected.",
-                    conn->connection_number);
+              debug(1, "Connection %d: Remote Control connection from %s:%u to self at %s:%u.", conn->connection_number, conn->client_ip_string, conn->client_rtsp_port,
+                    conn->self_ip_string, conn->self_rtsp_port);
               conn->airplay_stream_category = remote_control_stream;
             } else {
               debug(1,
@@ -2962,7 +2963,7 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
 
       switch (item_value) {
       case 96: {
-        debug(1, "Connection %d. Realtime Audio Stream Detected.", conn->connection_number);
+        debug(1, "Connection %d. Realtime Audio Stream.", conn->connection_number);
         debug_log_rtsp_message(2, "Realtime Audio Stream SETUP incoming message", req);
         // get_play_lock(conn);
         conn->airplay_stream_type = realtime_stream;
@@ -3016,7 +3017,7 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
         conn->rtp_running = 1; // hack!
       } break;
       case 103: {
-        debug(1, "SETUP on Connection %d. Buffered Audio Stream Detected.",
+        debug(1, "Connection %d. Buffered Audio Stream.",
               conn->connection_number);
         debug_log_rtsp_message(2, "Buffered Audio Stream SETUP incoming message", req);
         // get_play_lock(conn);
@@ -5170,7 +5171,7 @@ void *rtsp_listen_loop(__attribute((unused)) void *arg) {
           inet_ntop(conn->connection_ip_family, self_addr, conn->self_ip_string,
                     sizeof(conn->self_ip_string));
 
-          debug(1, "Connection %d: new connection from %s:%u to self at %s:%u.",
+          debug(2, "Connection %d: new connection from %s:%u to self at %s:%u.",
                 conn->connection_number, conn->client_ip_string, conn->client_rtsp_port,
                 conn->self_ip_string, conn->self_rtsp_port);
         } else {