| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |