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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 using ::testing::WithArg; | 45 using ::testing::WithArg; |
46 using ::testing::Pointee; | 46 using ::testing::Pointee; |
47 using ::testing::IsNull; | 47 using ::testing::IsNull; |
48 | 48 |
49 namespace webrtc { | 49 namespace webrtc { |
50 | 50 |
51 // This function is called when inserting a packet list into the mock packet | 51 // This function is called when inserting a packet list into the mock packet |
52 // buffer. The purpose is to delete all inserted packets properly, to avoid | 52 // buffer. The purpose is to delete all inserted packets properly, to avoid |
53 // memory leaks in the test. | 53 // memory leaks in the test. |
54 int DeletePacketsAndReturnOk(PacketList* packet_list) { | 54 int DeletePacketsAndReturnOk(PacketList* packet_list) { |
55 PacketBuffer::DeleteAllPackets(packet_list); | 55 packet_list->clear(); |
56 return PacketBuffer::kOK; | 56 return PacketBuffer::kOK; |
57 } | 57 } |
58 | 58 |
59 class NetEqImplTest : public ::testing::Test { | 59 class NetEqImplTest : public ::testing::Test { |
60 protected: | 60 protected: |
61 NetEqImplTest() { config_.sample_rate_hz = 8000; } | 61 NetEqImplTest() { config_.sample_rate_hz = 8000; } |
62 | 62 |
63 void CreateInstance() { | 63 void CreateInstance() { |
64 NetEqImpl::Dependencies deps(config_, CreateBuiltinAudioDecoderFactory()); | 64 NetEqImpl::Dependencies deps(config_, CreateBuiltinAudioDecoderFactory()); |
65 | 65 |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) | 1429 EXPECT_CALL(*mock_delay_manager_, BufferLimits(_, _)) |
1430 .Times(1) | 1430 .Times(1) |
1431 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); | 1431 .WillOnce(DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2))); |
1432 | 1432 |
1433 bool muted; | 1433 bool muted; |
1434 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); | 1434 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output_, &muted)); |
1435 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); | 1435 EXPECT_EQ(kAccelerate, neteq_->last_operation_for_test()); |
1436 } | 1436 } |
1437 | 1437 |
1438 }// namespace webrtc | 1438 }// namespace webrtc |
OLD | NEW |