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

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: Rename SignalTransportOverheadChanged to UpdateTransportOverhead. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/pc/channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(true, true, 12));
139 EXPECT_EQ(1234 - 20 - 20 - 20 - 12, module_->MaxPayloadLength()); 139 EXPECT_EQ(1234 - 20 - 20 - 20 - 12, module_->MaxPayloadLength());
140 140
141 EXPECT_EQ(0, module_->SetTransportOverhead(false, false, 0)); 141 EXPECT_EQ(0, module_->SetTransportOverhead(false, false, 0));
142 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength()); 142 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength());
143
144 module_->SetTransportOverhead(28);
145 EXPECT_EQ(1234 - 28, module_->MaxPayloadLength());
146 module_->SetTransportOverhead(44);
147 EXPECT_EQ(1234 - 44, module_->MaxPayloadLength());
143 } 148 }
144 149
145 TEST_F(RtpRtcpAPITest, SSRC) { 150 TEST_F(RtpRtcpAPITest, SSRC) {
146 module_->SetSSRC(test_ssrc_); 151 module_->SetSSRC(test_ssrc_);
147 EXPECT_EQ(test_ssrc_, module_->SSRC()); 152 EXPECT_EQ(test_ssrc_, module_->SSRC());
148 } 153 }
149 154
150 TEST_F(RtpRtcpAPITest, RTCP) { 155 TEST_F(RtpRtcpAPITest, RTCP) {
151 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); 156 EXPECT_EQ(RtcpMode::kOff, module_->RTCP());
152 module_->SetRTCPStatus(RtcpMode::kCompound); 157 module_->SetRTCPStatus(RtcpMode::kCompound);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 rtx_header.payloadType = kRtxPayloadType; 190 rtx_header.payloadType = kRtxPayloadType;
186 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); 191 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header));
187 rtx_header.ssrc = 0; 192 rtx_header.ssrc = 0;
188 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); 193 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header));
189 rtx_header.ssrc = kRtxSsrc; 194 rtx_header.ssrc = kRtxSsrc;
190 rtx_header.payloadType = 0; 195 rtx_header.payloadType = 0;
191 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); 196 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header));
192 } 197 }
193 198
194 } // namespace webrtc 199 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/pc/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698