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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 1903153005: Add a TickTimer object to NetEqImpl (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@neteq-tick-timer
Patch Set: Rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/neteq_impl.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index db37e716d66dde966a4cac42f10dd47166c4f42c..0c1b34df073c5f25db9e0ca532b86f34571be60f 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -42,6 +42,7 @@
#include "webrtc/modules/audio_coding/neteq/post_decode_vad.h"
#include "webrtc/modules/audio_coding/neteq/preemptive_expand.h"
#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
+#include "webrtc/modules/audio_coding/neteq/tick_timer.h"
#include "webrtc/modules/audio_coding/neteq/timestamp_scaler.h"
#include "webrtc/modules/include/module_common_types.h"
@@ -53,6 +54,7 @@
namespace webrtc {
NetEqImpl::NetEqImpl(const NetEq::Config& config,
+ std::unique_ptr<TickTimer> tick_timer,
BufferLevelFilter* buffer_level_filter,
DecoderDatabase* decoder_database,
DelayManager* delay_manager,
@@ -66,7 +68,8 @@ NetEqImpl::NetEqImpl(const NetEq::Config& config,
ExpandFactory* expand_factory,
PreemptiveExpandFactory* preemptive_expand_factory,
bool create_components)
- : buffer_level_filter_(buffer_level_filter),
+ : tick_timer_(std::move(tick_timer)),
+ buffer_level_filter_(buffer_level_filter),
decoder_database_(decoder_database),
delay_manager_(delay_manager),
delay_peak_detector_(delay_peak_detector),
@@ -788,6 +791,7 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame) {
DtmfEvent dtmf_event;
Operations operation;
bool play_dtmf;
+ tick_timer_->Increment();
int return_value = GetDecision(&operation, &packet_list, &dtmf_event,
&play_dtmf);
if (return_value != 0) {
« 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