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

Unified Diff: webrtc/voice_engine/dtmf_inband_queue.cc

Issue 1607353002: Swap use of CriticalSectionWrapper with rtc::CriticalSection in voice_engine/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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/voice_engine/dtmf_inband_queue.cc
diff --git a/webrtc/voice_engine/dtmf_inband_queue.cc b/webrtc/voice_engine/dtmf_inband_queue.cc
index 8619a73ed862ad8feae1ee8cf21a5d98e47a615d..4ab74cdf70651b1ca4912cecac5ca6b58b6d1b21 100644
--- a/webrtc/voice_engine/dtmf_inband_queue.cc
+++ b/webrtc/voice_engine/dtmf_inband_queue.cc
@@ -15,7 +15,6 @@ namespace webrtc {
DtmfInbandQueue::DtmfInbandQueue(int32_t id):
_id(id),
- _DtmfCritsect(*CriticalSectionWrapper::CreateCriticalSection()),
_nextEmptyIndex(0)
{
memset(_DtmfKey,0, sizeof(_DtmfKey));
@@ -25,13 +24,12 @@ DtmfInbandQueue::DtmfInbandQueue(int32_t id):
DtmfInbandQueue::~DtmfInbandQueue()
{
- delete &_DtmfCritsect;
}
int
DtmfInbandQueue::AddDtmf(uint8_t key, uint16_t len, uint8_t level)
{
- CriticalSectionScoped lock(&_DtmfCritsect);
+ rtc::CritScope lock(&_DtmfCritsect);
if (_nextEmptyIndex >= kDtmfInbandMax)
{
@@ -50,7 +48,7 @@ DtmfInbandQueue::AddDtmf(uint8_t key, uint16_t len, uint8_t level)
int8_t
DtmfInbandQueue::NextDtmf(uint16_t* len, uint8_t* level)
{
- CriticalSectionScoped lock(&_DtmfCritsect);
+ rtc::CritScope lock(&_DtmfCritsect);
if(!PendingDtmf())
{
@@ -74,14 +72,14 @@ DtmfInbandQueue::NextDtmf(uint16_t* len, uint8_t* level)
bool
DtmfInbandQueue::PendingDtmf()
{
- CriticalSectionScoped lock(&_DtmfCritsect);
+ rtc::CritScope lock(&_DtmfCritsect);
return _nextEmptyIndex > 0;
}
void
DtmfInbandQueue::ResetDtmf()
{
- CriticalSectionScoped lock(&_DtmfCritsect);
+ rtc::CritScope lock(&_DtmfCritsect);
_nextEmptyIndex = 0;
}

Powered by Google App Engine
This is Rietveld 408576698