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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 EXPECT_EQ(test_sequence_number_, module_->SequenceNumber()); | 123 EXPECT_EQ(test_sequence_number_, module_->SequenceNumber()); |
124 | 124 |
125 module_->SetStartTimestamp(test_timestamp_); | 125 module_->SetStartTimestamp(test_timestamp_); |
126 EXPECT_EQ(test_timestamp_, module_->StartTimestamp()); | 126 EXPECT_EQ(test_timestamp_, module_->StartTimestamp()); |
127 | 127 |
128 EXPECT_FALSE(module_->Sending()); | 128 EXPECT_FALSE(module_->Sending()); |
129 EXPECT_EQ(0, module_->SetSendingStatus(true)); | 129 EXPECT_EQ(0, module_->SetSendingStatus(true)); |
130 EXPECT_TRUE(module_->Sending()); | 130 EXPECT_TRUE(module_->Sending()); |
131 } | 131 } |
132 | 132 |
133 TEST_F(RtpRtcpAPITest, MTU) { | 133 TEST_F(RtpRtcpAPITest, PacketSize) { |
134 EXPECT_EQ(0, module_->SetMaxTransferUnit(1234)); | 134 module_->SetMaxRtpPacketSize(1234); |
135 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength()); | 135 EXPECT_EQ(1234u, module_->MaxRtpPacketSize()); |
136 | 136 EXPECT_EQ(1234u - 12u /* Minimum RTP header */, module_->MaxPayloadSize()); |
137 EXPECT_EQ(0, module_->SetTransportOverhead(true, true, 12)); | |
138 EXPECT_EQ(1234 - 20 - 20 - 20 - 12, module_->MaxPayloadLength()); | |
139 | |
140 EXPECT_EQ(0, module_->SetTransportOverhead(false, false, 0)); | |
141 EXPECT_EQ(1234 - 20 - 8, module_->MaxPayloadLength()); | |
142 | |
143 module_->SetTransportOverhead(28); | |
144 EXPECT_EQ(1234 - 28, module_->MaxPayloadLength()); | |
145 module_->SetTransportOverhead(44); | |
146 EXPECT_EQ(1234 - 44, module_->MaxPayloadLength()); | |
147 } | 137 } |
148 | 138 |
149 TEST_F(RtpRtcpAPITest, SSRC) { | 139 TEST_F(RtpRtcpAPITest, SSRC) { |
150 module_->SetSSRC(test_ssrc_); | 140 module_->SetSSRC(test_ssrc_); |
151 EXPECT_EQ(test_ssrc_, module_->SSRC()); | 141 EXPECT_EQ(test_ssrc_, module_->SSRC()); |
152 } | 142 } |
153 | 143 |
154 TEST_F(RtpRtcpAPITest, RTCP) { | 144 TEST_F(RtpRtcpAPITest, RTCP) { |
155 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); | 145 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); |
156 module_->SetRTCPStatus(RtcpMode::kCompound); | 146 module_->SetRTCPStatus(RtcpMode::kCompound); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 rtx_header.payloadType = kRtxPayloadType; | 179 rtx_header.payloadType = kRtxPayloadType; |
190 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 180 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
191 rtx_header.ssrc = 0; | 181 rtx_header.ssrc = 0; |
192 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | 182 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
193 rtx_header.ssrc = kRtxSsrc; | 183 rtx_header.ssrc = kRtxSsrc; |
194 rtx_header.payloadType = 0; | 184 rtx_header.payloadType = 0; |
195 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 185 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
196 } | 186 } |
197 | 187 |
198 } // namespace webrtc | 188 } // namespace webrtc |
OLD | NEW |