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

Unified Diff: webrtc/test/vcm_capturer.h

Issue 1411813004: Fix thread safety in VcmCapturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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/test/vcm_capturer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/vcm_capturer.h
diff --git a/webrtc/test/vcm_capturer.h b/webrtc/test/vcm_capturer.h
index 93321f0ff1465b5b2a2c1f8281fc1f15be4f639a..53d61fc53a27c188330be4ff98a8d4d06d4ec392 100644
--- a/webrtc/test/vcm_capturer.h
+++ b/webrtc/test/vcm_capturer.h
@@ -10,6 +10,7 @@
#ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_VCM_CAPTURER_H_
#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_VCM_CAPTURER_H_
+#include "webrtc/base/criticalsection.h"
#include "webrtc/common_types.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/video_capture/include/video_capture.h"
@@ -38,7 +39,8 @@ class VcmCapturer : public VideoCapturer, public VideoCaptureDataCallback {
bool Init(size_t width, size_t height, size_t target_fps);
void Destroy();
- bool started_;
+ rtc::CriticalSection crit_;
+ bool started_ GUARDED_BY(crit_);
VideoCaptureModule* vcm_;
VideoCaptureCapability capability_;
};
« no previous file with comments | « no previous file | webrtc/test/vcm_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698