Only return Rtx mode in RTXSendStatus().
There is no need to return 'ssrc' and 'payloadtype' inside this function since they are never used. BUG= R=pbos@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/38569004 Patch from Changbin Shao <changbin.shao@intel.com>. git-svn-id: http://webrtc.googlecode.com/svn/trunk@8049 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -259,7 +259,7 @@ class RtpRtcpRtxNackTest : public ::testing::Test {
|
||||
|
||||
void RunRtxTest(RtxMode rtx_method, int loss) {
|
||||
rtp_payload_registry_.SetRtxSsrc(kTestSsrc + 1);
|
||||
rtp_rtcp_module_->SetRTXSendStatus(rtx_method);
|
||||
rtp_rtcp_module_->SetRtxSendStatus(rtx_method);
|
||||
rtp_rtcp_module_->SetRtxSsrc(kTestSsrc + 1);
|
||||
transport_.DropEveryNthPacket(loss);
|
||||
uint32_t timestamp = 3000;
|
||||
|
||||
@ -243,14 +243,12 @@ int32_t ModuleRtpRtcpImpl::Process() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl::SetRTXSendStatus(int mode) {
|
||||
rtp_sender_.SetRTXStatus(mode);
|
||||
void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) {
|
||||
rtp_sender_.SetRtxStatus(mode);
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl::RTXSendStatus(int* mode,
|
||||
uint32_t* ssrc,
|
||||
int* payload_type) const {
|
||||
rtp_sender_.RTXStatus(mode, ssrc, payload_type);
|
||||
int ModuleRtpRtcpImpl::RtxSendStatus() const {
|
||||
return rtp_sender_.RtxStatus();
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl::SetRtxSsrc(uint32_t ssrc) {
|
||||
@ -1315,12 +1313,8 @@ int64_t ModuleRtpRtcpImpl::RtcpReportInterval() {
|
||||
void ModuleRtpRtcpImpl::SetRtcpReceiverSsrcs(uint32_t main_ssrc) {
|
||||
std::set<uint32_t> ssrcs;
|
||||
ssrcs.insert(main_ssrc);
|
||||
int rtx_mode = kRtxOff;
|
||||
uint32_t rtx_ssrc = 0;
|
||||
int rtx_payload_type = 0;
|
||||
rtp_sender_.RTXStatus(&rtx_mode, &rtx_ssrc, &rtx_payload_type);
|
||||
if (rtx_mode != kRtxOff)
|
||||
ssrcs.insert(rtx_ssrc);
|
||||
if (rtp_sender_.RtxStatus() != kRtxOff)
|
||||
ssrcs.insert(rtp_sender_.RtxSsrc());
|
||||
rtcp_receiver_.SetSsrcs(main_ssrc, ssrcs);
|
||||
}
|
||||
|
||||
|
||||
@ -87,10 +87,8 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
|
||||
|
||||
int CurrentSendFrequencyHz() const;
|
||||
|
||||
virtual void SetRTXSendStatus(int mode) OVERRIDE;
|
||||
|
||||
virtual void RTXSendStatus(int* mode, uint32_t* ssrc,
|
||||
int* payloadType) const OVERRIDE;
|
||||
virtual void SetRtxSendStatus(int mode) OVERRIDE;
|
||||
virtual int RtxSendStatus() const OVERRIDE;
|
||||
|
||||
virtual void SetRtxSsrc(uint32_t ssrc) OVERRIDE;
|
||||
|
||||
|
||||
@ -693,7 +693,7 @@ TEST_F(RtpSendingTest, DISABLED_RoundRobinPaddingRtx) {
|
||||
1);
|
||||
senders_[i]->SetRtxSendPayloadType(96);
|
||||
senders_[i]->SetRtxSsrc(kSenderRtxSsrc + i);
|
||||
senders_[i]->SetRTXSendStatus(kRtxRetransmitted);
|
||||
senders_[i]->SetRtxSendStatus(kRtxRetransmitted);
|
||||
}
|
||||
transport_.ResetCounters();
|
||||
senders_[0]->TimeToSendPadding(500);
|
||||
@ -718,7 +718,7 @@ TEST_F(RtpSendingTest, DISABLED_RoundRobinPaddingRtxRedundantPayloads) {
|
||||
for (int i = 1; i < codec_.numberOfSimulcastStreams + 1; ++i) {
|
||||
senders_[i]->SetRtxSendPayloadType(96);
|
||||
senders_[i]->SetRtxSsrc(kSenderRtxSsrc + i);
|
||||
senders_[i]->SetRTXSendStatus(kRtxRetransmitted | kRtxRedundantPayloads);
|
||||
senders_[i]->SetRtxSendStatus(kRtxRetransmitted | kRtxRedundantPayloads);
|
||||
senders_[i]->SetStorePacketsStatus(true, 100);
|
||||
}
|
||||
// First send payloads so that we have something to retransmit.
|
||||
|
||||
@ -383,11 +383,16 @@ size_t RTPSender::MaxPayloadLength() const {
|
||||
|
||||
uint16_t RTPSender::PacketOverHead() const { return packet_over_head_; }
|
||||
|
||||
void RTPSender::SetRTXStatus(int mode) {
|
||||
void RTPSender::SetRtxStatus(int mode) {
|
||||
CriticalSectionScoped cs(send_critsect_);
|
||||
rtx_ = mode;
|
||||
}
|
||||
|
||||
int RTPSender::RtxStatus() const {
|
||||
CriticalSectionScoped cs(send_critsect_);
|
||||
return rtx_;
|
||||
}
|
||||
|
||||
void RTPSender::SetRtxSsrc(uint32_t ssrc) {
|
||||
CriticalSectionScoped cs(send_critsect_);
|
||||
ssrc_rtx_ = ssrc;
|
||||
@ -398,14 +403,6 @@ uint32_t RTPSender::RtxSsrc() const {
|
||||
return ssrc_rtx_;
|
||||
}
|
||||
|
||||
void RTPSender::RTXStatus(int* mode, uint32_t* ssrc,
|
||||
int* payload_type) const {
|
||||
CriticalSectionScoped cs(send_critsect_);
|
||||
*mode = rtx_;
|
||||
*ssrc = ssrc_rtx_;
|
||||
*payload_type = payload_type_rtx_;
|
||||
}
|
||||
|
||||
void RTPSender::SetRtxPayloadType(int payload_type) {
|
||||
CriticalSectionScoped cs(send_critsect_);
|
||||
payload_type_rtx_ = payload_type;
|
||||
|
||||
@ -184,9 +184,8 @@ class RTPSender : public RTPSenderInterface {
|
||||
bool ProcessNACKBitRate(uint32_t now);
|
||||
|
||||
// RTX.
|
||||
void SetRTXStatus(int mode);
|
||||
|
||||
void RTXStatus(int* mode, uint32_t* ssrc, int* payload_type) const;
|
||||
void SetRtxStatus(int mode);
|
||||
int RtxStatus() const;
|
||||
|
||||
uint32_t RtxSsrc() const;
|
||||
void SetRtxSsrc(uint32_t ssrc);
|
||||
|
||||
@ -667,7 +667,7 @@ TEST_F(RtpSenderTest, SendRedundantPayloads) {
|
||||
rtp_header_len += 4; // 4 bytes extension.
|
||||
rtp_header_len += 4; // 4 extra bytes common to all extension headers.
|
||||
|
||||
rtp_sender_->SetRTXStatus(kRtxRetransmitted | kRtxRedundantPayloads);
|
||||
rtp_sender_->SetRtxStatus(kRtxRetransmitted | kRtxRedundantPayloads);
|
||||
rtp_sender_->SetRtxSsrc(1234);
|
||||
|
||||
// Create and set up parser.
|
||||
@ -1124,7 +1124,7 @@ TEST_F(RtpSenderTest, BytesReportedCorrectly) {
|
||||
rtp_sender_->SetSSRC(1234);
|
||||
rtp_sender_->SetRtxSsrc(4321);
|
||||
rtp_sender_->SetRtxPayloadType(kPayloadType - 1);
|
||||
rtp_sender_->SetRTXStatus(kRtxRetransmitted | kRtxRedundantPayloads);
|
||||
rtp_sender_->SetRtxStatus(kRtxRetransmitted | kRtxRedundantPayloads);
|
||||
|
||||
ASSERT_EQ(
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user