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

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

Issue 1424083002: Make an enum class out of NetEqDecoder, and hide the neteq_decoders_ table (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // |higher_limit| is equal to |target_level_|, but should at 366 // |higher_limit| is equal to |target_level_|, but should at
367 // least be 20 ms higher than |lower_limit_|. 367 // least be 20 ms higher than |lower_limit_|.
368 *higher_limit = std::max(target_level_, *lower_limit + window_20ms); 368 *higher_limit = std::max(target_level_, *lower_limit + window_20ms);
369 } 369 }
370 370
371 int DelayManager::TargetLevel() const { 371 int DelayManager::TargetLevel() const {
372 return target_level_; 372 return target_level_;
373 } 373 }
374 374
375 void DelayManager::LastDecoderType(NetEqDecoder decoder_type) { 375 void DelayManager::LastDecoderType(NetEqDecoder decoder_type) {
376 if (decoder_type == kDecoderAVT || 376 if (decoder_type == NetEqDecoder::kDecoderAVT ||
377 decoder_type == kDecoderCNGnb || 377 decoder_type == NetEqDecoder::kDecoderCNGnb ||
378 decoder_type == kDecoderCNGwb || 378 decoder_type == NetEqDecoder::kDecoderCNGwb ||
379 decoder_type == kDecoderCNGswb32kHz || 379 decoder_type == NetEqDecoder::kDecoderCNGswb32kHz ||
380 decoder_type == kDecoderCNGswb48kHz) { 380 decoder_type == NetEqDecoder::kDecoderCNGswb48kHz) {
381 last_pack_cng_or_dtmf_ = 1; 381 last_pack_cng_or_dtmf_ = 1;
382 } else if (last_pack_cng_or_dtmf_ != 0) { 382 } else if (last_pack_cng_or_dtmf_ != 0) {
383 last_pack_cng_or_dtmf_ = -1; 383 last_pack_cng_or_dtmf_ = -1;
384 } 384 }
385 } 385 }
386 386
387 bool DelayManager::SetMinimumDelay(int delay_ms) { 387 bool DelayManager::SetMinimumDelay(int delay_ms) {
388 // Minimum delay shouldn't be more than maximum delay, if any maximum is set. 388 // Minimum delay shouldn't be more than maximum delay, if any maximum is set.
389 // Also, if possible check |delay| to less than 75% of 389 // Also, if possible check |delay| to less than 75% of
390 // |max_packets_in_buffer_|. 390 // |max_packets_in_buffer_|.
(...skipping 27 matching lines...) Expand all
418 int DelayManager::base_target_level() const { return base_target_level_; } 418 int DelayManager::base_target_level() const { return base_target_level_; }
419 void DelayManager::set_streaming_mode(bool value) { streaming_mode_ = value; } 419 void DelayManager::set_streaming_mode(bool value) { streaming_mode_ = value; }
420 int DelayManager::last_pack_cng_or_dtmf() const { 420 int DelayManager::last_pack_cng_or_dtmf() const {
421 return last_pack_cng_or_dtmf_; 421 return last_pack_cng_or_dtmf_;
422 } 422 }
423 423
424 void DelayManager::set_last_pack_cng_or_dtmf(int value) { 424 void DelayManager::set_last_pack_cng_or_dtmf(int value) {
425 last_pack_cng_or_dtmf_ = value; 425 last_pack_cng_or_dtmf_ = value;
426 } 426 }
427 } // namespace webrtc 427 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/include/neteq.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698