Use vector of CSRCs for DeliverFrame & SetCSRCs.

BUG=
R=pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28029004

Patch from Changbin Shao <changbin.shao@intel.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7734 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2014-11-24 08:25:50 +00:00
parent 308e7ff613
commit 9334ac2d78
20 changed files with 112 additions and 253 deletions

View File

@ -18,8 +18,8 @@ using namespace webrtc;
class RtpRtcpAPITest : public ::testing::Test {
protected:
RtpRtcpAPITest() : module(NULL), fake_clock(123456) {
test_CSRC[0] = 1234;
test_CSRC[1] = 2345;
test_csrcs.push_back(1234);
test_csrcs.push_back(2345);
test_id = 123;
test_ssrc = 3456;
test_timestamp = 4567;
@ -50,7 +50,7 @@ class RtpRtcpAPITest : public ::testing::Test {
uint32_t test_ssrc;
uint32_t test_timestamp;
uint16_t test_sequence_number;
uint32_t test_CSRC[webrtc::kRtpCsrcSize];
std::vector<uint32_t> test_csrcs;
SimulatedClock fake_clock;
};
@ -84,14 +84,6 @@ TEST_F(RtpRtcpAPITest, SSRC) {
EXPECT_EQ(test_ssrc, module->SSRC());
}
TEST_F(RtpRtcpAPITest, CSRC) {
EXPECT_EQ(0, module->SetCSRCs(test_CSRC, 2));
uint32_t testOfCSRC[webrtc::kRtpCsrcSize];
EXPECT_EQ(2, module->CSRCs(testOfCSRC));
EXPECT_EQ(test_CSRC[0], testOfCSRC[0]);
EXPECT_EQ(test_CSRC[1], testOfCSRC[1]);
}
TEST_F(RtpRtcpAPITest, RTCP) {
EXPECT_EQ(kRtcpOff, module->RTCP());
EXPECT_EQ(0, module->SetRTCPStatus(kRtcpCompound));