| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |