Make FlexFEC packets paceable through RTPSender.
Prior to this change, FlexFEC packets that were paced would be lost in
the RTPSender, since they were not stored in a packet history. This CL
introduces such a packet history, as well as the needed wireup for
higher layers to be aware that the particular RTPSender is able to
send FlexFEC packets with a particular SSRC.
Updated RTPSender unit test to reflect the fact that paced packets
are now actually sent.
BUG=webrtc:5654
Review-Url: https://codereview.webrtc.org/2491293002
Cr-Commit-Position: refs/heads/master@{#15066}
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 15fb325..8642b02 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -229,6 +229,10 @@
rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type);
}
+rtc::Optional<uint32_t> ModuleRtpRtcpImpl::FlexfecSsrc() const {
+ return rtp_sender_.FlexfecSsrc();
+}
+
int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket(
const uint8_t* rtcp_packet,
const size_t length) {
@@ -400,12 +404,8 @@
int64_t capture_time_ms,
bool retransmission,
int probe_cluster_id) {
- if (SendingMedia() && ssrc == rtp_sender_.SSRC()) {
- return rtp_sender_.TimeToSendPacket(sequence_number, capture_time_ms,
- retransmission, probe_cluster_id);
- }
- // No RTP sender is interested in sending this packet.
- return true;
+ return rtp_sender_.TimeToSendPacket(ssrc, sequence_number, capture_time_ms,
+ retransmission, probe_cluster_id);
}
size_t ModuleRtpRtcpImpl::TimeToSendPadding(size_t bytes,