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

Unified Diff: webrtc/modules/rtp_rtcp/source/bitrate.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: git cl format dtmf_queue.cc 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/bitrate.h ('k') | webrtc/modules/rtp_rtcp/source/dtmf_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/bitrate.cc
diff --git a/webrtc/modules/rtp_rtcp/source/bitrate.cc b/webrtc/modules/rtp_rtcp/source/bitrate.cc
index 4e9fc72c1f8ae79f4f2f631b3841848e581bccca..49a23592bfe8c4a988835f0ca09a211f62f8fbdf 100644
--- a/webrtc/modules/rtp_rtcp/source/bitrate.cc
+++ b/webrtc/modules/rtp_rtcp/source/bitrate.cc
@@ -11,13 +11,11 @@
#include "webrtc/modules/rtp_rtcp/source/bitrate.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
namespace webrtc {
Bitrate::Bitrate(Clock* clock, Observer* observer)
: clock_(clock),
- crit_(CriticalSectionWrapper::CreateCriticalSection()),
packet_rate_(0),
bitrate_(0),
bitrate_next_idx_(0),
@@ -33,23 +31,23 @@ Bitrate::Bitrate(Clock* clock, Observer* observer)
Bitrate::~Bitrate() {}
void Bitrate::Update(const size_t bytes) {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
bytes_count_ += bytes;
packet_count_++;
}
uint32_t Bitrate::PacketRate() const {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
return packet_rate_;
}
uint32_t Bitrate::BitrateLast() const {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
return bitrate_;
}
uint32_t Bitrate::BitrateNow() const {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
int64_t now = clock_->TimeInMilliseconds();
int64_t diff_ms = now - time_last_rate_update_;
@@ -67,7 +65,7 @@ uint32_t Bitrate::BitrateNow() const {
}
int64_t Bitrate::time_last_rate_update() const {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
return time_last_rate_update_;
}
@@ -75,7 +73,7 @@ int64_t Bitrate::time_last_rate_update() const {
void Bitrate::Process() {
BitrateStatistics stats;
{
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
int64_t now = clock_->CurrentNtpInMilliseconds();
int64_t diff_ms = now - time_last_rate_update_;
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/bitrate.h ('k') | webrtc/modules/rtp_rtcp/source/dtmf_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698