roc-toolkit
roc-toolkit copied to clipboard
Retransmission support
Problem
Currently we counter packet losses by employing Forward Erasure Corrections.
It would be also interesting to try NACK-based re-transmission (negative acknowledgement, i.e. request to re-transmit a packet), both on its own and in combination with FEC. It may make sense in cases where the latency is not very low.
Solution
The plan is straightforward:
-
Implement a composer and parser for a packet format that will deliver NACKs.
-
Add sender pipeline element that maintains a sliding window of packets, or, more precisely, packet statuses, and sends NACK reports to the receiver.
-
Add receiver pipeline element that maintains a sliding window of packets, handles NACKs, and re-transmits packets when asked.
One thing to take into account is the round-trip time. It's make sense to send NACKs only for packets that are not going to be played earlier than it will have chance to be re-transmitted.
Hence, the sliding window for NACKs should have some lag relative to the current playback position and this lag should be calculated dynamically. We could adjust it on fly or maybe somehow deduce from the information provided by RTCP.
Anyway, the very first re-transmission implementation can ignore this advanced requirement.
Info
This task should be done after #14 (RTCP support). It's planned to 0.2.
We should implement these RFCs:
Related docs:
- https://roc-streaming.org/toolkit/docs/internals/data_flow.html