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

Unified Diff: webrtc/modules/audio_conference_mixer/source/time_scheduler.cc

Issue 2785673002: Remove more CriticalSectionWrappers. (Closed)
Patch Set: Created 3 years, 9 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_conference_mixer/source/time_scheduler.cc
diff --git a/webrtc/modules/audio_conference_mixer/source/time_scheduler.cc b/webrtc/modules/audio_conference_mixer/source/time_scheduler.cc
index 30b2933b61c4d3485233a85f2931230401060cd1..877d98b053306cb65287b2a1299a3951f01742de 100644
--- a/webrtc/modules/audio_conference_mixer/source/time_scheduler.cc
+++ b/webrtc/modules/audio_conference_mixer/source/time_scheduler.cc
@@ -10,27 +10,17 @@
#include "webrtc/base/timeutils.h"
#include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h"
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
namespace webrtc {
TimeScheduler::TimeScheduler(const int64_t periodicityInMs)
- : _crit(CriticalSectionWrapper::CreateCriticalSection()),
- _isStarted(false),
+ : _isStarted(false),
_lastPeriodMark(),
_periodicityInMs(periodicityInMs),
_periodicityInTicks(periodicityInMs * rtc::kNumNanosecsPerMillisec),
- _missedPeriods(0)
- {
- }
+ _missedPeriods(0) {}
-TimeScheduler::~TimeScheduler()
-{
- delete _crit;
-}
-
-int32_t TimeScheduler::UpdateScheduler()
-{
- CriticalSectionScoped cs(_crit);
+int32_t TimeScheduler::UpdateScheduler() {
+ rtc::CritScope cs(&_crit);
if(!_isStarted)
{
_isStarted = true;
@@ -79,7 +69,7 @@ int32_t TimeScheduler::UpdateScheduler()
int32_t TimeScheduler::TimeToNextUpdate(
int64_t& updateTimeInMS) const
{
- CriticalSectionScoped cs(_crit);
+ rtc::CritScope cs(&_crit);
// Missed periods means that the next UpdateScheduler() should happen
// immediately.
if(_missedPeriods > 0)
« no previous file with comments | « webrtc/modules/audio_conference_mixer/source/time_scheduler.h ('k') | webrtc/modules/audio_device/audio_device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698