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

Unified Diff: webrtc/modules/video_coding/video_coding_impl.cc

Issue 2779623002: remove more CriticalSectionWrappers. (Closed)
Patch Set: rebase Created 3 years, 9 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/video_coding/timing.cc ('k') | webrtc/system_wrappers/include/static_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_coding_impl.cc
diff --git a/webrtc/modules/video_coding/video_coding_impl.cc b/webrtc/modules/video_coding/video_coding_impl.cc
index a1cfc07af842c9cb10d4e6223f139d2e2a648e08..8ff5482af4a85152cfa1e4b84e2ed001b992e167 100644
--- a/webrtc/modules/video_coding/video_coding_impl.cc
+++ b/webrtc/modules/video_coding/video_coding_impl.cc
@@ -50,21 +50,19 @@ namespace {
// a register method all the way down to the function calling it.
class EncodedImageCallbackWrapper : public EncodedImageCallback {
public:
- EncodedImageCallbackWrapper()
- : cs_(CriticalSectionWrapper::CreateCriticalSection()),
- callback_(nullptr) {}
+ EncodedImageCallbackWrapper() : callback_(nullptr) {}
virtual ~EncodedImageCallbackWrapper() {}
void Register(EncodedImageCallback* callback) {
- CriticalSectionScoped cs(cs_.get());
+ rtc::CritScope lock(&cs_);
callback_ = callback;
}
virtual Result OnEncodedImage(const EncodedImage& encoded_image,
const CodecSpecificInfo* codec_specific_info,
const RTPFragmentationHeader* fragmentation) {
- CriticalSectionScoped cs(cs_.get());
+ rtc::CritScope lock(&cs_);
if (callback_) {
return callback_->OnEncodedImage(encoded_image, codec_specific_info,
fragmentation);
@@ -73,7 +71,7 @@ class EncodedImageCallbackWrapper : public EncodedImageCallback {
}
private:
- std::unique_ptr<CriticalSectionWrapper> cs_;
+ rtc::CriticalSection cs_;
EncodedImageCallback* callback_ GUARDED_BY(cs_);
};
« no previous file with comments | « webrtc/modules/video_coding/timing.cc ('k') | webrtc/system_wrappers/include/static_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698