FS-10083: [freeswitch-core] Video audit
This commit is contained in:
parent
686c0a5e10
commit
1458cfec1c
|
@ -279,7 +279,7 @@ static inline void hide_node(switch_jb_node_t *node, switch_bool_t pop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_core_inthash_delete(jb->node_hash, node->packet.header.seq)) {
|
if (switch_core_inthash_delete(jb->node_hash, node->packet.header.seq)) {
|
||||||
if (node->packet.header.m && jb->type == SJB_VIDEO) {
|
if (jb->type != SJB_VIDEO || node->packet.header.m) {
|
||||||
jb->complete_frames--;
|
jb->complete_frames--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -583,9 +583,7 @@ static inline void add_node(switch_jb_t *jb, switch_rtp_packet_t *packet, switch
|
||||||
|
|
||||||
switch_core_inthash_insert(jb->node_hash, node->packet.header.seq, node);
|
switch_core_inthash_insert(jb->node_hash, node->packet.header.seq, node);
|
||||||
|
|
||||||
if (packet->header.m && jb->type == SJB_VIDEO) {
|
|
||||||
jb->complete_frames++;
|
jb->complete_frames++;
|
||||||
}
|
|
||||||
|
|
||||||
if (jb->node_hash_ts) {
|
if (jb->node_hash_ts) {
|
||||||
switch_core_inthash_insert(jb->node_hash_ts, node->packet.header.ts, node);
|
switch_core_inthash_insert(jb->node_hash_ts, node->packet.header.ts, node);
|
||||||
|
@ -632,7 +630,6 @@ static inline void add_node(switch_jb_t *jb, switch_rtp_packet_t *packet, switch
|
||||||
} else {
|
} else {
|
||||||
if (jb->write_init || jb->type == SJB_TEXT || jb->type == SJB_AUDIO) {
|
if (jb->write_init || jb->type == SJB_TEXT || jb->type == SJB_AUDIO) {
|
||||||
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++;
|
|
||||||
} else {
|
} else {
|
||||||
jb->highest_wrote_ts = packet->header.ts;
|
jb->highest_wrote_ts = packet->header.ts;
|
||||||
}
|
}
|
||||||
|
@ -1298,10 +1295,6 @@ SWITCH_DECLARE(switch_status_t) switch_jb_get_packet(switch_jb_t *jb, switch_rtp
|
||||||
|
|
||||||
if (jb->type == SJB_TEXT || jb->type == SJB_AUDIO ||
|
if (jb->type == SJB_TEXT || jb->type == SJB_AUDIO ||
|
||||||
(jb->read_init && htons(node->packet.header.seq) >= htons(jb->highest_read_seq) && (ntohl(node->packet.header.ts) > ntohl(jb->highest_read_ts)))) {
|
(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->type == SJB_TEXT || jb->type == SJB_AUDIO) {
|
|
||||||
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_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) {
|
||||||
|
|
Loading…
Reference in New Issue