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

Unified Diff: media/capture/video/mac/video_capture_device_avfoundation_mac.mm

Issue 1853743003: Remove platform_video_capturing_mac and the callback thread checker in VideoCaptureDeviceAVFoundati… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: media/capture/video/mac/video_capture_device_avfoundation_mac.mm
diff --git a/media/capture/video/mac/video_capture_device_avfoundation_mac.mm b/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
index c8b724c1b51c8ac1485f064abe737a7498301950..32dac4b70ebb150efd8b136babdb4d3d53a2ea67 100644
--- a/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
@@ -251,12 +251,8 @@ media::VideoPixelFormat FourCCToChromiumPixelFormat(FourCharCode code) {
- (BOOL)setCaptureHeight:(int)height
width:(int)width
frameRate:(float)frameRate {
- // Check if either of VideoCaptureDeviceMac::AllocateAndStart() or
- // VideoCaptureDeviceMac::ReceiveFrame() is calling here, depending on the
- // running state. VCDM::ReceiveFrame() calls here to change aspect ratio.
- DCHECK((![captureSession_ isRunning] &&
- main_thread_checker_.CalledOnValidThread()) ||
- callback_thread_checker_.CalledOnValidThread());
+ DCHECK(![captureSession_ isRunning] &&
+ main_thread_checker_.CalledOnValidThread());
frameWidth_ = width;
frameHeight_ = height;
@@ -350,13 +346,11 @@ media::VideoPixelFormat FourCCToChromiumPixelFormat(FourCharCode code) {
#pragma mark Private methods
// |captureOutput| is called by the capture device to deliver a new frame.
+// AVFoundation calls from a number of threads, depending on, at least, if
+// Chrome is on foreground or background.
- (void)captureOutput:(CrAVCaptureOutput*)captureOutput
didOutputSampleBuffer:(CoreMediaGlue::CMSampleBufferRef)sampleBuffer
fromConnection:(CrAVCaptureConnection*)connection {
- // AVFoundation calls from a number of threads, depending on, at least, if
- // Chrome is on foreground or background. Sample the actual thread here.
- callback_thread_checker_.DetachFromThread();
- CHECK(callback_thread_checker_.CalledOnValidThread());
Robert Sesek 2016/04/01 18:56:09 nit: remove extra blank line
mcasas 2016/04/01 22:08:17 Done.
const CoreMediaGlue::CMFormatDescriptionRef formatDescription =
CoreMediaGlue::CMSampleBufferGetFormatDescription(sampleBuffer);
« no previous file with comments | « media/capture/video/mac/video_capture_device_avfoundation_mac.h ('k') | media/capture/video/mac/video_capture_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698