Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 2348233002: AcmReceiver: Ask NetEq to delete all decoders at once instead of one by one (Closed)
Patch Set: unit tests Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 if (ret == DecoderDatabase::kOK) { 284 if (ret == DecoderDatabase::kOK) {
285 return kOK; 285 return kOK;
286 } else if (ret == DecoderDatabase::kDecoderNotFound) { 286 } else if (ret == DecoderDatabase::kDecoderNotFound) {
287 error_code_ = kDecoderNotFound; 287 error_code_ = kDecoderNotFound;
288 } else { 288 } else {
289 error_code_ = kOtherError; 289 error_code_ = kOtherError;
290 } 290 }
291 return kFail; 291 return kFail;
292 } 292 }
293 293
294 void NetEqImpl::RemoveAllPayloadTypes() {
295 rtc::CritScope lock(&crit_sect_);
296 decoder_database_->RemoveAll();
297 }
298
294 bool NetEqImpl::SetMinimumDelay(int delay_ms) { 299 bool NetEqImpl::SetMinimumDelay(int delay_ms) {
295 rtc::CritScope lock(&crit_sect_); 300 rtc::CritScope lock(&crit_sect_);
296 if (delay_ms >= 0 && delay_ms < 10000) { 301 if (delay_ms >= 0 && delay_ms < 10000) {
297 assert(delay_manager_.get()); 302 assert(delay_manager_.get());
298 return delay_manager_->SetMinimumDelay(delay_ms); 303 return delay_manager_->SetMinimumDelay(delay_ms);
299 } 304 }
300 return false; 305 return false;
301 } 306 }
302 307
303 bool NetEqImpl::SetMaximumDelay(int delay_ms) { 308 bool NetEqImpl::SetMaximumDelay(int delay_ms) {
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 } 2101 }
2097 } 2102 }
2098 2103
2099 void NetEqImpl::CreateDecisionLogic() { 2104 void NetEqImpl::CreateDecisionLogic() {
2100 decision_logic_.reset(DecisionLogic::Create( 2105 decision_logic_.reset(DecisionLogic::Create(
2101 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(), 2106 fs_hz_, output_size_samples_, playout_mode_, decoder_database_.get(),
2102 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(), 2107 *packet_buffer_.get(), delay_manager_.get(), buffer_level_filter_.get(),
2103 tick_timer_.get())); 2108 tick_timer_.get()));
2104 } 2109 }
2105 } // namespace webrtc 2110 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698