Revert 8028 "Support associated payload type when registering Rt..."
Reasons for revert:
1. glaznev discovered potentially related problems using the Android AppRTCDemo.
2. We're trying to do an M41 webrtc roll in Chromium, and this CL is risky.
> Support associated payload type when registering Rtx payload type.
>
> Major changes include,
> - Add associated payload type for SetRtxSendPayloadType & SetRtxReceivePayloadType.
> - Receiver: Restore RTP packets by the new RTX-APT map.
> - Sender: Send RTP packets by checking RTX-APT map.
> - Add RTX payload type for RED in the default codec list.
>
> BUG=4024
> R=pbos@webrtc.org, stefan@webrtc.org
> TBR=mflodman@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/26259004
>
> Patch from Changbin Shao <changbin.shao@intel.com>.
TBR=pbos@webrtc.org, stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/33829004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@8033 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/config.cc b/config.cc
index a8cb523..357f636 100644
--- a/config.cc
+++ b/config.cc
@@ -17,7 +17,6 @@
std::stringstream ss;
ss << "{ulpfec_payload_type: " << ulpfec_payload_type;
ss << ", red_payload_type: " << red_payload_type;
- ss << ", rtx_payload_type: " << rtx_payload_type;
ss << '}';
return ss.str();
}
diff --git a/config.h b/config.h
index f5a5144..cd5a23f 100644
--- a/config.h
+++ b/config.h
@@ -54,17 +54,13 @@
// Settings for forward error correction, see RFC 5109 for details. Set the
// payload types to '-1' to disable.
struct FecConfig {
- FecConfig()
- : ulpfec_payload_type(-1), red_payload_type(-1), rtx_payload_type(-1) {}
+ FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {}
std::string ToString() const;
// Payload type used for ULPFEC packets.
int ulpfec_payload_type;
// Payload type used for RED packets.
int red_payload_type;
-
- // Rtx payload type for RED payload.
- int rtx_payload_type;
};
// RTP header extension to use for the video stream, see RFC 5285.
diff --git a/modules/rtp_rtcp/interface/rtp_payload_registry.h b/modules/rtp_rtcp/interface/rtp_payload_registry.h
index e73bac3..f58eaea 100644
--- a/modules/rtp_rtcp/interface/rtp_payload_registry.h
+++ b/modules/rtp_rtcp/interface/rtp_payload_registry.h
@@ -79,7 +79,7 @@
bool GetRtxSsrc(uint32_t* ssrc) const;
- void SetRtxPayloadType(int payload_type, int associated_payload_type);
+ void SetRtxPayloadType(int payload_type);
bool IsRtx(const RTPHeader& header) const;
@@ -158,8 +158,7 @@
int8_t last_received_payload_type_;
int8_t last_received_media_payload_type_;
bool rtx_;
- // Mapping rtx_apt_types_[rtx] = apt.
- std::map<int, int> rtx_apt_types_;
+ int8_t payload_type_rtx_;
uint32_t ssrc_rtx_;
};
diff --git a/modules/rtp_rtcp/interface/rtp_rtcp.h b/modules/rtp_rtcp/interface/rtp_rtcp.h
index f1466ae..6b9a554 100644
--- a/modules/rtp_rtcp/interface/rtp_rtcp.h
+++ b/modules/rtp_rtcp/interface/rtp_rtcp.h
@@ -228,8 +228,7 @@
// Sets the payload type to use when sending RTX packets. Note that this
// doesn't enable RTX, only the payload type is set.
- virtual void SetRtxSendPayloadType(int payload_type,
- int associated_payload_type) = 0;
+ virtual void SetRtxSendPayloadType(int payload_type) = 0;
/*
* Get status of sending RTX (RFC 4588) on a specific SSRC.
diff --git a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
index 7c81715..31fade4 100644
--- a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
+++ b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
@@ -101,7 +101,8 @@
void(int* modes, uint32_t* ssrc, int* payload_type));
MOCK_METHOD1(SetRtxSsrc,
void(uint32_t));
- MOCK_METHOD2(SetRtxSendPayloadType, void(int, int));
+ MOCK_METHOD1(SetRtxSendPayloadType,
+ void(int));
MOCK_METHOD1(SetSendingStatus,
int32_t(const bool sending));
MOCK_CONST_METHOD0(Sending,
diff --git a/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index ad553ac..bfe0af0 100644
--- a/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -32,8 +32,6 @@
const uint32_t kTestNumberOfPackets = 1350;
const int kTestNumberOfRtxPackets = 149;
const int kNumFrames = 30;
-const int kPayloadType = 123;
-const int kRtxPayloadType = 98;
class VerifyingRtxReceiver : public NullRtpData
{
@@ -208,17 +206,15 @@
VideoCodec video_codec;
memset(&video_codec, 0, sizeof(video_codec));
- video_codec.plType = kPayloadType;
+ video_codec.plType = 123;
memcpy(video_codec.plName, "I420", 5);
EXPECT_EQ(0, rtp_rtcp_module_->RegisterSendPayload(video_codec));
- rtp_rtcp_module_->SetRtxSendPayloadType(kRtxPayloadType, kPayloadType);
EXPECT_EQ(0, rtp_receiver_->RegisterReceivePayload(video_codec.plName,
video_codec.plType,
90000,
0,
video_codec.maxBitrate));
- rtp_payload_registry_.SetRtxPayloadType(kRtxPayloadType, kPayloadType);
for (size_t n = 0; n < payload_data_length; n++) {
payload_data[n] = n % 10;
@@ -269,9 +265,12 @@
uint32_t timestamp = 3000;
uint16_t nack_list[kVideoNackListSize];
for (int frame = 0; frame < kNumFrames; ++frame) {
- EXPECT_EQ(0, rtp_rtcp_module_->SendOutgoingData(
- webrtc::kVideoFrameDelta, kPayloadType, timestamp,
- timestamp / 90, payload_data, payload_data_length));
+ EXPECT_EQ(0, rtp_rtcp_module_->SendOutgoingData(webrtc::kVideoFrameDelta,
+ 123,
+ timestamp,
+ timestamp / 90,
+ payload_data,
+ payload_data_length));
int length = BuildNackList(nack_list);
if (length > 0)
rtp_rtcp_module_->SendNACK(nack_list, length);
@@ -314,9 +313,12 @@
// Send 30 frames which at the default size is roughly what we need to get
// enough packets.
for (int frame = 0; frame < kNumFrames; ++frame) {
- EXPECT_EQ(0, rtp_rtcp_module_->SendOutgoingData(
- webrtc::kVideoFrameDelta, kPayloadType, timestamp,
- timestamp / 90, payload_data, payload_data_length));
+ EXPECT_EQ(0, rtp_rtcp_module_->SendOutgoingData(webrtc::kVideoFrameDelta,
+ 123,
+ timestamp,
+ timestamp / 90,
+ payload_data,
+ payload_data_length));
// Prepare next frame.
timestamp += 3000;
fake_clock.AdvanceTimeMilliseconds(33);
diff --git a/modules/rtp_rtcp/source/rtp_payload_registry.cc b/modules/rtp_rtcp/source/rtp_payload_registry.cc
index 18aeb11..727a4d3 100644
--- a/modules/rtp_rtcp/source/rtp_payload_registry.cc
+++ b/modules/rtp_rtcp/source/rtp_payload_registry.cc
@@ -24,6 +24,7 @@
last_received_payload_type_(-1),
last_received_media_payload_type_(-1),
rtx_(false),
+ payload_type_rtx_(-1),
ssrc_rtx_(0) {}
RTPPayloadRegistry::~RTPPayloadRegistry() {
@@ -263,25 +264,19 @@
RtpUtility::AssignUWord32ToBuffer(*restored_packet + 8, original_ssrc);
CriticalSectionScoped cs(crit_sect_.get());
- if (!rtx_)
- return true;
- if (rtx_apt_types_.empty()) {
- LOG(LS_WARNING) << "No RTX is set, dropping packet.";
- return false;
- }
- std::map<int, int>::const_iterator it =
- rtx_apt_types_.find(header.payloadType);
- if (it != rtx_apt_types_.end()) {
- (*restored_packet)[1] = static_cast<uint8_t>(it->second);
- if (header.markerBit) {
- (*restored_packet)[1] |= kRtpMarkerBitMask; // Marker bit is set.
+ if (payload_type_rtx_ != -1) {
+ if (header.payloadType == payload_type_rtx_ &&
+ incoming_payload_type_ != -1) {
+ (*restored_packet)[1] = static_cast<uint8_t>(incoming_payload_type_);
+ if (header.markerBit) {
+ (*restored_packet)[1] |= kRtpMarkerBitMask; // Marker bit is set.
+ }
+ } else {
+ LOG(LS_WARNING) << "Incorrect RTX configuration, dropping packet.";
+ return false;
}
- } else {
- LOG(LS_WARNING) << "Incorrect RTX configuration, dropping packet.";
- return false;
}
-
return true;
}
@@ -297,12 +292,10 @@
return rtx_;
}
-void RTPPayloadRegistry::SetRtxPayloadType(int payload_type,
- int associated_payload_type) {
+void RTPPayloadRegistry::SetRtxPayloadType(int payload_type) {
CriticalSectionScoped cs(crit_sect_.get());
assert(payload_type >= 0);
- assert(associated_payload_type >= 0);
- rtx_apt_types_[payload_type] = associated_payload_type;
+ payload_type_rtx_ = payload_type;
rtx_ = true;
}
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 15286cb..4dd74ce 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -257,9 +257,8 @@
rtp_sender_.SetRtxSsrc(ssrc);
}
-void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type,
- int associated_payload_type) {
- rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type);
+void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type) {
+ rtp_sender_.SetRtxPayloadType(payload_type);
}
int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket(
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 6e0e907..ec06783 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -94,8 +94,7 @@
virtual void SetRtxSsrc(uint32_t ssrc) OVERRIDE;
- virtual void SetRtxSendPayloadType(int payload_type,
- int associated_payload_type) OVERRIDE;
+ virtual void SetRtxSendPayloadType(int payload_type) OVERRIDE;
// Sends kRtcpByeCode when going from true to false.
virtual int32_t SetSendingStatus(bool sending) OVERRIDE;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
index 726d6f1..3f9e95f 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
@@ -691,7 +691,7 @@
// as otherwise the timestmap used for BWE will be broken.
senders_[i]->RegisterSendRtpHeaderExtension(kRtpExtensionAbsoluteSendTime,
1);
- senders_[i]->SetRtxSendPayloadType(96, 100);
+ senders_[i]->SetRtxSendPayloadType(96);
senders_[i]->SetRtxSsrc(kSenderRtxSsrc + i);
senders_[i]->SetRTXSendStatus(kRtxRetransmitted);
}
@@ -716,7 +716,7 @@
TEST_F(RtpSendingTest, DISABLED_RoundRobinPaddingRtxRedundantPayloads) {
for (int i = 1; i < codec_.numberOfSimulcastStreams + 1; ++i) {
- senders_[i]->SetRtxSendPayloadType(96, 100);
+ senders_[i]->SetRtxSendPayloadType(96);
senders_[i]->SetRtxSsrc(kSenderRtxSsrc + i);
senders_[i]->SetRTXSendStatus(kRtxRetransmitted | kRtxRedundantPayloads);
senders_[i]->SetStorePacketsStatus(true, 100);
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index 42df579..a1810f2 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -147,6 +147,7 @@
last_packet_marker_bit_(false),
csrcs_(),
rtx_(kRtxOff),
+ payload_type_rtx_(-1),
target_bitrate_critsect_(CriticalSectionWrapper::CreateCriticalSection()),
target_bitrate_(0) {
memset(nack_byte_count_times_, 0, sizeof(nack_byte_count_times_));
@@ -402,17 +403,12 @@
CriticalSectionScoped cs(send_critsect_);
*mode = rtx_;
*ssrc = ssrc_rtx_;
-
- std::map<int, int>::const_iterator it = apt_rtx_types_.find(payload_type_);
- *payload_type = (it == apt_rtx_types_.end()) ? -1 : it->second;
+ *payload_type = payload_type_rtx_;
}
-void RTPSender::SetRtxPayloadType(int payload_type,
- int associated_payload_type) {
+void RTPSender::SetRtxPayloadType(int payload_type) {
CriticalSectionScoped cs(send_critsect_);
- assert(payload_type >= 0);
- assert(associated_payload_type >= 0);
- apt_rtx_types_[associated_payload_type] = payload_type;
+ payload_type_rtx_ = payload_type;
}
int32_t RTPSender::CheckPayloadType(int8_t payload_type,
@@ -614,14 +610,8 @@
ssrc = ssrc_rtx_;
sequence_number = sequence_number_rtx_;
++sequence_number_rtx_;
-
- if (apt_rtx_types_.empty())
- return 0;
- std::map<int, int>::const_iterator it =
- apt_rtx_types_.find(payload_type_);
- payload_type = it != apt_rtx_types_.end()
- ? it->second
- : apt_rtx_types_.begin()->second;
+ payload_type = ((rtx_ & kRtxRedundantPayloads) > 0) ? payload_type_rtx_
+ : payload_type_;
over_rtx = true;
}
}
@@ -1670,10 +1660,9 @@
// Add original RTP header.
memcpy(data_buffer_rtx, buffer, rtp_header.headerLength);
- std::map<int, int>::const_iterator it =
- apt_rtx_types_.find(rtp_header.payloadType);
- if (it != apt_rtx_types_.end()) {
- data_buffer_rtx[1] = static_cast<uint8_t>(it->second);
+ // Replace payload type, if a specific type is set for RTX.
+ if (payload_type_rtx_ != -1) {
+ data_buffer_rtx[1] = static_cast<uint8_t>(payload_type_rtx_);
if (rtp_header.markerBit)
data_buffer_rtx[1] |= kRtpMarkerBitMask;
}
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index c807a5b..2703fea 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -191,7 +191,7 @@
uint32_t RtxSsrc() const;
void SetRtxSsrc(uint32_t ssrc);
- void SetRtxPayloadType(int payloadType, int associated_payload_type);
+ void SetRtxPayloadType(int payloadType);
// Functions wrapping RTPSenderInterface.
virtual int32_t BuildRTPheader(
@@ -391,8 +391,7 @@
std::vector<uint32_t> csrcs_ GUARDED_BY(send_critsect_);
int rtx_ GUARDED_BY(send_critsect_);
uint32_t ssrc_rtx_ GUARDED_BY(send_critsect_);
- // Mapping apt_rtx_types_[apt] = rtx.
- std::map<int, int> apt_rtx_types_ GUARDED_BY(send_critsect_);
+ int payload_type_rtx_ GUARDED_BY(send_critsect_);
// Note: Don't access this variable directly, always go through
// SetTargetBitrateKbps or GetTargetBitrateKbps. Also remember
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index 0a95807..3946c44 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -30,7 +30,6 @@
const int kTransmissionTimeOffsetExtensionId = 1;
const int kAbsoluteSendTimeExtensionId = 14;
const int kPayload = 100;
-const int kRtxPayload = 98;
const uint32_t kTimestamp = 10;
const uint16_t kSeqNum = 33;
const int kTimeOffset = 22222;
@@ -655,7 +654,6 @@
rtp_sender_.reset(new RTPSender(0, false, &fake_clock_, &transport, NULL,
&mock_paced_sender_, NULL, NULL, NULL));
rtp_sender_->SetSequenceNumber(kSeqNum);
- rtp_sender_->SetRtxPayloadType(kRtxPayload, kPayload);
// Make all packets go through the pacer.
EXPECT_CALL(mock_paced_sender_,
SendPacket(PacedSender::kNormalPriority, _, _, _, _, _)).
@@ -1125,7 +1123,7 @@
const uint8_t kPayloadType = 127;
rtp_sender_->SetSSRC(1234);
rtp_sender_->SetRtxSsrc(4321);
- rtp_sender_->SetRtxPayloadType(kPayloadType - 1, kPayloadType);
+ rtp_sender_->SetRtxPayloadType(kPayloadType - 1);
rtp_sender_->SetRTXStatus(kRtxRetransmitted | kRtxRedundantPayloads);
ASSERT_EQ(
diff --git a/modules/rtp_rtcp/test/testAPI/test_api.cc b/modules/rtp_rtcp/test/testAPI/test_api.cc
index f8b6011..ccc8cf2 100644
--- a/modules/rtp_rtcp/test/testAPI/test_api.cc
+++ b/modules/rtp_rtcp/test/testAPI/test_api.cc
@@ -106,31 +106,33 @@
unsigned int ssrc = 0;
int rtx_mode = kRtxOff;
const int kRtxPayloadType = 119;
- const int kPayloadType = 100;
+ int payload_type = -1;
module->SetRTXSendStatus(kRtxRetransmitted);
- module->SetRtxSendPayloadType(kRtxPayloadType, kPayloadType);
+ module->SetRtxSendPayloadType(kRtxPayloadType);
module->SetRtxSsrc(1);
- int payload_type;
module->RTXSendStatus(&rtx_mode, &ssrc, &payload_type);
EXPECT_EQ(kRtxRetransmitted, rtx_mode);
EXPECT_EQ(1u, ssrc);
+ EXPECT_EQ(kRtxPayloadType, payload_type);
rtx_mode = kRtxOff;
module->SetRTXSendStatus(kRtxOff);
- module->SetRtxSendPayloadType(kRtxPayloadType, kPayloadType);
+ payload_type = -1;
+ module->SetRtxSendPayloadType(kRtxPayloadType);
module->RTXSendStatus(&rtx_mode, &ssrc, &payload_type);
EXPECT_EQ(kRtxOff, rtx_mode);
+ EXPECT_EQ(kRtxPayloadType, payload_type);
module->SetRTXSendStatus(kRtxRetransmitted);
module->RTXSendStatus(&rtx_mode, &ssrc, &payload_type);
EXPECT_EQ(kRtxRetransmitted, rtx_mode);
+ EXPECT_EQ(kRtxPayloadType, payload_type);
}
TEST_F(RtpRtcpAPITest, RtxReceiver) {
const uint32_t kRtxSsrc = 1;
const int kRtxPayloadType = 119;
- const int kPayloadType = 100;
EXPECT_FALSE(rtp_payload_registry_->RtxEnabled());
rtp_payload_registry_->SetRtxSsrc(kRtxSsrc);
- rtp_payload_registry_->SetRtxPayloadType(kRtxPayloadType, kPayloadType);
+ rtp_payload_registry_->SetRtxPayloadType(kRtxPayloadType);
EXPECT_TRUE(rtp_payload_registry_->RtxEnabled());
RTPHeader rtx_header;
rtx_header.ssrc = kRtxSsrc;
diff --git a/test/call_test.cc b/test/call_test.cc
index dbd514e..126c716 100644
--- a/test/call_test.cc
+++ b/test/call_test.cc
@@ -151,7 +151,6 @@
const uint8_t CallTest::kFakeSendPayloadType = 125;
const uint8_t CallTest::kSendRtxPayloadType = 98;
const uint8_t CallTest::kRedPayloadType = 118;
-const uint8_t CallTest::kRtxRedPayloadType = 99;
const uint8_t CallTest::kUlpfecPayloadType = 119;
const uint32_t CallTest::kSendRtxSsrcs[kNumSsrcs] = {0xBADCAFD, 0xBADCAFE,
0xBADCAFF};
diff --git a/test/call_test.h b/test/call_test.h
index 1e01733..b9a091b 100644
--- a/test/call_test.h
+++ b/test/call_test.h
@@ -37,7 +37,6 @@
static const uint8_t kSendRtxPayloadType;
static const uint8_t kFakeSendPayloadType;
static const uint8_t kRedPayloadType;
- static const uint8_t kRtxRedPayloadType;
static const uint8_t kUlpfecPayloadType;
static const uint32_t kSendRtxSsrcs[kNumSsrcs];
static const uint32_t kSendSsrcs[kNumSsrcs];
diff --git a/video/end_to_end_tests.cc b/video/end_to_end_tests.cc
index 65d9568..f820554 100644
--- a/video/end_to_end_tests.cc
+++ b/video/end_to_end_tests.cc
@@ -69,7 +69,7 @@
}
};
- void DecodesRetransmittedFrame(bool use_rtx, bool use_red);
+ void DecodesRetransmittedFrame(bool retransmit_over_rtx);
void ReceivesPliAndRecovers(int rtp_history_ms);
void RespectsRtcpMode(newapi::RtcpMode rtcp_mode);
void TestXrReceiverReferenceTimeReport(bool enable_rrtr);
@@ -538,16 +538,16 @@
// This test drops second RTP packet with a marker bit set, makes sure it's
// retransmitted and renders. Retransmission SSRCs are also checked.
-void EndToEndTest::DecodesRetransmittedFrame(bool use_rtx, bool use_red) {
+void EndToEndTest::DecodesRetransmittedFrame(bool retransmit_over_rtx) {
static const int kDroppedFrameNumber = 2;
class RetransmissionObserver : public test::EndToEndTest,
public I420FrameCallback {
public:
- explicit RetransmissionObserver(bool use_rtx, bool use_red)
+ explicit RetransmissionObserver(bool expect_rtx)
: EndToEndTest(kDefaultTimeoutMs),
- payload_type_(GetPayloadType(false, use_red)),
- retransmission_ssrc_(use_rtx ? kSendRtxSsrcs[0] : kSendSsrcs[0]),
- retransmission_payload_type_(GetPayloadType(use_rtx, use_red)),
+ retransmission_ssrc_(expect_rtx ? kSendRtxSsrcs[0] : kSendSsrcs[0]),
+ retransmission_payload_type_(expect_rtx ? kSendRtxPayloadType
+ : kFakeSendPayloadType),
marker_bits_observed_(0),
retransmitted_timestamp_(0),
frame_retransmitted_(false) {}
@@ -565,7 +565,7 @@
}
EXPECT_EQ(kSendSsrcs[0], header.ssrc);
- EXPECT_EQ(payload_type_, header.payloadType);
+ EXPECT_EQ(kFakeSendPayloadType, header.payloadType);
// Found the second frame's final packet, drop this and expect a
// retransmission.
@@ -592,25 +592,13 @@
send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
(*receive_configs)[0].pre_render_callback = this;
(*receive_configs)[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
-
- if (payload_type_ == kRedPayloadType) {
- send_config->rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
- send_config->rtp.fec.red_payload_type = kRedPayloadType;
- (*receive_configs)[0].rtp.fec.red_payload_type = kRedPayloadType;
- (*receive_configs)[0].rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
- }
-
if (retransmission_ssrc_ == kSendRtxSsrcs[0]) {
send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]);
send_config->rtp.rtx.payload_type = kSendRtxPayloadType;
- (*receive_configs)[0].rtp.rtx[kFakeSendPayloadType].ssrc =
+ (*receive_configs)[0].rtp.rtx[kSendRtxPayloadType].ssrc =
kSendRtxSsrcs[0];
- (*receive_configs)[0].rtp.rtx[kFakeSendPayloadType].payload_type =
+ (*receive_configs)[0].rtp.rtx[kSendRtxPayloadType].payload_type =
kSendRtxPayloadType;
- if (payload_type_ == kRedPayloadType) {
- send_config->rtp.fec.rtx_payload_type = kRtxRedPayloadType;
- (*receive_configs)[0].rtp.fec.rtx_payload_type = kRtxRedPayloadType;
- }
}
}
@@ -619,36 +607,22 @@
<< "Timed out while waiting for retransmission to render.";
}
- int GetPayloadType(bool use_rtx, bool use_red) {
- return use_red ? (use_rtx ? kRtxRedPayloadType : kRedPayloadType)
- : (use_rtx ? kSendRtxPayloadType : kFakeSendPayloadType);
- }
-
- const int payload_type_;
const uint32_t retransmission_ssrc_;
const int retransmission_payload_type_;
int marker_bits_observed_;
uint32_t retransmitted_timestamp_;
bool frame_retransmitted_;
- } test(use_rtx, use_red);
+ } test(retransmit_over_rtx);
RunBaseTest(&test);
}
TEST_F(EndToEndTest, DecodesRetransmittedFrame) {
- DecodesRetransmittedFrame(false, false);
+ DecodesRetransmittedFrame(false);
}
TEST_F(EndToEndTest, DecodesRetransmittedFrameOverRtx) {
- DecodesRetransmittedFrame(true, false);
-}
-
-TEST_F(EndToEndTest, DecodesRetransmittedFrameByRed) {
- DecodesRetransmittedFrame(false, true);
-}
-
-TEST_F(EndToEndTest, DecodesRetransmittedFrameByRedOverRtx) {
- DecodesRetransmittedFrame(true, true);
+ DecodesRetransmittedFrame(true);
}
TEST_F(EndToEndTest, UsesFrameCallbacks) {
@@ -2294,4 +2268,5 @@
call->DestroyVideoReceiveStream(receive_stream);
}
}
+
} // namespace webrtc
diff --git a/video/loopback.cc b/video/loopback.cc
index 52cfaa3..a1ebed1 100644
--- a/video/loopback.cc
+++ b/video/loopback.cc
@@ -103,8 +103,7 @@
static const uint32_t kSendRtxSsrc = 0x654322;
static const uint32_t kReceiverLocalSsrc = 0x123456;
-static const uint8_t kRtxVideoPayloadType = 96;
-static const uint8_t kVideoPayloadType = 124;
+static const uint8_t kRtxPayloadType = 96;
void Loopback() {
scoped_ptr<test::TraceToStderr> trace_to_stderr_;
@@ -138,7 +137,7 @@
VideoSendStream::Config send_config;
send_config.rtp.ssrcs.push_back(kSendSsrc);
send_config.rtp.rtx.ssrcs.push_back(kSendRtxSsrc);
- send_config.rtp.rtx.payload_type = kRtxVideoPayloadType;
+ send_config.rtp.rtx.payload_type = kRtxPayloadType;
send_config.rtp.nack.rtp_history_ms = 1000;
send_config.rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
@@ -156,7 +155,7 @@
}
send_config.encoder_settings.encoder = encoder.get();
send_config.encoder_settings.payload_name = flags::Codec();
- send_config.encoder_settings.payload_type = kVideoPayloadType;
+ send_config.encoder_settings.payload_type = 124;
VideoEncoderConfig encoder_config;
encoder_config.streams = test::CreateVideoStreams(1);
VideoStream* stream = &encoder_config.streams[0];
@@ -184,8 +183,8 @@
receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
receive_config.rtp.nack.rtp_history_ms = 1000;
- receive_config.rtp.rtx[kVideoPayloadType].ssrc = kSendRtxSsrc;
- receive_config.rtp.rtx[kVideoPayloadType].payload_type = kRtxVideoPayloadType;
+ receive_config.rtp.rtx[kRtxPayloadType].ssrc = kSendRtxSsrc;
+ receive_config.rtp.rtx[kRtxPayloadType].payload_type = kRtxPayloadType;
receive_config.rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
receive_config.renderer = loopback_video.get();
diff --git a/video/rampup_tests.cc b/video/rampup_tests.cc
index b3f0522..4b26d05 100644
--- a/video/rampup_tests.cc
+++ b/video/rampup_tests.cc
@@ -76,10 +76,6 @@
remote_bitrate_estimator_.reset(
rbe_factory->Create(this, clock, control_type,
kRemoteBitrateEstimatorMinBitrateBps));
- payload_registry_->SetRtxPayloadType(RampUpTest::kSendRtxPayloadType,
- RampUpTest::kFakeSendPayloadType);
- payload_registry_->SetRtxPayloadType(RampUpTest::kRtxRedPayloadType,
- RampUpTest::kRedPayloadType);
}
void StreamObserver::set_expected_bitrate_bps(
@@ -122,6 +118,7 @@
RTPHeader header;
EXPECT_TRUE(rtp_parser_->Parse(packet, length, &header));
receive_stats_->IncomingPacket(header, length, false);
+ payload_registry_->SetIncomingPayloadType(header);
remote_bitrate_estimator_->IncomingPacket(
clock_->TimeInMilliseconds(), length - 12, header);
if (remote_bitrate_estimator_->TimeUntilNextProcess() <= 0) {
@@ -139,9 +136,11 @@
uint8_t restored_packet[kMaxPacketSize];
uint8_t* restored_packet_ptr = restored_packet;
size_t restored_length = length;
- EXPECT_TRUE(payload_registry_->RestoreOriginalPacket(
- &restored_packet_ptr, packet, &restored_length,
- rtx_media_ssrcs_[header.ssrc], header));
+ payload_registry_->RestoreOriginalPacket(&restored_packet_ptr,
+ packet,
+ &restored_length,
+ rtx_media_ssrcs_[header.ssrc],
+ header);
length = restored_length;
EXPECT_TRUE(rtp_parser_->Parse(
restored_packet, static_cast<int>(length), &header));
@@ -367,11 +366,10 @@
return test_done_->Wait(test::CallTest::kLongTimeoutMs);
}
-void RampUpTest::RunRampUpTest(size_t num_streams,
+void RampUpTest::RunRampUpTest(bool rtx,
+ size_t num_streams,
unsigned int start_bitrate_bps,
- const std::string& extension_type,
- bool rtx,
- bool red) {
+ const std::string& extension_type) {
std::vector<uint32_t> ssrcs(GenerateSsrcs(num_streams, 100));
std::vector<uint32_t> rtx_ssrcs(GenerateSsrcs(num_streams, 200));
StreamObserver::SsrcMap rtx_ssrc_map;
@@ -424,11 +422,6 @@
send_config_.rtp.rtx.payload_type = kSendRtxPayloadType;
send_config_.rtp.rtx.ssrcs = rtx_ssrcs;
}
- if (red) {
- send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
- send_config_.rtp.fec.red_payload_type = kRedPayloadType;
- send_config_.rtp.fec.rtx_payload_type = kRtxRedPayloadType;
- }
if (num_streams == 1) {
// For single stream rampup until 1mbps
@@ -455,9 +448,7 @@
DestroyStreams();
}
-void RampUpTest::RunRampUpDownUpTest(size_t number_of_streams,
- bool rtx,
- bool red) {
+void RampUpTest::RunRampUpDownUpTest(size_t number_of_streams, bool rtx) {
test::DirectTransport receiver_transport;
LowRateStreamObserver stream_observer(
&receiver_transport, Clock::GetRealTimeClock(), number_of_streams, rtx);
@@ -476,11 +467,6 @@
send_config_.rtp.rtx.payload_type = kSendRtxPayloadType;
send_config_.rtp.rtx.ssrcs = GenerateSsrcs(number_of_streams, 200);
}
- if (red) {
- send_config_.rtp.fec.ulpfec_payload_type = kUlpfecPayloadType;
- send_config_.rtp.fec.red_payload_type = kRedPayloadType;
- send_config_.rtp.fec.rtx_payload_type = kRtxRedPayloadType;
- }
CreateStreams();
stream_observer.SetSendStream(send_stream_);
@@ -496,68 +482,43 @@
}
TEST_F(RampUpTest, SingleStream) {
- RunRampUpTest(1, 0, RtpExtension::kTOffset, false, false);
+ RunRampUpTest(false, 1, 0, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, Simulcast) {
- RunRampUpTest(3, 0, RtpExtension::kTOffset, false, false);
+ RunRampUpTest(false, 3, 0, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, SimulcastWithRtx) {
- RunRampUpTest(3, 0, RtpExtension::kTOffset, true, false);
-}
-
-TEST_F(RampUpTest, SimulcastByRedWithRtx) {
- RunRampUpTest(3, 0, RtpExtension::kTOffset, true, true);
+ RunRampUpTest(true, 3, 0, RtpExtension::kTOffset);
}
TEST_F(RampUpTest, SingleStreamWithHighStartBitrate) {
- RunRampUpTest(1, 0.9 * kSingleStreamTargetBps, RtpExtension::kTOffset, false,
- false);
+ RunRampUpTest(false, 1, 0.9 * kSingleStreamTargetBps, RtpExtension::kTOffset);
}
-TEST_F(RampUpTest, UpDownUpOneStream) {
- RunRampUpDownUpTest(1, false, false);
-}
+TEST_F(RampUpTest, UpDownUpOneStream) { RunRampUpDownUpTest(1, false); }
-TEST_F(RampUpTest, UpDownUpThreeStreams) {
- RunRampUpDownUpTest(3, false, false);
-}
+TEST_F(RampUpTest, UpDownUpThreeStreams) { RunRampUpDownUpTest(3, false); }
-TEST_F(RampUpTest, UpDownUpOneStreamRtx) {
- RunRampUpDownUpTest(1, true, false);
-}
+TEST_F(RampUpTest, UpDownUpOneStreamRtx) { RunRampUpDownUpTest(1, true); }
-TEST_F(RampUpTest, UpDownUpThreeStreamsRtx) {
- RunRampUpDownUpTest(3, true, false);
-}
-
-TEST_F(RampUpTest, UpDownUpOneStreamByRedRtx) {
- RunRampUpDownUpTest(1, true, true);
-}
-
-TEST_F(RampUpTest, UpDownUpThreeStreamsByRedRtx) {
- RunRampUpDownUpTest(3, true, true);
-}
+TEST_F(RampUpTest, UpDownUpThreeStreamsRtx) { RunRampUpDownUpTest(3, true); }
TEST_F(RampUpTest, AbsSendTimeSingleStream) {
- RunRampUpTest(1, 0, RtpExtension::kAbsSendTime, false, false);
+ RunRampUpTest(false, 1, 0, RtpExtension::kAbsSendTime);
}
TEST_F(RampUpTest, AbsSendTimeSimulcast) {
- RunRampUpTest(3, 0, RtpExtension::kAbsSendTime, false, false);
+ RunRampUpTest(false, 3, 0, RtpExtension::kAbsSendTime);
}
TEST_F(RampUpTest, AbsSendTimeSimulcastWithRtx) {
- RunRampUpTest(3, 0, RtpExtension::kAbsSendTime, true, false);
-}
-
-TEST_F(RampUpTest, AbsSendTimeSimulcastByRedWithRtx) {
- RunRampUpTest(3, 0, RtpExtension::kAbsSendTime, true, true);
+ RunRampUpTest(true, 3, 0, RtpExtension::kAbsSendTime);
}
TEST_F(RampUpTest, AbsSendTimeSingleStreamWithHighStartBitrate) {
- RunRampUpTest(1, 0.9 * kSingleStreamTargetBps, RtpExtension::kAbsSendTime,
- false, false);
+ RunRampUpTest(false, 1, 0.9 * kSingleStreamTargetBps,
+ RtpExtension::kAbsSendTime);
}
} // namespace webrtc
diff --git a/video/rampup_tests.h b/video/rampup_tests.h
index b09de9b..e506cd4 100644
--- a/video/rampup_tests.h
+++ b/video/rampup_tests.h
@@ -148,13 +148,12 @@
class RampUpTest : public test::CallTest {
protected:
- void RunRampUpTest(size_t num_streams,
+ void RunRampUpTest(bool rtx,
+ size_t num_streams,
unsigned int start_bitrate_bps,
- const std::string& extension_type,
- bool rtx,
- bool red);
+ const std::string& extension_type);
- void RunRampUpDownUpTest(size_t number_of_streams, bool rtx, bool red);
+ void RunRampUpDownUpTest(size_t number_of_streams, bool rtx);
};
} // namespace webrtc
#endif // WEBRTC_VIDEO_RAMPUP_TESTS_H_
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
index 9c4a687..73f6e7c 100644
--- a/video/video_receive_stream.cc
+++ b/video/video_receive_stream.cc
@@ -92,13 +92,12 @@
rtp_rtcp_->SetLocalSSRC(channel_, config_.rtp.local_ssrc);
// TODO(pbos): Support multiple RTX, per video payload.
Config::Rtp::RtxMap::const_iterator it = config_.rtp.rtx.begin();
- for (; it != config_.rtp.rtx.end(); ++it) {
+ if (it != config_.rtp.rtx.end()) {
assert(it->second.ssrc != 0);
assert(it->second.payload_type != 0);
rtp_rtcp_->SetRemoteSSRCType(channel_, kViEStreamTypeRtx, it->second.ssrc);
- rtp_rtcp_->SetRtxReceivePayloadType(channel_, it->second.payload_type,
- it->first);
+ rtp_rtcp_->SetRtxReceivePayloadType(channel_, it->second.payload_type);
}
rtp_rtcp_->SetRembStatus(channel_, false, config_.rtp.remb);
@@ -147,11 +146,6 @@
LOG(LS_ERROR) << "Could not set RED codec. This shouldn't happen.";
abort();
}
- if (config_.rtp.fec.rtx_payload_type != -1) {
- rtp_rtcp_->SetRtxReceivePayloadType(channel_,
- config_.rtp.fec.rtx_payload_type,
- config_.rtp.fec.red_payload_type);
- }
}
stats_proxy_.reset(
diff --git a/video/video_send_stream.cc b/video/video_send_stream.cc
index f531f11..b8ef4d3 100644
--- a/video/video_send_stream.cc
+++ b/video/video_send_stream.cc
@@ -49,6 +49,7 @@
ss << "}, {";
}
ss << '}';
+
ss << ", payload_type: " << payload_type;
ss << '}';
return ss.str();
@@ -172,11 +173,6 @@
static_cast<unsigned char>(config_.rtp.fec.red_payload_type),
static_cast<unsigned char>(config_.rtp.fec.ulpfec_payload_type));
}
- if (config_.rtp.fec.rtx_payload_type != -1) {
- rtp_rtcp_->SetRtxSendPayloadType(channel_,
- config_.rtp.fec.rtx_payload_type,
- config_.rtp.fec.red_payload_type);
- }
} else {
rtp_rtcp_->SetNACKStatus(channel_, config_.rtp.nack.rtp_history_ms > 0);
}
@@ -479,8 +475,7 @@
}
assert(config_.rtp.rtx.payload_type >= 0);
- rtp_rtcp_->SetRtxSendPayloadType(channel_, config_.rtp.rtx.payload_type,
- config_.encoder_settings.payload_type);
+ rtp_rtcp_->SetRtxSendPayloadType(channel_, config_.rtp.rtx.payload_type);
}
std::map<uint32_t, RtpState> VideoSendStream::GetRtpStates() const {
diff --git a/video_engine/include/vie_rtp_rtcp.h b/video_engine/include/vie_rtp_rtcp.h
index 2c53475..103a196 100644
--- a/video_engine/include/vie_rtp_rtcp.h
+++ b/video_engine/include/vie_rtp_rtcp.h
@@ -114,13 +114,10 @@
// This sets a specific payload type for the RTX stream. Note that this
// doesn't enable RTX, SetLocalSSRC must still be called to enable RTX.
virtual int SetRtxSendPayloadType(const int video_channel,
- const uint8_t payload_type,
- const uint8_t associated_payload_type) = 0;
+ const uint8_t payload_type) = 0;
- virtual int SetRtxReceivePayloadType(
- const int video_channel,
- const uint8_t payload_type,
- const uint8_t associated_payload_type) = 0;
+ virtual int SetRtxReceivePayloadType(const int video_channel,
+ const uint8_t payload_type) = 0;
// This function enables manual initialization of the sequence number. The
// start sequence number is normally a random number.
diff --git a/video_engine/test/auto_test/source/vie_autotest_loopback.cc b/video_engine/test/auto_test/source/vie_autotest_loopback.cc
index ce4b71f..4711122 100644
--- a/video_engine/test/auto_test/source/vie_autotest_loopback.cc
+++ b/video_engine/test/auto_test/source/vie_autotest_loopback.cc
@@ -40,7 +40,6 @@
const uint32_t kSsrc = 0x01234567;
const uint32_t kRtxSsrc = 0x01234568;
const int kRtxPayloadType = 98;
-const int kPayloadType = 100;
#define VCM_RED_PAYLOAD_TYPE 96
#define VCM_ULPFEC_PAYLOAD_TYPE 97
@@ -245,15 +244,14 @@
return -1;
}
- error = ptrViERtpRtcp->SetRtxSendPayloadType(videoChannel, kRtxPayloadType,
- kPayloadType);
+ error = ptrViERtpRtcp->SetRtxSendPayloadType(videoChannel, kRtxPayloadType);
if (error == -1) {
printf("ERROR in ViERTP_RTCP::SetRtxSendPayloadType\n");
return -1;
}
- error = ptrViERtpRtcp->SetRtxReceivePayloadType(
- videoChannel, kRtxPayloadType, kPayloadType);
+ error = ptrViERtpRtcp->SetRtxReceivePayloadType(videoChannel,
+ kRtxPayloadType);
if (error == -1) {
printf("ERROR in ViERTP_RTCP::SetRtxReceivePayloadType\n");
return -1;
diff --git a/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc b/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc
index ae63558..923fe41 100644
--- a/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc
+++ b/video_engine/test/auto_test/source/vie_autotest_rtp_rtcp.cc
@@ -172,15 +172,14 @@
myTransport.ClearStats();
const uint8_t kRtxPayloadType = 96;
- const uint8_t kPayloadType = 100;
// Temporarily disable pacing.
EXPECT_EQ(0, ViE.rtp_rtcp->SetTransmissionSmoothingStatus(
tbChannel.videoChannel, false));
EXPECT_EQ(0, ViE.rtp_rtcp->SetNACKStatus(tbChannel.videoChannel, true));
- EXPECT_EQ(0, ViE.rtp_rtcp->SetRtxSendPayloadType(
- tbChannel.videoChannel, kRtxPayloadType, kPayloadType));
- EXPECT_EQ(0, ViE.rtp_rtcp->SetRtxReceivePayloadType(
- tbChannel.videoChannel, kRtxPayloadType, kPayloadType));
+ EXPECT_EQ(0, ViE.rtp_rtcp->SetRtxSendPayloadType(tbChannel.videoChannel,
+ kRtxPayloadType));
+ EXPECT_EQ(0, ViE.rtp_rtcp->SetRtxReceivePayloadType(tbChannel.videoChannel,
+ kRtxPayloadType));
EXPECT_EQ(0, ViE.rtp_rtcp->SetLocalSSRC(tbChannel.videoChannel, 1234,
webrtc::kViEStreamTypeRtx, 0));
EXPECT_EQ(0, ViE.rtp_rtcp->SetRemoteSSRCType(tbChannel.videoChannel,
diff --git a/video_engine/vie_channel.cc b/video_engine/vie_channel.cc
index eb28bd0..79ebe70 100644
--- a/video_engine/vie_channel.cc
+++ b/video_engine/vie_channel.cc
@@ -899,12 +899,11 @@
return 0;
}
-int ViEChannel::SetRtxSendPayloadType(int payload_type,
- int associated_payload_type) {
- rtp_rtcp_->SetRtxSendPayloadType(payload_type, associated_payload_type);
+int ViEChannel::SetRtxSendPayloadType(int payload_type) {
+ rtp_rtcp_->SetRtxSendPayloadType(payload_type);
for (std::list<RtpRtcp*>::iterator it = simulcast_rtp_rtcp_.begin();
it != simulcast_rtp_rtcp_.end(); it++) {
- (*it)->SetRtxSendPayloadType(payload_type, associated_payload_type);
+ (*it)->SetRtxSendPayloadType(payload_type);
}
SetRtxSendStatus(true);
return 0;
@@ -921,9 +920,8 @@
}
}
-void ViEChannel::SetRtxReceivePayloadType(int payload_type,
- int associated_payload_type) {
- vie_receiver_.SetRtxPayloadType(payload_type, associated_payload_type);
+void ViEChannel::SetRtxReceivePayloadType(int payload_type) {
+ vie_receiver_.SetRtxPayloadType(payload_type);
}
int32_t ViEChannel::SetStartSequenceNumber(uint16_t sequence_number) {
diff --git a/video_engine/vie_channel.h b/video_engine/vie_channel.h
index 0096c70..7a46d1f 100644
--- a/video_engine/vie_channel.h
+++ b/video_engine/vie_channel.h
@@ -145,8 +145,8 @@
// Gets the CSRC for the incoming stream.
int32_t GetRemoteCSRC(uint32_t CSRCs[kRtpCsrcSize]);
- int SetRtxSendPayloadType(int payload_type, int associated_payload_type);
- void SetRtxReceivePayloadType(int payload_type, int associated_payload_type);
+ int SetRtxSendPayloadType(int payload_type);
+ void SetRtxReceivePayloadType(int payload_type);
// Sets the starting sequence number, must be called before StartSend.
int32_t SetStartSequenceNumber(uint16_t sequence_number);
diff --git a/video_engine/vie_receiver.cc b/video_engine/vie_receiver.cc
index 048eecd..6dec985 100644
--- a/video_engine/vie_receiver.cc
+++ b/video_engine/vie_receiver.cc
@@ -102,10 +102,8 @@
rtp_receiver_->SetNACKStatus(enable ? kNackRtcp : kNackOff);
}
-void ViEReceiver::SetRtxPayloadType(int payload_type,
- int associated_payload_type) {
- rtp_payload_registry_->SetRtxPayloadType(payload_type,
- associated_payload_type);
+void ViEReceiver::SetRtxPayloadType(int payload_type) {
+ rtp_payload_registry_->SetRtxPayloadType(payload_type);
}
void ViEReceiver::SetRtxSsrc(uint32_t ssrc) {
diff --git a/video_engine/vie_receiver.h b/video_engine/vie_receiver.h
index aaeba17..39a85e4 100644
--- a/video_engine/vie_receiver.h
+++ b/video_engine/vie_receiver.h
@@ -47,7 +47,7 @@
bool RegisterPayload(const VideoCodec& video_codec);
void SetNackStatus(bool enable, int max_nack_reordering_threshold);
- void SetRtxPayloadType(int payload_type, int associated_payload_type);
+ void SetRtxPayloadType(int payload_type);
void SetRtxSsrc(uint32_t ssrc);
bool GetRtxSsrc(uint32_t* ssrc) const;
diff --git a/video_engine/vie_rtp_rtcp_impl.cc b/video_engine/vie_rtp_rtcp_impl.cc
index 354e1d6..ae21307 100644
--- a/video_engine/vie_rtp_rtcp_impl.cc
+++ b/video_engine/vie_rtp_rtcp_impl.cc
@@ -191,10 +191,8 @@
return 0;
}
-int ViERTP_RTCPImpl::SetRtxSendPayloadType(
- const int video_channel,
- const uint8_t payload_type,
- const uint8_t associated_payload_type) {
+int ViERTP_RTCPImpl::SetRtxSendPayloadType(const int video_channel,
+ const uint8_t payload_type) {
LOG_F(LS_INFO) << "channel: " << video_channel
<< " payload_type: " << static_cast<int>(payload_type);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
@@ -203,17 +201,14 @@
shared_data_->SetLastError(kViERtpRtcpInvalidChannelId);
return -1;
}
- if (vie_channel->SetRtxSendPayloadType(payload_type,
- associated_payload_type) != 0) {
+ if (vie_channel->SetRtxSendPayloadType(payload_type) != 0) {
return -1;
}
return 0;
}
-int ViERTP_RTCPImpl::SetRtxReceivePayloadType(
- const int video_channel,
- const uint8_t payload_type,
- const uint8_t associated_payload_type) {
+int ViERTP_RTCPImpl::SetRtxReceivePayloadType(const int video_channel,
+ const uint8_t payload_type) {
LOG_F(LS_INFO) << "channel: " << video_channel
<< " payload_type: " << static_cast<int>(payload_type);
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
@@ -222,7 +217,7 @@
shared_data_->SetLastError(kViERtpRtcpInvalidChannelId);
return -1;
}
- vie_channel->SetRtxReceivePayloadType(payload_type, associated_payload_type);
+ vie_channel->SetRtxReceivePayloadType(payload_type);
return 0;
}
diff --git a/video_engine/vie_rtp_rtcp_impl.h b/video_engine/vie_rtp_rtcp_impl.h
index 7374d1a..8e9f097 100644
--- a/video_engine/vie_rtp_rtcp_impl.h
+++ b/video_engine/vie_rtp_rtcp_impl.h
@@ -40,11 +40,9 @@
virtual int GetRemoteCSRCs(const int video_channel,
unsigned int CSRCs[kRtpCsrcSize]) const;
virtual int SetRtxSendPayloadType(const int video_channel,
- const uint8_t payload_type,
- const uint8_t associated_payload_type);
+ const uint8_t payload_type);
virtual int SetRtxReceivePayloadType(const int video_channel,
- const uint8_t payload_type,
- const uint8_t associated_payload_type);
+ const uint8_t payload_type);
virtual int SetStartSequenceNumber(const int video_channel,
uint16_t sequence_number);
virtual void SetRtpStateForSsrc(int video_channel,