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

Unified Diff: webrtc/voice_engine/monitor_module.cc

Issue 2722613002: Simplify webrtc::voe::MonitorModule and remove the .cc file. (Closed)
Patch Set: Add TODO Created 3 years, 10 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
« no previous file with comments | « webrtc/voice_engine/monitor_module.h ('k') | webrtc/voice_engine/transmit_mixer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/monitor_module.cc
diff --git a/webrtc/voice_engine/monitor_module.cc b/webrtc/voice_engine/monitor_module.cc
deleted file mode 100644
index 8a1865a95b4fc4334c020c047fda9b05d7fb03bc..0000000000000000000000000000000000000000
--- a/webrtc/voice_engine/monitor_module.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/base/timeutils.h"
-#include "webrtc/voice_engine/monitor_module.h"
-
-namespace webrtc {
-
-namespace voe {
-
-MonitorModule::MonitorModule() :
- _observerPtr(NULL),
- _lastProcessTime(rtc::TimeMillis())
-{
-}
-
-MonitorModule::~MonitorModule()
-{
-}
-
-int32_t
-MonitorModule::RegisterObserver(MonitorObserver& observer)
-{
- rtc::CritScope lock(&_callbackCritSect);
- if (_observerPtr)
- {
- return -1;
- }
- _observerPtr = &observer;
- return 0;
-}
-
-int32_t
-MonitorModule::DeRegisterObserver()
-{
- rtc::CritScope lock(&_callbackCritSect);
- if (!_observerPtr)
- {
- return 0;
- }
- _observerPtr = NULL;
- return 0;
-}
-
-int64_t
-MonitorModule::TimeUntilNextProcess()
-{
- int64_t now = rtc::TimeMillis();
- const int64_t kAverageProcessUpdateTimeMs = 1000;
- return kAverageProcessUpdateTimeMs - (now - _lastProcessTime);
-}
-
-void
-MonitorModule::Process()
-{
- _lastProcessTime = rtc::TimeMillis();
- rtc::CritScope lock(&_callbackCritSect);
- if (_observerPtr)
- {
- _observerPtr->OnPeriodicProcess();
- }
-}
-
-} // namespace voe
-
-} // namespace webrtc
« no previous file with comments | « webrtc/voice_engine/monitor_module.h ('k') | webrtc/voice_engine/transmit_mixer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698