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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 EXPECT_EQ(test_timestamp_, module_->StartTimestamp()); | 129 EXPECT_EQ(test_timestamp_, module_->StartTimestamp()); |
130 | 130 |
131 EXPECT_FALSE(module_->Sending()); | 131 EXPECT_FALSE(module_->Sending()); |
132 EXPECT_EQ(0, module_->SetSendingStatus(true)); | 132 EXPECT_EQ(0, module_->SetSendingStatus(true)); |
133 EXPECT_TRUE(module_->Sending()); | 133 EXPECT_TRUE(module_->Sending()); |
134 } | 134 } |
135 | 135 |
136 TEST_F(RtpRtcpAPITest, PacketSize) { | 136 TEST_F(RtpRtcpAPITest, PacketSize) { |
137 module_->SetMaxRtpPacketSize(1234); | 137 module_->SetMaxRtpPacketSize(1234); |
138 EXPECT_EQ(1234u, module_->MaxRtpPacketSize()); | 138 EXPECT_EQ(1234u, module_->MaxRtpPacketSize()); |
139 EXPECT_EQ(1234u - 12u /* Minimum RTP header */, module_->MaxPayloadSize()); | |
140 } | 139 } |
141 | 140 |
142 TEST_F(RtpRtcpAPITest, SSRC) { | 141 TEST_F(RtpRtcpAPITest, SSRC) { |
143 module_->SetSSRC(test_ssrc_); | 142 module_->SetSSRC(test_ssrc_); |
144 EXPECT_EQ(test_ssrc_, module_->SSRC()); | 143 EXPECT_EQ(test_ssrc_, module_->SSRC()); |
145 } | 144 } |
146 | 145 |
147 TEST_F(RtpRtcpAPITest, RTCP) { | 146 TEST_F(RtpRtcpAPITest, RTCP) { |
148 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); | 147 EXPECT_EQ(RtcpMode::kOff, module_->RTCP()); |
149 module_->SetRTCPStatus(RtcpMode::kCompound); | 148 module_->SetRTCPStatus(RtcpMode::kCompound); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 rtx_header.payloadType = kRtxPayloadType; | 181 rtx_header.payloadType = kRtxPayloadType; |
183 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 182 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
184 rtx_header.ssrc = 0; | 183 rtx_header.ssrc = 0; |
185 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); | 184 EXPECT_FALSE(rtp_payload_registry_->IsRtx(rtx_header)); |
186 rtx_header.ssrc = kRtxSsrc; | 185 rtx_header.ssrc = kRtxSsrc; |
187 rtx_header.payloadType = 0; | 186 rtx_header.payloadType = 0; |
188 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); | 187 EXPECT_TRUE(rtp_payload_registry_->IsRtx(rtx_header)); |
189 } | 188 } |
190 | 189 |
191 } // namespace webrtc | 190 } // namespace webrtc |
OLD | NEW |