Remove usage of StorageType enum

Previously the kDontRetransmit value was used to indicate packets that
should not be retransmitted but were put in the RtpPacketHistory anyway
as a temporary storage while waiting for a callback from PacedSender.
Since PacedSender now always owns the delayed packets directly, we can
remove all usage of StorageTye in RtpPacketHistory, and only put
packets there after pacing if RtpPacketToSend::allow_retransmission()
returns true.

Bug: webrtc:10633
Change-Id: I003b76ba43bd87658cc2a39e908fd28ebcd403f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150521
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28974}
This commit is contained in:
Erik Språng
2019-08-27 18:16:26 +02:00
committed by Commit Bot
parent 44bd29a3b0
commit 70768f4a8e
12 changed files with 201 additions and 281 deletions

View File

@ -147,8 +147,16 @@ class RTPSender {
absl::optional<uint32_t> FlexfecSsrc() const;
// Sends packet to |transport_| or to the pacer, depending on configuration.
bool SendToNetwork(std::unique_ptr<RtpPacketToSend> packet);
// TODO(bugs.webrtc.org/10633): Remove once StorageType is gone.
bool SendToNetwork(std::unique_ptr<RtpPacketToSend> packet,
StorageType storage);
StorageType storage) {
if (storage == StorageType::kAllowRetransmission) {
packet->set_allow_retransmission(true);
}
return SendToNetwork(std::move(packet));
}
// Called on update of RTP statistics.
void RegisterRtpStatisticsCallback(StreamDataCountersCallback* callback);