summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-07-11 09:55:30 +0000
committerstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-07-11 09:55:30 +0000
commit09da1a78127b1e5719daaf452f03d2012edad0dc (patch)
tree5e67e0cddb41db87167ad4c9610e09de40942dcf /modules
parentc4b828d1b37c297978031b1a6871a03cc2522c3a (diff)
downloadwebrtc-09da1a78127b1e5719daaf452f03d2012edad0dc.tar.gz
Remove the send-side cname getter APIs from voice and video engine.
These APIs aren't being used, and introduces deadlocks when using GetStats() in the new Call api. Having getters for cname at the send-side is pointless, as it's always the user who sets the cname. R=henrika@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16899004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6659 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'modules')
-rw-r--r--modules/rtp_rtcp/interface/rtp_rtcp.h7
-rw-r--r--modules/rtp_rtcp/mocks/mock_rtp_rtcp.h2
-rw-r--r--modules/rtp_rtcp/source/rtcp_sender.cc16
-rw-r--r--modules/rtp_rtcp/source/rtcp_sender.h3
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp_impl.cc4
-rw-r--r--modules/rtp_rtcp/source/rtp_rtcp_impl.h3
-rw-r--r--modules/rtp_rtcp/test/testAPI/test_api.cc4
7 files changed, 5 insertions, 34 deletions
diff --git a/modules/rtp_rtcp/interface/rtp_rtcp.h b/modules/rtp_rtcp/interface/rtp_rtcp.h
index 34f4d3f1..b662849b 100644
--- a/modules/rtp_rtcp/interface/rtp_rtcp.h
+++ b/modules/rtp_rtcp/interface/rtp_rtcp.h
@@ -378,13 +378,6 @@ class RtpRtcp : public Module {
virtual int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]) = 0;
/*
- * Get RTCP CName (i.e unique identifier)
- *
- * return -1 on failure else 0
- */
- virtual int32_t CNAME(char cName[RTCP_CNAME_SIZE]) = 0;
-
- /*
* Get remote CName
*
* return -1 on failure else 0
diff --git a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
index fe20c6a3..c954aa20 100644
--- a/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
+++ b/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
@@ -135,8 +135,6 @@ class MockRtpRtcp : public RtpRtcp {
int32_t(const RTCPMethod method));
MOCK_METHOD1(SetCNAME,
int32_t(const char cName[RTCP_CNAME_SIZE]));
- MOCK_METHOD1(CNAME,
- int32_t(char cName[RTCP_CNAME_SIZE]));
MOCK_CONST_METHOD2(RemoteCNAME,
int32_t(const uint32_t remoteSSRC,
char cName[RTCP_CNAME_SIZE]));
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
index b9ab0c1e..fa129abe 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -330,17 +330,17 @@ RTCPSender::SetREMBData(const uint32_t bitrate,
{
CriticalSectionScoped lock(_criticalSectionRTCPSender);
_rembBitrate = bitrate;
-
+
if(_sizeRembSSRC < numberOfSSRC)
{
delete [] _rembSSRC;
_rembSSRC = new uint32_t[numberOfSSRC];
_sizeRembSSRC = numberOfSSRC;
- }
+ }
_lengthRembSSRC = numberOfSSRC;
for (int i = 0; i < numberOfSSRC; i++)
- {
+ {
_rembSSRC[i] = SSRC[i];
}
_sendREMB = true;
@@ -431,14 +431,6 @@ RTCPSender::SetCameraDelay(const int32_t delayMS)
return 0;
}
-int32_t RTCPSender::CNAME(char cName[RTCP_CNAME_SIZE]) {
- assert(cName);
- CriticalSectionScoped lock(_criticalSectionRTCPSender);
- cName[RTCP_CNAME_SIZE - 1] = 0;
- strncpy(cName, _CNAME, RTCP_CNAME_SIZE - 1);
- return 0;
-}
-
int32_t RTCPSender::SetCNAME(const char cName[RTCP_CNAME_SIZE]) {
if (!cName)
return -1;
@@ -1175,7 +1167,7 @@ RTCPSender::BuildREMB(uint8_t* rtcpbuffer, int& pos)
rtcpbuffer[pos++]=(uint8_t)(brMantissa >> 8);
rtcpbuffer[pos++]=(uint8_t)(brMantissa);
- for (int i = 0; i < _lengthRembSSRC; i++)
+ for (int i = 0; i < _lengthRembSSRC; i++)
{
RtpUtility::AssignUWord32ToBuffer(rtcpbuffer + pos, _rembSSRC[i]);
pos += 4;
diff --git a/modules/rtp_rtcp/source/rtcp_sender.h b/modules/rtp_rtcp/source/rtcp_sender.h
index cbbc32aa..71d92c8e 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/modules/rtp_rtcp/source/rtcp_sender.h
@@ -100,7 +100,6 @@ public:
int32_t SetCameraDelay(const int32_t delayMS);
- int32_t CNAME(char cName[RTCP_CNAME_SIZE]);
int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]);
int32_t AddMixedCNAME(const uint32_t SSRC,
@@ -320,7 +319,7 @@ private:
// Full intra request
uint8_t _sequenceNumberFIR;
- // REMB
+ // REMB
uint8_t _lengthRembSSRC;
uint8_t _sizeRembSSRC;
uint32_t* _rembSSRC;
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index a7f81c61..f706b42e 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -724,10 +724,6 @@ int32_t ModuleRtpRtcpImpl::SetCNAME(const char c_name[RTCP_CNAME_SIZE]) {
return rtcp_sender_.SetCNAME(c_name);
}
-int32_t ModuleRtpRtcpImpl::CNAME(char c_name[RTCP_CNAME_SIZE]) {
- return rtcp_sender_.CNAME(c_name);
-}
-
int32_t ModuleRtpRtcpImpl::AddMixedCNAME(
const uint32_t ssrc,
const char c_name[RTCP_CNAME_SIZE]) {
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 37a0fa46..7e7ea027 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -148,9 +148,6 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
// Set RTCP CName.
virtual int32_t SetCNAME(const char c_name[RTCP_CNAME_SIZE]) OVERRIDE;
- // Get RTCP CName.
- virtual int32_t CNAME(char c_name[RTCP_CNAME_SIZE]) OVERRIDE;
-
// Get remote CName.
virtual int32_t RemoteCNAME(const uint32_t remote_ssrc,
char c_name[RTCP_CNAME_SIZE]) const OVERRIDE;
diff --git a/modules/rtp_rtcp/test/testAPI/test_api.cc b/modules/rtp_rtcp/test/testAPI/test_api.cc
index ac2c5ca0..3885eb07 100644
--- a/modules/rtp_rtcp/test/testAPI/test_api.cc
+++ b/modules/rtp_rtcp/test/testAPI/test_api.cc
@@ -99,10 +99,6 @@ TEST_F(RtpRtcpAPITest, RTCP) {
EXPECT_EQ(0, module->SetCNAME("john.doe@test.test"));
- char cName[RTCP_CNAME_SIZE];
- EXPECT_EQ(0, module->CNAME(cName));
- EXPECT_STRCASEEQ(cName, "john.doe@test.test");
-
EXPECT_FALSE(module->TMMBR());
EXPECT_EQ(0, module->SetTMMBRStatus(true));
EXPECT_TRUE(module->TMMBR());