Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/dtmf_queue.cc |
| diff --git a/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc b/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc |
| index ab21b8704a53785c8e7560fb7796b2aa400de940..e9aa8b17de84b95b2677694847b7676cb2dcf116 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/dtmf_queue.cc |
| @@ -14,19 +14,16 @@ |
| namespace webrtc { |
| DTMFqueue::DTMFqueue() |
| - : dtmf_critsect_(CriticalSectionWrapper::CreateCriticalSection()), |
| - next_empty_index_(0) { |
| + : next_empty_index_(0) { |
|
pbos-webrtc
2016/04/12 09:08:43
git cl format plz
danilchap
2016/04/12 09:14:40
Done.
|
| memset(dtmf_key_, 0, sizeof(dtmf_key_)); |
| memset(dtmf_length, 0, sizeof(dtmf_length)); |
| memset(dtmf_level_, 0, sizeof(dtmf_level_)); |
| } |
| -DTMFqueue::~DTMFqueue() { |
| - delete dtmf_critsect_; |
| -} |
| +DTMFqueue::~DTMFqueue() {} |
| int32_t DTMFqueue::AddDTMF(uint8_t key, uint16_t len, uint8_t level) { |
| - CriticalSectionScoped lock(dtmf_critsect_); |
| + rtc::CritScope lock(&dtmf_critsect_); |
| if (next_empty_index_ >= DTMF_OUTBAND_MAX) { |
| return -1; |
| @@ -40,7 +37,7 @@ int32_t DTMFqueue::AddDTMF(uint8_t key, uint16_t len, uint8_t level) { |
| } |
| int8_t DTMFqueue::NextDTMF(uint8_t* dtmf_key, uint16_t* len, uint8_t* level) { |
| - CriticalSectionScoped lock(dtmf_critsect_); |
| + rtc::CritScope lock(&dtmf_critsect_); |
| if (next_empty_index_ == 0) |
| return -1; |
| @@ -60,12 +57,12 @@ int8_t DTMFqueue::NextDTMF(uint8_t* dtmf_key, uint16_t* len, uint8_t* level) { |
| } |
| bool DTMFqueue::PendingDTMF() { |
| - CriticalSectionScoped lock(dtmf_critsect_); |
| + rtc::CritScope lock(&dtmf_critsect_); |
| return next_empty_index_ > 0; |
| } |
| void DTMFqueue::ResetDTMF() { |
| - CriticalSectionScoped lock(dtmf_critsect_); |
| + rtc::CritScope lock(&dtmf_critsect_); |
| next_empty_index_ = 0; |
| } |
| } // namespace webrtc |