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

Unified Diff: webrtc/modules/video_capture/video_capture_impl.cc

Issue 2790533002: Remove ALL usage of CriticalSectionWrapper. (Closed)
Patch Set: remove winXP rw_lock include 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
Index: webrtc/modules/video_capture/video_capture_impl.cc
diff --git a/webrtc/modules/video_capture/video_capture_impl.cc b/webrtc/modules/video_capture/video_capture_impl.cc
index ead2b1568a52e9a1dec8d8d346710a2fa6b71b25..cc4c79750953d4f7001e582e05232a94dab4bbfa 100644
--- a/webrtc/modules/video_capture/video_capture_impl.cc
+++ b/webrtc/modules/video_capture/video_capture_impl.cc
@@ -20,7 +20,6 @@
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/video_capture/video_capture_config.h"
#include "webrtc/system_wrappers/include/clock.h"
-#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/logging.h"
namespace webrtc {
@@ -81,7 +80,6 @@ int32_t VideoCaptureImpl::RotationInDegrees(VideoRotation rotation,
VideoCaptureImpl::VideoCaptureImpl()
: _deviceUniqueId(NULL),
- _apiCs(*CriticalSectionWrapper::CreateCriticalSection()),
_requestedCapability(),
_lastProcessTimeNanos(rtc::TimeNanos()),
_lastFrameRateCallbackTimeNanos(rtc::TimeNanos()),
@@ -99,20 +97,18 @@ VideoCaptureImpl::VideoCaptureImpl()
VideoCaptureImpl::~VideoCaptureImpl()
{
DeRegisterCaptureDataCallback();
- delete &_apiCs;
-
if (_deviceUniqueId)
delete[] _deviceUniqueId;
}
void VideoCaptureImpl::RegisterCaptureDataCallback(
rtc::VideoSinkInterface<VideoFrame>* dataCallBack) {
- CriticalSectionScoped cs(&_apiCs);
+ rtc::CritScope cs(&_apiCs);
_dataCallBack = dataCallBack;
}
void VideoCaptureImpl::DeRegisterCaptureDataCallback() {
- CriticalSectionScoped cs(&_apiCs);
+ rtc::CritScope cs(&_apiCs);
_dataCallBack = NULL;
}
int32_t VideoCaptureImpl::DeliverCapturedFrame(VideoFrame& captureFrame) {
@@ -131,7 +127,7 @@ int32_t VideoCaptureImpl::IncomingFrame(
const VideoCaptureCapability& frameInfo,
int64_t captureTime/*=0*/)
{
- CriticalSectionScoped cs(&_apiCs);
+ rtc::CritScope cs(&_apiCs);
const int32_t width = frameInfo.width;
const int32_t height = frameInfo.height;
@@ -196,7 +192,7 @@ int32_t VideoCaptureImpl::IncomingFrame(
}
int32_t VideoCaptureImpl::SetCaptureRotation(VideoRotation rotation) {
- CriticalSectionScoped cs(&_apiCs);
+ rtc::CritScope cs(&_apiCs);
_rotateFrame = rotation;
return 0;
}
« no previous file with comments | « webrtc/modules/video_capture/video_capture_impl.h ('k') | webrtc/modules/video_capture/windows/video_capture_ds.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698