FS-9334 revert
This commit is contained in:
parent
31fee66cda
commit
ec2734c10c
|
@ -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->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))) ||
|
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))) {
|
(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;
|
jb->highest_wrote_ts = packet->header.ts;
|
||||||
//verify_oldest_frame(jb);
|
//verify_oldest_frame(jb);
|
||||||
} else if (!jb->write_init) {
|
} else if (!jb->write_init) {
|
||||||
jb->highest_wrote_ts = packet->header.ts;
|
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 {
|
} else {
|
||||||
|
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_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++;
|
jb->complete_frames++;
|
||||||
|
} else {
|
||||||
if (!jb->write_init) {
|
|
||||||
jb->highest_wrote_ts = packet->header.ts;
|
jb->highest_wrote_ts = packet->header.ts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1273,11 +1270,9 @@ SWITCH_DECLARE(switch_status_t) switch_jb_get_packet(switch_jb_t *jb, switch_rtp
|
||||||
jb->highest_read_seq = node->packet.header.seq;
|
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))) {
|
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;
|
jb->highest_read_ts = node->packet.header.ts;
|
||||||
} else if (!jb->read_init) {
|
} else if (!jb->read_init) {
|
||||||
jb->highest_read_ts = node->packet.header.ts;
|
jb->highest_read_ts = node->packet.header.ts;
|
||||||
|
|
|
@ -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);
|
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);
|
switch_rtp_write_raw(rtp_session, (void *) send_msg, &bytes, SWITCH_FALSE);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Cannot send NACK for seq %u\n", ntohs(seq));
|
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);
|
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);
|
switch_rtp_write_raw(rtp_session, (void *) &send_msg, &bytes, SWITCH_FALSE);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Cannot send NACK for seq %u\n", ntohs(seq) + i);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Cannot send NACK for seq %u\n", ntohs(seq) + i);
|
||||||
|
|
Loading…
Reference in New Issue