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

Unified Diff: webrtc/video/call_stats.cc

Issue 1613053003: Swap use of CriticalSectionWrapper for rtc::CriticalSection in webrtc/video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase? 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
« no previous file with comments | « webrtc/video/call_stats.h ('k') | webrtc/video/encoder_state_feedback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/call_stats.cc
diff --git a/webrtc/video/call_stats.cc b/webrtc/video/call_stats.cc
index 69ea1a3d789afb10fcda7c143caabac9f76a4d7f..ef5f0b211d870edc99e399c54d5390b32b1c663e 100644
--- a/webrtc/video/call_stats.cc
+++ b/webrtc/video/call_stats.cc
@@ -15,7 +15,6 @@
#include <algorithm>
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/tick_util.h"
namespace webrtc {
@@ -93,7 +92,6 @@ class RtcpObserver : public RtcpRttStats {
CallStats::CallStats(Clock* clock)
: clock_(clock),
- crit_(CriticalSectionWrapper::CreateCriticalSection()),
rtcp_rtt_stats_(new RtcpObserver(this)),
last_process_time_(clock_->TimeInMilliseconds()),
max_rtt_ms_(0),
@@ -108,7 +106,7 @@ int64_t CallStats::TimeUntilNextProcess() {
}
int32_t CallStats::Process() {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
int64_t now = clock_->TimeInMilliseconds();
if (now < last_process_time_ + kUpdateIntervalMs)
return 0;
@@ -131,7 +129,7 @@ int32_t CallStats::Process() {
}
int64_t CallStats::avg_rtt_ms() const {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
return avg_rtt_ms_;
}
@@ -140,7 +138,7 @@ RtcpRttStats* CallStats::rtcp_rtt_stats() const {
}
void CallStats::RegisterStatsObserver(CallStatsObserver* observer) {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
for (std::list<CallStatsObserver*>::iterator it = observers_.begin();
it != observers_.end(); ++it) {
if (*it == observer)
@@ -150,7 +148,7 @@ void CallStats::RegisterStatsObserver(CallStatsObserver* observer) {
}
void CallStats::DeregisterStatsObserver(CallStatsObserver* observer) {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
for (std::list<CallStatsObserver*>::iterator it = observers_.begin();
it != observers_.end(); ++it) {
if (*it == observer) {
@@ -161,7 +159,7 @@ void CallStats::DeregisterStatsObserver(CallStatsObserver* observer) {
}
void CallStats::OnRttUpdate(int64_t rtt) {
- CriticalSectionScoped cs(crit_.get());
+ rtc::CritScope cs(&crit_);
reports_.push_back(RttTime(rtt, clock_->TimeInMilliseconds()));
}
« no previous file with comments | « webrtc/video/call_stats.h ('k') | webrtc/video/encoder_state_feedback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698