| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "webrtc/modules/audio_coding/neteq/timestamp_scaler.h" | 48 #include "webrtc/modules/audio_coding/neteq/timestamp_scaler.h" |
| 49 #include "webrtc/modules/include/module_common_types.h" | 49 #include "webrtc/modules/include/module_common_types.h" |
| 50 | 50 |
| 51 // Modify the code to obtain backwards bit-exactness. Once bit-exactness is no | 51 // Modify the code to obtain backwards bit-exactness. Once bit-exactness is no |
| 52 // longer required, this #define should be removed (and the code that it | 52 // longer required, this #define should be removed (and the code that it |
| 53 // enables). | 53 // enables). |
| 54 #define LEGACY_BITEXACT | 54 #define LEGACY_BITEXACT |
| 55 | 55 |
| 56 namespace webrtc { | 56 namespace webrtc { |
| 57 | 57 |
| 58 NetEqImpl::Dependencies::Dependencies(const NetEq::Config& config) | 58 NetEqImpl::Dependencies::Dependencies( |
| 59 const NetEq::Config& config, |
| 60 std::shared_ptr<AudioDecoderFactory> decoder_factory) |
| 59 : tick_timer(new TickTimer), | 61 : tick_timer(new TickTimer), |
| 60 buffer_level_filter(new BufferLevelFilter), | 62 buffer_level_filter(new BufferLevelFilter), |
| 61 decoder_database(new DecoderDatabase(CreateBuiltinAudioDecoderFactory())), | 63 decoder_database(new DecoderDatabase(std::move(decoder_factory))), |
| 62 delay_peak_detector(new DelayPeakDetector(tick_timer.get())), | 64 delay_peak_detector(new DelayPeakDetector(tick_timer.get())), |
| 63 delay_manager(new DelayManager(config.max_packets_in_buffer, | 65 delay_manager(new DelayManager(config.max_packets_in_buffer, |
| 64 delay_peak_detector.get(), | 66 delay_peak_detector.get(), |
| 65 tick_timer.get())), | 67 tick_timer.get())), |
| 66 dtmf_buffer(new DtmfBuffer(config.sample_rate_hz)), | 68 dtmf_buffer(new DtmfBuffer(config.sample_rate_hz)), |
| 67 dtmf_tone_generator(new DtmfToneGenerator), | 69 dtmf_tone_generator(new DtmfToneGenerator), |
| 68 packet_buffer( | 70 packet_buffer( |
| 69 new PacketBuffer(config.max_packets_in_buffer, tick_timer.get())), | 71 new PacketBuffer(config.max_packets_in_buffer, tick_timer.get())), |
| 70 payload_splitter(new PayloadSplitter), | 72 payload_splitter(new PayloadSplitter), |
| 71 timestamp_scaler(new TimestampScaler(*decoder_database)), | 73 timestamp_scaler(new TimestampScaler(*decoder_database)), |
| (...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 | 2123 |
| 2122 void NetEqImpl::CreateDecisionLogic() { | 2124 void NetEqImpl::CreateDecisionLogic() { |
| 2123 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, | 2125 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, |
| 2124 playout_mode_, | 2126 playout_mode_, |
| 2125 decoder_database_.get(), | 2127 decoder_database_.get(), |
| 2126 *packet_buffer_.get(), | 2128 *packet_buffer_.get(), |
| 2127 delay_manager_.get(), | 2129 delay_manager_.get(), |
| 2128 buffer_level_filter_.get())); | 2130 buffer_level_filter_.get())); |
| 2129 } | 2131 } |
| 2130 } // namespace webrtc | 2132 } // namespace webrtc |
| OLD | NEW |