Skip to content

Commit

Permalink
Tweak: Extra logs in playout buffer on error/success
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMcFelix committed Nov 26, 2024
1 parent 565cf4a commit 35e4539
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/driver/tasks/udp_rx/playout_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,19 @@ impl PlayoutBuffer {
if ts_diff >= 0 {
// At or before expected timestamp.
self.next_seq = (rtp.get_sequence() + 1).0;

PacketLookup::Packet(pkt)
} else if ts_diff <= -skip_after {
// >5 playouts ahead.
self.next_seq = (rtp.get_sequence() + 1).0;
*curr_ts = pkt_ts;
PacketLookup::Packet(pkt)
} else {
trace!("Witholding packet: ts_diff is {ts_diff}");
trace!(
"Withholding packet({}): ts_diff is {ts_diff}.\
Expected >={curr_ts}, have {pkt_ts} (seq {}).",
rtp.get_ssrc(),
rtp.get_sequence().0,
);
self.buffer.push_front(Some(pkt));
self.playout_mode = PlayoutMode::Fill;
PacketLookup::Filling
Expand Down

0 comments on commit 35e4539

Please sign in to comment.