| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 fs = 8000; | 105 fs = 8000; |
| 106 } | 106 } |
| 107 fs_hz_ = fs; | 107 fs_hz_ = fs; |
| 108 fs_mult_ = fs / 8000; | 108 fs_mult_ = fs / 8000; |
| 109 output_size_samples_ = static_cast<size_t>(kOutputSizeMs * 8 * fs_mult_); | 109 output_size_samples_ = static_cast<size_t>(kOutputSizeMs * 8 * fs_mult_); |
| 110 decoder_frame_length_ = 3 * output_size_samples_; | 110 decoder_frame_length_ = 3 * output_size_samples_; |
| 111 WebRtcSpl_Init(); | 111 WebRtcSpl_Init(); |
| 112 if (create_components) { | 112 if (create_components) { |
| 113 SetSampleRateAndChannels(fs, 1); // Default is 1 channel. | 113 SetSampleRateAndChannels(fs, 1); // Default is 1 channel. |
| 114 } | 114 } |
| 115 RTC_DCHECK(!vad_->enabled()); |
| 116 if (config.enable_post_decode_vad) { |
| 117 vad_->Enable(); |
| 118 } |
| 115 } | 119 } |
| 116 | 120 |
| 117 NetEqImpl::~NetEqImpl() = default; | 121 NetEqImpl::~NetEqImpl() = default; |
| 118 | 122 |
| 119 int NetEqImpl::InsertPacket(const WebRtcRTPHeader& rtp_header, | 123 int NetEqImpl::InsertPacket(const WebRtcRTPHeader& rtp_header, |
| 120 const uint8_t* payload, | 124 const uint8_t* payload, |
| 121 size_t length_bytes, | 125 size_t length_bytes, |
| 122 uint32_t receive_timestamp) { | 126 uint32_t receive_timestamp) { |
| 123 CriticalSectionScoped lock(crit_sect_.get()); | 127 CriticalSectionScoped lock(crit_sect_.get()); |
| 124 LOG(LS_VERBOSE) << "InsertPacket: ts=" << rtp_header.header.timestamp << | 128 LOG(LS_VERBOSE) << "InsertPacket: ts=" << rtp_header.header.timestamp << |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 | 2067 |
| 2064 void NetEqImpl::CreateDecisionLogic() { | 2068 void NetEqImpl::CreateDecisionLogic() { |
| 2065 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, | 2069 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, |
| 2066 playout_mode_, | 2070 playout_mode_, |
| 2067 decoder_database_.get(), | 2071 decoder_database_.get(), |
| 2068 *packet_buffer_.get(), | 2072 *packet_buffer_.get(), |
| 2069 delay_manager_.get(), | 2073 delay_manager_.get(), |
| 2070 buffer_level_filter_.get())); | 2074 buffer_level_filter_.get())); |
| 2071 } | 2075 } |
| 2072 } // namespace webrtc | 2076 } // namespace webrtc |
| OLD | NEW |