]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9334 revert
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 21 Jul 2016 08:22:37 +0000 (03:22 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 21 Jul 2016 08:22:37 +0000 (03:22 -0500)
src/switch_jitterbuffer.c
src/switch_rtp.c

index 917dcf89647f1cd783a6ae4531c89fdd497913ba..427498a5d2d435265b899a99852a3bb53abdc4e2 100644 (file)
@@ -614,21 +614,18 @@ static inline void add_node(switch_jb_t *jb, switch_rtp_packet_t *packet, switch
        if (jb->type == SJB_VIDEO) {
                if (jb->write_init && ((htons(packet->header.seq) >= htons(jb->highest_wrote_seq) && (ntohl(node->packet.header.ts) > ntohl(jb->highest_wrote_ts))) ||
                                                           (ntohl(jb->highest_wrote_ts) > (UINT_MAX - 1000) && ntohl(node->packet.header.ts) < 1000))) {
+                       jb->complete_frames++;
+                       jb_debug(jb, 2, "WRITE frame ts: %u complete=%u/%u n:%u\n", ntohl(node->packet.header.ts), jb->complete_frames , jb->frame_len, jb->visible_nodes);
                        jb->highest_wrote_ts = packet->header.ts;
                        //verify_oldest_frame(jb);
                } else if (!jb->write_init) {
                        jb->highest_wrote_ts = packet->header.ts;
                }
-               
-               jb->complete_frames++;
-               jb_debug(jb, 2, "WRITE frame ts: %u complete=%u/%u n:%u\n", ntohl(node->packet.header.ts), jb->complete_frames , jb->frame_len, jb->visible_nodes);
-
        } else {
-               
-               jb_debug(jb, 2, "WRITE frame ts: %u complete=%u/%u n:%u\n", ntohl(node->packet.header.ts), jb->complete_frames , jb->frame_len, jb->visible_nodes);
-               jb->complete_frames++;
-
-               if (!jb->write_init) {
+               if (jb->write_init) {
+                       jb_debug(jb, 2, "WRITE frame ts: %u complete=%u/%u n:%u\n", ntohl(node->packet.header.ts), jb->complete_frames , jb->frame_len, jb->visible_nodes);
+                       jb->complete_frames++;
+               } else {
                        jb->highest_wrote_ts = packet->header.ts;
                }
        }
@@ -1272,12 +1269,10 @@ SWITCH_DECLARE(switch_status_t) switch_jb_get_packet(switch_jb_t *jb, switch_rtp
                        (ntohs(jb->highest_read_seq) > USHRT_MAX - 10 && ntohs(node->packet.header.seq) <= 10) ) {
                        jb->highest_read_seq = node->packet.header.seq;
                }
-
-               jb->complete_frames--;
-               jb_debug(jb, 2, "READ frame ts: %u complete=%u/%u n:%u\n", ntohl(node->packet.header.ts), jb->complete_frames , jb->frame_len, jb->visible_nodes);
-
                
                if (jb->read_init && htons(node->packet.header.seq) >= htons(jb->highest_read_seq) && (ntohl(node->packet.header.ts) > ntohl(jb->highest_read_ts))) {
+                       jb->complete_frames--;
+                       jb_debug(jb, 2, "READ frame ts: %u complete=%u/%u n:%u\n", ntohl(node->packet.header.ts), jb->complete_frames , jb->frame_len, jb->visible_nodes);
                        jb->highest_read_ts = node->packet.header.ts;
                } else if (!jb->read_init) {
                        jb->highest_read_ts = node->packet.header.ts;
index 0649be6c2daeae28f569c3cfb0696d238132b558..bf485f4c3eeae1ab46f4aad9d2984c6663a08d2f 100644 (file)
@@ -5802,7 +5802,7 @@ static void handle_nack(switch_rtp_t *rtp_session, uint32_t nack)
                                                          send_msg->header.pt, ntohl(send_msg->header.ts), ntohs(send_msg->header.seq), send_msg->header.m);
 
                }
-               //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "RE----SEND %u\n", ntohs(send_msg->header.seq));
+               //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "RE----SEND %u\n", ntohs(send_msg->header.seq));
                switch_rtp_write_raw(rtp_session, (void *) send_msg, &bytes, SWITCH_FALSE);
        } else {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Cannot send NACK for seq %u\n", ntohs(seq));
@@ -5826,7 +5826,7 @@ static void handle_nack(switch_rtp_t *rtp_session, uint32_t nack)
                                                                          send_msg->header.pt, ntohl(send_msg->header.ts), ntohs(send_msg->header.seq), send_msg->header.m);
                                        
                                }
-                               //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "RE----SEND %u\n", ntohs(send_msg->header.seq));
+                               //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "RE----SEND %u\n", ntohs(send_msg->header.seq));
                                switch_rtp_write_raw(rtp_session, (void *) &send_msg, &bytes, SWITCH_FALSE);
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Cannot send NACK for seq %u\n", ntohs(seq) + i);