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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 rtc::CritScope lock(&crit_sect_); | 139 rtc::CritScope lock(&crit_sect_); |
140 int error = | 140 int error = |
141 InsertPacketInternal(rtp_header, payload, receive_timestamp); | 141 InsertPacketInternal(rtp_header, payload, receive_timestamp); |
142 if (error != 0) { | 142 if (error != 0) { |
143 error_code_ = error; | 143 error_code_ = error; |
144 return kFail; | 144 return kFail; |
145 } | 145 } |
146 return kOK; | 146 return kOK; |
147 } | 147 } |
148 | 148 |
| 149 void NetEqImpl::InsertEmptyPacket(const RTPHeader& /*rtp_header*/) { |
| 150 // TODO(henrik.lundin) Handle NACK as well. This will make use of the |
| 151 // rtp_header parameter. |
| 152 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7611 |
| 153 rtc::CritScope lock(&crit_sect_); |
| 154 delay_manager_->RegisterEmptyPacket(); |
| 155 } |
| 156 |
149 namespace { | 157 namespace { |
150 void SetAudioFrameActivityAndType(bool vad_enabled, | 158 void SetAudioFrameActivityAndType(bool vad_enabled, |
151 NetEqImpl::OutputType type, | 159 NetEqImpl::OutputType type, |
152 AudioFrame::VADActivity last_vad_activity, | 160 AudioFrame::VADActivity last_vad_activity, |
153 AudioFrame* audio_frame) { | 161 AudioFrame* audio_frame) { |
154 switch (type) { | 162 switch (type) { |
155 case NetEqImpl::OutputType::kNormalSpeech: { | 163 case NetEqImpl::OutputType::kNormalSpeech: { |
156 audio_frame->speech_type_ = AudioFrame::kNormalSpeech; | 164 audio_frame->speech_type_ = AudioFrame::kNormalSpeech; |
157 audio_frame->vad_activity_ = AudioFrame::kVadActive; | 165 audio_frame->vad_activity_ = AudioFrame::kVadActive; |
158 break; | 166 break; |
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 } | 2180 } |
2173 } | 2181 } |
2174 | 2182 |
2175 void NetEqImpl::CreateDecisionLogic() { | 2183 void NetEqImpl::CreateDecisionLogic() { |
2176 decision_logic_.reset(DecisionLogic::Create( | 2184 decision_logic_.reset(DecisionLogic::Create( |
2177 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(), | 2185 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(), |
2178 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(), | 2186 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(), |
2179 tick_timer_.get())); | 2187 tick_timer_.get())); |
2180 } | 2188 } |
2181 } // namespace webrtc | 2189 } // namespace webrtc |
OLD | NEW |