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

Unified Diff: webrtc/modules/rtp_rtcp/source/dtmf_queue.cc

Issue 1877253002: Replaced CriticalSectionWrapper with rtc::CriticalSection in rtp_rtcp module (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/modules/rtp_rtcp/source/dtmf_queue.h ('k') | webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/dtmf_queue.h ('k') | webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698