| 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 |
| 11 #include "webrtc/modules/audio_coding/neteq/neteq_impl.h" | 11 #include "webrtc/modules/audio_coding/neteq/neteq_impl.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 #include <memory.h> // memset | 14 #include <memory.h> // memset |
| 15 | 15 |
| 16 #include <algorithm> | 16 #include <algorithm> |
| 17 #include <utility> | 17 #include <utility> |
| 18 #include <vector> | 18 #include <vector> |
| 19 | 19 |
| 20 #include "webrtc/api/audio_codecs/audio_decoder.h" |
| 20 #include "webrtc/base/checks.h" | 21 #include "webrtc/base/checks.h" |
| 21 #include "webrtc/base/logging.h" | 22 #include "webrtc/base/logging.h" |
| 22 #include "webrtc/base/safe_conversions.h" | 23 #include "webrtc/base/safe_conversions.h" |
| 23 #include "webrtc/base/sanitizer.h" | 24 #include "webrtc/base/sanitizer.h" |
| 24 #include "webrtc/base/trace_event.h" | 25 #include "webrtc/base/trace_event.h" |
| 25 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 26 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
| 26 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" | |
| 27 #include "webrtc/modules/audio_coding/neteq/accelerate.h" | 27 #include "webrtc/modules/audio_coding/neteq/accelerate.h" |
| 28 #include "webrtc/modules/audio_coding/neteq/background_noise.h" | 28 #include "webrtc/modules/audio_coding/neteq/background_noise.h" |
| 29 #include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h" | 29 #include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h" |
| 30 #include "webrtc/modules/audio_coding/neteq/comfort_noise.h" | 30 #include "webrtc/modules/audio_coding/neteq/comfort_noise.h" |
| 31 #include "webrtc/modules/audio_coding/neteq/decision_logic.h" | 31 #include "webrtc/modules/audio_coding/neteq/decision_logic.h" |
| 32 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" | 32 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" |
| 33 #include "webrtc/modules/audio_coding/neteq/defines.h" | 33 #include "webrtc/modules/audio_coding/neteq/defines.h" |
| 34 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" | 34 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" |
| 35 #include "webrtc/modules/audio_coding/neteq/delay_peak_detector.h" | 35 #include "webrtc/modules/audio_coding/neteq/delay_peak_detector.h" |
| 36 #include "webrtc/modules/audio_coding/neteq/dtmf_buffer.h" | 36 #include "webrtc/modules/audio_coding/neteq/dtmf_buffer.h" |
| 37 #include "webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h" | 37 #include "webrtc/modules/audio_coding/neteq/dtmf_tone_generator.h" |
| 38 #include "webrtc/modules/audio_coding/neteq/expand.h" | 38 #include "webrtc/modules/audio_coding/neteq/expand.h" |
| 39 #include "webrtc/modules/audio_coding/neteq/merge.h" | 39 #include "webrtc/modules/audio_coding/neteq/merge.h" |
| 40 #include "webrtc/modules/audio_coding/neteq/nack_tracker.h" | 40 #include "webrtc/modules/audio_coding/neteq/nack_tracker.h" |
| 41 #include "webrtc/modules/audio_coding/neteq/normal.h" | 41 #include "webrtc/modules/audio_coding/neteq/normal.h" |
| 42 #include "webrtc/modules/audio_coding/neteq/packet.h" |
| 42 #include "webrtc/modules/audio_coding/neteq/packet_buffer.h" | 43 #include "webrtc/modules/audio_coding/neteq/packet_buffer.h" |
| 43 #include "webrtc/modules/audio_coding/neteq/packet.h" | |
| 44 #include "webrtc/modules/audio_coding/neteq/red_payload_splitter.h" | |
| 45 #include "webrtc/modules/audio_coding/neteq/post_decode_vad.h" | 44 #include "webrtc/modules/audio_coding/neteq/post_decode_vad.h" |
| 46 #include "webrtc/modules/audio_coding/neteq/preemptive_expand.h" | 45 #include "webrtc/modules/audio_coding/neteq/preemptive_expand.h" |
| 46 #include "webrtc/modules/audio_coding/neteq/red_payload_splitter.h" |
| 47 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h" | 47 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h" |
| 48 #include "webrtc/modules/audio_coding/neteq/tick_timer.h" | 48 #include "webrtc/modules/audio_coding/neteq/tick_timer.h" |
| 49 #include "webrtc/modules/audio_coding/neteq/timestamp_scaler.h" | 49 #include "webrtc/modules/audio_coding/neteq/timestamp_scaler.h" |
| 50 #include "webrtc/modules/include/module_common_types.h" | 50 #include "webrtc/modules/include/module_common_types.h" |
| 51 | 51 |
| 52 namespace webrtc { | 52 namespace webrtc { |
| 53 | 53 |
| 54 NetEqImpl::Dependencies::Dependencies( | 54 NetEqImpl::Dependencies::Dependencies( |
| 55 const NetEq::Config& config, | 55 const NetEq::Config& config, |
| 56 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) | 56 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) |
| (...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 } | 2129 } |
| 2130 } | 2130 } |
| 2131 | 2131 |
| 2132 void NetEqImpl::CreateDecisionLogic() { | 2132 void NetEqImpl::CreateDecisionLogic() { |
| 2133 decision_logic_.reset(DecisionLogic::Create( | 2133 decision_logic_.reset(DecisionLogic::Create( |
| 2134 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(), | 2134 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(), |
| 2135 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(), | 2135 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(), |
| 2136 tick_timer_.get())); | 2136 tick_timer_.get())); |
| 2137 } | 2137 } |
| 2138 } // namespace webrtc | 2138 } // namespace webrtc |
| OLD | NEW |