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); |