Improve statistics of late packets in depacketizer #658
Labels
easy hacks
The solution is expected to be straightforward even if you are new to the project
enhancement
help wanted
An important and awaited task but we have no human resources for it yet
networking
Network I/O and algorithms
Projects
Problem
Depacketizer class converts sequence of network packets into stream of audio frames.
Among other things, it detects and logs late packets. If packet is missing when it's needed, depacketizer inserts zeros instead of it. If that missing packet arrives later when it's not needed anymore, depacketizer prints messages to log and drops packet.
There are two problems with these log messages:
Solution
Rate-limit messages. Don't report every drop. Instead, report cumulative number of drops periodically. We have core::RateLimiter for this task. You can search code base to see how it is used.
Print additional simple statistics about drops:
Delay is the difference of dropped packet timestamp and current depacketizer timestamp, converted to nanoseconds (SampleSpec has a method for it).
Testing
Run
roc-recv
and roc-send over Wi-Fi. Use loaded or noisy networks and set--sess-latency
ofroc-recv
low enough to observe packet drops.Docs: https://roc-streaming.org/toolkit/docs/tools/command_line_tools.html
The text was updated successfully, but these errors were encountered: