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

Unified Diff: webrtc/common_video/include/incoming_video_stream.h

Issue 1608743005: Switch to rtc::CriticalSection in IncomingVideoStream and remove one lock. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « no previous file | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/include/incoming_video_stream.h
diff --git a/webrtc/common_video/include/incoming_video_stream.h b/webrtc/common_video/include/incoming_video_stream.h
index e3147eb871b1d0482f35f4b7705b28ceb3872845..e24b2c623a8b37002492b50167f88418f0712ac3 100644
--- a/webrtc/common_video/include/incoming_video_stream.h
+++ b/webrtc/common_video/include/incoming_video_stream.h
@@ -11,13 +11,13 @@
#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_
#define WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_
+#include "webrtc/base/criticalsection.h"
#include "webrtc/base/platform_thread.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
#include "webrtc/common_video/video_render_frames.h"
namespace webrtc {
-class CriticalSectionWrapper;
class EventTimerWrapper;
class VideoRenderCallback {
@@ -77,9 +77,9 @@ class IncomingVideoStream : public VideoRenderCallback {
uint32_t const stream_id_;
const bool disable_prerenderer_smoothing_;
// Critsects in allowed to enter order.
- const rtc::scoped_ptr<CriticalSectionWrapper> stream_critsect_;
- const rtc::scoped_ptr<CriticalSectionWrapper> thread_critsect_;
- const rtc::scoped_ptr<CriticalSectionWrapper> buffer_critsect_;
+ mutable rtc::CriticalSection stream_critsect_;
+ mutable rtc::CriticalSection thread_critsect_;
+ mutable rtc::CriticalSection buffer_critsect_;
// TODO(pbos): Make plain member and stop resetting this thread, just
// start/stoping it is enough.
rtc::scoped_ptr<rtc::PlatformThread> incoming_render_thread_
« no previous file with comments | « no previous file | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698