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}
This commit is contained in:
brandtr
2016-11-14 05:14:50 -08:00
committed by Commit bot
parent 7aba0297e6
commit 9dfff29bc4
12 changed files with 150 additions and 58 deletions

View File

@ -19,6 +19,7 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/deprecation.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/random.h"
#include "webrtc/base/rate_statistics.h"
#include "webrtc/base/thread_annotations.h"
@ -122,7 +123,8 @@ class RTPSender {
size_t RtpHeaderExtensionLength() const;
bool TimeToSendPacket(uint16_t sequence_number,
bool TimeToSendPacket(uint32_t ssrc,
uint16_t sequence_number,
int64_t capture_time_ms,
bool retransmission,
int probe_cluster_id);
@ -166,6 +168,8 @@ class RTPSender {
uint32_t SSRC() const;
rtc::Optional<uint32_t> FlexfecSsrc() const;
bool SendToNetwork(std::unique_ptr<RtpPacketToSend> packet,
StorageType storage,
RtpPacketSender::Priority priority);
@ -285,6 +289,9 @@ class RTPSender {
PlayoutDelayOracle playout_delay_oracle_;
RtpPacketHistory packet_history_;
// TODO(brandtr): Remove |flexfec_packet_history_| when the FlexfecSender
// is hooked up to the PacedSender.
RtpPacketHistory flexfec_packet_history_;
// Statistics
rtc::CriticalSection statistics_crit_;