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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 TEST_F(NetEqImplTest, RemovePayloadType) { | 224 TEST_F(NetEqImplTest, RemovePayloadType) { |
225 CreateInstance(); | 225 CreateInstance(); |
226 uint8_t rtp_payload_type = 0; | 226 uint8_t rtp_payload_type = 0; |
227 EXPECT_CALL(*mock_decoder_database_, Remove(rtp_payload_type)) | 227 EXPECT_CALL(*mock_decoder_database_, Remove(rtp_payload_type)) |
228 .WillOnce(Return(DecoderDatabase::kDecoderNotFound)); | 228 .WillOnce(Return(DecoderDatabase::kDecoderNotFound)); |
229 // Check that kFail is returned when database returns kDecoderNotFound. | 229 // Check that kFail is returned when database returns kDecoderNotFound. |
230 EXPECT_EQ(NetEq::kFail, neteq_->RemovePayloadType(rtp_payload_type)); | 230 EXPECT_EQ(NetEq::kFail, neteq_->RemovePayloadType(rtp_payload_type)); |
231 } | 231 } |
232 | 232 |
| 233 TEST_F(NetEqImplTest, RemoveAllPayloadTypes) { |
| 234 CreateInstance(); |
| 235 EXPECT_CALL(*mock_decoder_database_, RemoveAll()).WillOnce(Return()); |
| 236 neteq_->RemoveAllPayloadTypes(); |
| 237 } |
| 238 |
233 TEST_F(NetEqImplTest, InsertPacket) { | 239 TEST_F(NetEqImplTest, InsertPacket) { |
234 CreateInstance(); | 240 CreateInstance(); |
235 const size_t kPayloadLength = 100; | 241 const size_t kPayloadLength = 100; |
236 const uint8_t kPayloadType = 0; | 242 const uint8_t kPayloadType = 0; |
237 const uint16_t kFirstSequenceNumber = 0x1234; | 243 const uint16_t kFirstSequenceNumber = 0x1234; |
238 const uint32_t kFirstTimestamp = 0x12345678; | 244 const uint32_t kFirstTimestamp = 0x12345678; |
239 const uint32_t kSsrc = 0x87654321; | 245 const uint32_t kSsrc = 0x87654321; |
240 const uint32_t kFirstReceiveTime = 17; | 246 const uint32_t kFirstReceiveTime = 17; |
241 uint8_t payload[kPayloadLength] = {0}; | 247 uint8_t payload[kPayloadLength] = {0}; |
242 WebRtcRTPHeader rtp_header; | 248 WebRtcRTPHeader rtp_header; |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) | 1435 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) |
1430 .Times(1) | 1436 .Times(1) |
1431 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); | 1437 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); |
1432 | 1438 |
1433 bool muted; | 1439 bool muted; |
1434 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); | 1440 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); |
1435 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); | 1441 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); |
1436 } | 1442 } |
1437 | 1443 |
1438 }// namespace webrtc | 1444 }// namespace webrtc |
OLD | NEW |