| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef VOICE_ENGINE_MONITOR_MODULE_H_ | |
| 12 #define VOICE_ENGINE_MONITOR_MODULE_H_ | |
| 13 | |
| 14 #include "modules/include/module.h" | |
| 15 | |
| 16 namespace webrtc { | |
| 17 namespace voe { | |
| 18 | |
| 19 // When associated with a ProcessThread, calls a callback method | |
| 20 // |OnPeriodicProcess()| implemented by the |Observer|. | |
| 21 // TODO(tommi): This could be replaced with PostDelayedTask(). | |
| 22 // Better yet, delete it and delete code related to |_saturationWarning| | |
| 23 // in TransmitMixer (and the OnPeriodicProcess callback). | |
| 24 template <typename Observer> | |
| 25 class MonitorModule : public Module { | |
| 26 public: | |
| 27 explicit MonitorModule(Observer* observer) : observer_(observer) {} | |
| 28 ~MonitorModule() override {} | |
| 29 | |
| 30 private: | |
| 31 int64_t TimeUntilNextProcess() override { return 1000; } | |
| 32 void Process() override { observer_->OnPeriodicProcess(); } | |
| 33 | |
| 34 Observer* const observer_; | |
| 35 }; | |
| 36 | |
| 37 } // namespace voe | |
| 38 } // namespace webrtc | |
| 39 | |
| 40 #endif // VOICE_ENGINE_MONITOR_MODULE | |
| OLD | NEW |