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

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

Issue 2585383002: Fix low frame rate problems in high resolution USB cameras using AVFoundation (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0145616d7d933c8a0311df4722e940df5a34728b..10a079225ac95c4e5af4a1b9dd7a15f0f83f8939 100644
--- a/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/capture/video/mac/video_capture_device_avfoundation_mac.mm
@@ -261,6 +261,12 @@ void ExtractBaseAddressAndLength(char** base_address,
}
[captureSession_ addInput:captureDeviceInput_];
+ // Create and plug the still image capture output. This should happen in
+ // advance of the actual picture to allow for the 3A to stabilize.
+ stillImageOutput_.reset([[AVCaptureStillImageOutput alloc] init]);
+ if (stillImageOutput_ && [captureSession_ canAddOutput:stillImageOutput_])
+ [captureSession_ addOutput:stillImageOutput_];
+
// Create a new data output for video. The data output is configured to
// discard late frames by default.
captureVideoDataOutput_.reset([[AVCaptureVideoDataOutput alloc] init]);
@@ -277,12 +283,6 @@ void ExtractBaseAddressAndLength(char** base_address,
DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)];
[captureSession_ addOutput:captureVideoDataOutput_];
- // Create and plug the still image capture output. This should happen in
- // advance of the actual picture to allow for the 3A to stabilize.
- stillImageOutput_.reset([[AVCaptureStillImageOutput alloc] init]);
- if (stillImageOutput_ && [captureSession_ canAddOutput:stillImageOutput_])
- [captureSession_ addOutput:stillImageOutput_];
-
return YES;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698