Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc

Issue 2437503004: Set actual transport overhead in rtp_rtcp (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 EXPECT_FALSE(module_->Sending()); 129 EXPECT_FALSE(module_->Sending());
130 EXPECT_EQ(0, module_->SetSendingStatus(true)); 130 EXPECT_EQ(0, module_->SetSendingStatus(true));
131 EXPECT_TRUE(module_->Sending()); 131 EXPECT_TRUE(module_->Sending());
132 } 132 }
133 133
134 TEST_F(RtpRtcpAPITest, MTU) { 134 TEST_F(RtpRtcpAPITest, MTU) {
135 EXPECT_EQ(0, module_->SetMaxTransferUnit(1234)); 135 EXPECT_EQ(0, module_->SetMaxTransferUnit(1234));
136 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength()); 136 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength());
137 137
138 EXPECT_EQ(0, module_->SetTransportOverhead(true, true, 12)); 138 EXPECT_EQ(0, module_->SetTransportOverhead(28));
139 EXPECT_EQ(1234 - 20 - 20 - 20 - 12, module_->MaxPayloadLength()); 139 EXPECT_EQ(1234 - 28, module_->MaxPayloadLength());
140 140
141 EXPECT_EQ(0, module_->SetTransportOverhead(false, false, 0)); 141 EXPECT_EQ(0, module_->SetTransportOverhead(44));
142 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength()); 142 EXPECT_EQ(1234 - 44, module_->MaxPayloadLength());
143 } 143 }
144 144
145 TEST_F(RtpRtcpAPITest, SSRC) { 145 TEST_F(RtpRtcpAPITest, SSRC) {
146 module_->SetSSRC(test_ssrc_); 146 module_->SetSSRC(test_ssrc_);
147 EXPECT_EQ(test_ssrc_, module_->SSRC()); 147 EXPECT_EQ(test_ssrc_, module_->SSRC());
148 } 148 }
149 149
150 TEST_F(RtpRtcpAPITest, RTCP) { 150 TEST_F(RtpRtcpAPITest, RTCP) {
151 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); 151 EXPECT_EQ(RtcpMode::kOff, module_->RTCP());
152 module_->SetRTCPStatus(RtcpMode::kCompound); 152 module_->SetRTCPStatus(RtcpMode::kCompound);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 rtx_header.payloadType = kRtxPayloadType; 185 rtx_header.payloadType = kRtxPayloadType;
186 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); 186 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header));
187 rtx_header.ssrc = 0; 187 rtx_header.ssrc = 0;
188 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); 188 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header));
189 rtx_header.ssrc = kRtxSsrc; 189 rtx_header.ssrc = kRtxSsrc;
190 rtx_header.payloadType = 0; 190 rtx_header.payloadType = 0;
191 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); 191 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header));
192 } 192 }
193 193
194 } // namespace webrtc 194 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698