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

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

Issue 1921163003: NetEq: Introduce TickTimer in DelayPeakDetector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@packet-tick-timer
Patch Set: Correcting the function comments Created 4 years, 7 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // Shift 7 to Q17 first, then multiply with 15625 and shift another 11. 335 // Shift 7 to Q17 first, then multiply with 15625 and shift another 11.
336 return ((sum_q24 >> 7) * 15625) >> 11; 336 return ((sum_q24 >> 7) * 15625) >> 11;
337 } 337 }
338 338
339 bool DelayManager::PeakFound() const { 339 bool DelayManager::PeakFound() const {
340 return peak_detector_.peak_found(); 340 return peak_detector_.peak_found();
341 } 341 }
342 342
343 void DelayManager::UpdateCounters(int elapsed_time_ms) { 343 void DelayManager::UpdateCounters(int elapsed_time_ms) {
344 packet_iat_count_ms_ += elapsed_time_ms; 344 packet_iat_count_ms_ += elapsed_time_ms;
345 peak_detector_.IncrementCounter(elapsed_time_ms);
346 max_timer_ms_ += elapsed_time_ms; 345 max_timer_ms_ += elapsed_time_ms;
347 } 346 }
348 347
349 void DelayManager::ResetPacketIatCount() { packet_iat_count_ms_ = 0; } 348 void DelayManager::ResetPacketIatCount() { packet_iat_count_ms_ = 0; }
350 349
351 // Note that |low_limit| and |higher_limit| are not assigned to 350 // Note that |low_limit| and |higher_limit| are not assigned to
352 // |minimum_delay_ms_| and |maximum_delay_ms_| defined by the client of this 351 // |minimum_delay_ms_| and |maximum_delay_ms_| defined by the client of this
353 // class. They are computed from |target_level_| and used for decision making. 352 // class. They are computed from |target_level_| and used for decision making.
354 void DelayManager::BufferLimits(int* lower_limit, int* higher_limit) const { 353 void DelayManager::BufferLimits(int* lower_limit, int* higher_limit) const {
355 if (!lower_limit || !higher_limit) { 354 if (!lower_limit || !higher_limit) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 int DelayManager::base_target_level() const { return base_target_level_; } 419 int DelayManager::base_target_level() const { return base_target_level_; }
421 void DelayManager::set_streaming_mode(bool value) { streaming_mode_ = value; } 420 void DelayManager::set_streaming_mode(bool value) { streaming_mode_ = value; }
422 int DelayManager::last_pack_cng_or_dtmf() const { 421 int DelayManager::last_pack_cng_or_dtmf() const {
423 return last_pack_cng_or_dtmf_; 422 return last_pack_cng_or_dtmf_;
424 } 423 }
425 424
426 void DelayManager::set_last_pack_cng_or_dtmf(int value) { 425 void DelayManager::set_last_pack_cng_or_dtmf(int value) {
427 last_pack_cng_or_dtmf_ = value; 426 last_pack_cng_or_dtmf_ = value;
428 } 427 }
429 } // namespace webrtc 428 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698