roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

RTCP improvements

Open gavv opened this issue 1 year ago • 0 comments

Follow-up for #14 and #675.

  • [x] Refine packet counter calculation. On receiver, derive it from packet_count in SR, and handle 32-bit wraps. On sender, derive it from ext_first_sn and ext_last_sn, and also handle 32-bit wraps. (add rtcp::PacketCounter)
  • [x] Add fract_loss calculation - loss ratio since last report. (add rtcp::LossEstimator)
  • [ ] Use receive timestamp (RTS) as report time when processing RTCP report.
  • [ ] Support multiple sources on sender (for cases like RaptorQ).
  • [ ] Implement rtcp::IntervalComputer (computes packet generation interval according to algorithm from RFC 3550) and use in rtcp::Communicator instead of hard-coded 200ms report interval.
  • [ ] Add sliding window to rtcp::RttEstimator. Compute moving minimum RTT, and average clock_shift based on it. Adjust communicator RTT tests to ensure that sliding window improves RTT & clock offset estimation precision.
  • [ ] Implement RTCP BYE exchange. Handle exit by signal and ask pipeline to generate BYE. Processing of BYE is already implemented.
  • [x] Fix RTCP multicast support. If receiver RTCP endpoint is bound to multicast address, it should use Report_ToAddress instead of Report_Back mode.
  • [ ] Always collect metrics for all receivers in FeedbackMonitor. If single-receiver mode is enabled, additionally create latency tuner, otherwise just collect metrics. Needed for #681.
  • [ ] Implement local SSRC change in FeedbackMonitor when latency goes out of bounds (to initiate session restart on remote side).
  • [ ] Add tests with real captured packets.
  • [ ] Schedule pipeline refresh() according to nearest deadline returned from RTCP.
  • [ ] Handle system clock jumps in pipeline (since it breaks RTCP).

gavv avatar Jan 20 '24 14:01 gavv