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

Unified Diff: media/capture/video/win/video_capture_device_mf_win.cc

Issue 2908293002: Replace deprecated base::NonThreadSafe in media/capture/video in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 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 | « media/capture/video/win/video_capture_device_mf_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/win/video_capture_device_mf_win.cc
diff --git a/media/capture/video/win/video_capture_device_mf_win.cc b/media/capture/video/win/video_capture_device_mf_win.cc
index 6c91d2031f85597f655be1cd6fc6fabca5cf69c8..44907fd1c3983e289fcaada25c0fbb9fe75618cf 100644
--- a/media/capture/video/win/video_capture_device_mf_win.cc
+++ b/media/capture/video/win/video_capture_device_mf_win.cc
@@ -189,16 +189,16 @@ bool VideoCaptureDeviceMFWin::FormatFromGuid(const GUID& guid,
VideoCaptureDeviceMFWin::VideoCaptureDeviceMFWin(
const VideoCaptureDeviceDescriptor& device_descriptor)
: descriptor_(device_descriptor), capture_(0) {
- DetachFromThread();
+ DETACH_FROM_SEQUENCE(sequence_checker_);
}
VideoCaptureDeviceMFWin::~VideoCaptureDeviceMFWin() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
bool VideoCaptureDeviceMFWin::Init(
const base::win::ScopedComPtr<IMFMediaSource>& source) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!reader_.Get());
ScopedComPtr<IMFAttributes> attributes;
@@ -215,7 +215,7 @@ bool VideoCaptureDeviceMFWin::Init(
void VideoCaptureDeviceMFWin::AllocateAndStart(
const VideoCaptureParams& params,
std::unique_ptr<VideoCaptureDevice::Client> client) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
base::AutoLock lock(lock_);
@@ -253,7 +253,7 @@ void VideoCaptureDeviceMFWin::AllocateAndStart(
}
void VideoCaptureDeviceMFWin::StopAndDeAllocate() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
base::WaitableEvent flushed(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
const int kFlushTimeOutInMs = 1000;
« no previous file with comments | « media/capture/video/win/video_capture_device_mf_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698