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

Unified Diff: webrtc/video/encoder_state_feedback.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/encoder_state_feedback.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/encoder_state_feedback.cc
diff --git a/webrtc/video/encoder_state_feedback.cc b/webrtc/video/encoder_state_feedback.cc
index c0c4b67dbd0d12af3960e76a0c33f25d1d53b7c7..f0b03a13fef4a15f3206d74bd17cd62b7d5ced27 100644
--- a/webrtc/video/encoder_state_feedback.cc
+++ b/webrtc/video/encoder_state_feedback.cc
@@ -14,7 +14,6 @@
#include "webrtc/base/checks.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/video/vie_encoder.h"
namespace webrtc {
@@ -47,8 +46,7 @@ class EncoderStateFeedbackObserver : public RtcpIntraFrameObserver {
};
EncoderStateFeedback::EncoderStateFeedback()
- : crit_(CriticalSectionWrapper::CreateCriticalSection()),
- observer_(new EncoderStateFeedbackObserver(this)) {}
+ : observer_(new EncoderStateFeedbackObserver(this)) {}
EncoderStateFeedback::~EncoderStateFeedback() {
assert(encoders_.empty());
@@ -57,7 +55,7 @@ EncoderStateFeedback::~EncoderStateFeedback() {
void EncoderStateFeedback::AddEncoder(const std::vector<uint32_t>& ssrcs,
ViEEncoder* encoder) {
RTC_DCHECK(!ssrcs.empty());
- CriticalSectionScoped lock(crit_.get());
+ rtc::CritScope lock(&crit_);
for (uint32_t ssrc : ssrcs) {
RTC_DCHECK(encoders_.find(ssrc) == encoders_.end());
encoders_[ssrc] = encoder;
@@ -65,7 +63,7 @@ void EncoderStateFeedback::AddEncoder(const std::vector<uint32_t>& ssrcs,
}
void EncoderStateFeedback::RemoveEncoder(const ViEEncoder* encoder) {
- CriticalSectionScoped lock(crit_.get());
+ rtc::CritScope lock(&crit_);
SsrcEncoderMap::iterator it = encoders_.begin();
while (it != encoders_.end()) {
if (it->second == encoder) {
@@ -81,7 +79,7 @@ RtcpIntraFrameObserver* EncoderStateFeedback::GetRtcpIntraFrameObserver() {
}
void EncoderStateFeedback::OnReceivedIntraFrameRequest(uint32_t ssrc) {
- CriticalSectionScoped lock(crit_.get());
+ rtc::CritScope lock(&crit_);
SsrcEncoderMap::iterator it = encoders_.find(ssrc);
if (it == encoders_.end())
return;
@@ -90,7 +88,7 @@ void EncoderStateFeedback::OnReceivedIntraFrameRequest(uint32_t ssrc) {
}
void EncoderStateFeedback::OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) {
- CriticalSectionScoped lock(crit_.get());
+ rtc::CritScope lock(&crit_);
SsrcEncoderMap::iterator it = encoders_.find(ssrc);
if (it == encoders_.end())
return;
@@ -99,7 +97,7 @@ void EncoderStateFeedback::OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) {
}
void EncoderStateFeedback::OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) {
- CriticalSectionScoped lock(crit_.get());
+ rtc::CritScope lock(&crit_);
SsrcEncoderMap::iterator it = encoders_.find(ssrc);
if (it == encoders_.end())
return;
@@ -109,7 +107,7 @@ void EncoderStateFeedback::OnReceivedRPSI(uint32_t ssrc, uint64_t picture_id) {
void EncoderStateFeedback::OnLocalSsrcChanged(uint32_t old_ssrc,
uint32_t new_ssrc) {
- CriticalSectionScoped lock(crit_.get());
+ rtc::CritScope lock(&crit_);
SsrcEncoderMap::iterator it = encoders_.find(old_ssrc);
if (it == encoders_.end() || encoders_.find(new_ssrc) != encoders_.end()) {
return;
« no previous file with comments | « webrtc/video/encoder_state_feedback.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698