Delete unused method SetSelectiveRetransmissions

Bug: None
Change-Id: I5a59b5776fe537ec380629f9e5e9ac98c9e1214b
Reviewed-on: https://webrtc-review.googlesource.com/c/119920
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26407}
This commit is contained in:
Niels Möller
2019-01-25 14:02:49 +01:00
committed by Commit Bot
parent 728b5a4033
commit bebca61e5e
9 changed files with 1 additions and 93 deletions

View File

@ -384,21 +384,6 @@ class RtpRtcp : public Module, public RtcpFeedbackSenderInterface {
// (NACK)
// TODO(holmer): Propagate this API to VideoEngine.
// Returns the currently configured selective retransmission settings.
virtual int SelectiveRetransmissions() const = 0;
// TODO(holmer): Propagate this API to VideoEngine.
// Sets the selective retransmission settings, which will decide which
// packets will be retransmitted if NACKed. Settings are constructed by
// combining the constants in enum RetransmissionMode with bitwise OR.
// All packets are retransmitted if kRetransmitAllPackets is set, while no
// packets are retransmitted if kRetransmitOff is set.
// By default all packets except FEC packets are retransmitted. For VP8
// with temporal scalability only base layer packets are retransmitted.
// Returns -1 on failure, otherwise 0.
virtual int SetSelectiveRetransmissions(uint8_t settings) = 0;
// Sends a Negative acknowledgement packet.
// Returns -1 on failure else 0.
// TODO(philipel): Deprecate this and start using SendNack instead, mostly

View File

@ -153,8 +153,6 @@ class MockRtpRtcp : public RtpRtcp {
MOCK_CONST_METHOD0(TMMBR, bool());
MOCK_METHOD1(SetTMMBRStatus, void(bool enable));
MOCK_METHOD1(OnBandwidthEstimateUpdate, void(uint16_t bandwidth_kbit));
MOCK_CONST_METHOD0(SelectiveRetransmissions, int());
MOCK_METHOD1(SetSelectiveRetransmissions, int(uint8_t settings));
MOCK_METHOD2(SendNACK, int32_t(const uint16_t* nack_list, uint16_t size));
MOCK_METHOD1(SendNack, void(const std::vector<uint16_t>& sequence_numbers));
MOCK_METHOD2(SetStorePacketsStatus,

View File

@ -676,17 +676,6 @@ void ModuleRtpRtcpImpl::SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) {
rtcp_sender_.SetTmmbn(std::move(bounding_set));
}
// Returns the currently configured retransmission mode.
int ModuleRtpRtcpImpl::SelectiveRetransmissions() const {
return rtp_sender_->SelectiveRetransmissions();
}
// Enable or disable a retransmission mode, which decides which packets will
// be retransmitted if NACKed.
int ModuleRtpRtcpImpl::SetSelectiveRetransmissions(uint8_t settings) {
return rtp_sender_->SetSelectiveRetransmissions(settings);
}
// Send a Negative acknowledgment packet.
int32_t ModuleRtpRtcpImpl::SendNACK(const uint16_t* nack_list,
const uint16_t size) {

View File

@ -232,10 +232,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
// (NACK) Negative acknowledgment part.
int SelectiveRetransmissions() const override;
int SetSelectiveRetransmissions(uint8_t settings) override;
// Send a Negative acknowledgment packet.
// TODO(philipel): Deprecate SendNACK and use SendNack instead.
int32_t SendNACK(const uint16_t* nack_list, uint16_t size) override;

View File

@ -255,39 +255,7 @@ class RtpRtcpImplTest : public ::testing::Test {
}
};
TEST_F(RtpRtcpImplTest, SetSelectiveRetransmissions_BaseLayer) {
sender_.impl_->SetSelectiveRetransmissions(kRetransmitBaseLayer);
EXPECT_EQ(kRetransmitBaseLayer, sender_.impl_->SelectiveRetransmissions());
// Send frames.
EXPECT_EQ(0, sender_.RtpSent());
SendFrame(&sender_, kBaseLayerTid); // kSequenceNumber
SendFrame(&sender_, kHigherLayerTid); // kSequenceNumber + 1
SendFrame(&sender_, kNoTemporalIdx); // kSequenceNumber + 2
EXPECT_EQ(3, sender_.RtpSent());
EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
// Min required delay until retransmit = 5 + RTT ms (RTT = 0).
clock_.AdvanceTimeMilliseconds(5);
// Frame with kBaseLayerTid re-sent.
IncomingRtcpNack(&sender_, kSequenceNumber);
EXPECT_EQ(4, sender_.RtpSent());
EXPECT_EQ(kSequenceNumber, sender_.LastRtpSequenceNumber());
// Frame with kHigherLayerTid not re-sent.
IncomingRtcpNack(&sender_, kSequenceNumber + 1);
EXPECT_EQ(4, sender_.RtpSent());
// Frame with kNoTemporalIdx re-sent.
IncomingRtcpNack(&sender_, kSequenceNumber + 2);
EXPECT_EQ(5, sender_.RtpSent());
EXPECT_EQ(kSequenceNumber + 2, sender_.LastRtpSequenceNumber());
}
TEST_F(RtpRtcpImplTest, SetSelectiveRetransmissions_HigherLayers) {
const uint8_t kSetting = kRetransmitBaseLayer + kRetransmitHigherLayers;
sender_.impl_->SetSelectiveRetransmissions(kSetting);
EXPECT_EQ(kSetting, sender_.impl_->SelectiveRetransmissions());
TEST_F(RtpRtcpImplTest, RetransmitsAllLayers) {
// Send frames.
EXPECT_EQ(0, sender_.RtpSent());
SendFrame(&sender_, kBaseLayerTid); // kSequenceNumber

View File

@ -650,19 +650,6 @@ bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet,
return true;
}
int RTPSender::SelectiveRetransmissions() const {
if (!video_)
return -1;
return video_->SelectiveRetransmissions();
}
int RTPSender::SetSelectiveRetransmissions(uint8_t settings) {
if (!video_)
return -1;
video_->SetSelectiveRetransmissions(settings);
return 0;
}
void RTPSender::OnReceivedNack(
const std::vector<uint16_t>& nack_sequence_numbers,
int64_t avg_rtt) {

View File

@ -138,8 +138,6 @@ class RTPSender {
size_t TimeToSendPadding(size_t bytes, const PacedPacketInfo& pacing_info);
// NACK.
int SelectiveRetransmissions() const;
int SetSelectiveRetransmissions(uint8_t settings);
void OnReceivedNack(const std::vector<uint16_t>& nack_sequence_numbers,
int64_t avg_rtt);

View File

@ -653,16 +653,6 @@ uint32_t RTPSenderVideo::PacketizationOverheadBps() const {
.value_or(0);
}
int RTPSenderVideo::SelectiveRetransmissions() const {
rtc::CritScope cs(&crit_);
return retransmission_settings_;
}
void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) {
rtc::CritScope cs(&crit_);
retransmission_settings_ = settings;
}
StorageType RTPSenderVideo::GetStorageType(
uint8_t temporal_id,
int32_t retransmission_settings,

View File

@ -72,9 +72,6 @@ class RTPSenderVideo {
uint32_t FecOverheadRate() const;
uint32_t PacketizationOverheadBps() const;
int SelectiveRetransmissions() const;
void SetSelectiveRetransmissions(uint8_t settings);
protected:
static uint8_t GetTemporalId(const RTPVideoHeader& header);
StorageType GetStorageType(uint8_t temporal_id,