| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 mock_dtmf_tone_generator_ = mock.get(); | 108 mock_dtmf_tone_generator_ = mock.get(); |
| 109 deps.dtmf_tone_generator = std::move(mock); | 109 deps.dtmf_tone_generator = std::move(mock); |
| 110 } | 110 } |
| 111 dtmf_tone_generator_ = deps.dtmf_tone_generator.get(); | 111 dtmf_tone_generator_ = deps.dtmf_tone_generator.get(); |
| 112 | 112 |
| 113 if (use_mock_packet_buffer_) { | 113 if (use_mock_packet_buffer_) { |
| 114 std::unique_ptr<MockPacketBuffer> mock( | 114 std::unique_ptr<MockPacketBuffer> mock( |
| 115 new MockPacketBuffer(config_.max_packets_in_buffer, tick_timer_)); | 115 new MockPacketBuffer(config_.max_packets_in_buffer, tick_timer_)); |
| 116 mock_packet_buffer_ = mock.get(); | 116 mock_packet_buffer_ = mock.get(); |
| 117 deps.packet_buffer = std::move(mock); | 117 deps.packet_buffer = std::move(mock); |
| 118 } else { | |
| 119 deps.packet_buffer.reset( | |
| 120 new PacketBuffer(config_.max_packets_in_buffer, tick_timer_)); | |
| 121 } | 118 } |
| 122 packet_buffer_ = deps.packet_buffer.get(); | 119 packet_buffer_ = deps.packet_buffer.get(); |
| 123 | 120 |
| 124 if (use_mock_payload_splitter_) { | 121 if (use_mock_payload_splitter_) { |
| 125 std::unique_ptr<MockPayloadSplitter> mock(new MockPayloadSplitter); | 122 std::unique_ptr<MockPayloadSplitter> mock(new MockPayloadSplitter); |
| 126 mock_payload_splitter_ = mock.get(); | 123 mock_payload_splitter_ = mock.get(); |
| 127 deps.payload_splitter = std::move(mock); | 124 deps.payload_splitter = std::move(mock); |
| 128 } | 125 } |
| 129 payload_splitter_ = deps.payload_splitter.get(); | 126 payload_splitter_ = deps.payload_splitter.get(); |
| 130 | 127 |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 UseNoMocks(); | 1171 UseNoMocks(); |
| 1175 CreateInstance(); | 1172 CreateInstance(); |
| 1176 ASSERT_TRUE(tick_timer_); | 1173 ASSERT_TRUE(tick_timer_); |
| 1177 EXPECT_EQ(0u, tick_timer_->ticks()); | 1174 EXPECT_EQ(0u, tick_timer_->ticks()); |
| 1178 AudioFrame output; | 1175 AudioFrame output; |
| 1179 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output)); | 1176 EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output)); |
| 1180 EXPECT_EQ(1u, tick_timer_->ticks()); | 1177 EXPECT_EQ(1u, tick_timer_->ticks()); |
| 1181 } | 1178 } |
| 1182 | 1179 |
| 1183 }// namespace webrtc | 1180 }// namespace webrtc |
| OLD | NEW |