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

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

Issue 258783007: Mac AVFoundation: Allow use of all camera's supported resolutions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | media/video/capture/mac/video_capture_device_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/mac/video_capture_device_avfoundation_mac.mm
diff --git a/media/video/capture/mac/video_capture_device_avfoundation_mac.mm b/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
index 1fb3b5ce175a46b7faae2f405bff23f81abd1475..872c61f3b1c0f035df61025162cff5c1fc570fdd 100644
--- a/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
@@ -177,19 +177,17 @@
// Identify the sessionPreset that corresponds to the desired resolution.
bemasc 2014/04/28 17:17:33 This comment should probably be updated, since the
mcasas 2014/04/28 19:01:36 Seems that you're right, despite the line you copy
NSString* sessionPreset;
- if (width == 1280 && height == 720 && [captureSession_ canSetSessionPreset:
+ if (width >= 1280 && height >= 720 && [captureSession_ canSetSessionPreset:
AVFoundationGlue::AVCaptureSessionPreset1280x720()]) {
sessionPreset = AVFoundationGlue::AVCaptureSessionPreset1280x720();
- } else if (width == 640 && height == 480 && [captureSession_
- canSetSessionPreset:
- AVFoundationGlue::AVCaptureSessionPreset640x480()]) {
+ } else if (width >= 640 && height >= 480 && [captureSession_
+ canSetSessionPreset:AVFoundationGlue::AVCaptureSessionPreset640x480()]) {
sessionPreset = AVFoundationGlue::AVCaptureSessionPreset640x480();
- } else if (width == 320 && height == 240 && [captureSession_
- canSetSessionPreset:
- AVFoundationGlue::AVCaptureSessionPreset320x240()]) {
+ } else if ([captureSession_
+ canSetSessionPreset:AVFoundationGlue::AVCaptureSessionPreset320x240()]) {
bemasc 2014/04/28 17:17:33 Does such a preset even exist? It isn't documente
mcasas 2014/04/28 19:01:36 Not in iOS but in Mac: https://developer.apple.co
sessionPreset = AVFoundationGlue::AVCaptureSessionPreset320x240();
} else {
- DLOG(ERROR) << "Unsupported resolution (" << width << "x" << height << ")";
+ DLOG(ERROR) << "Preset not found for requested frame size";
return NO;
}
[captureSession_ setSessionPreset:sessionPreset];
« no previous file with comments | « no previous file | media/video/capture/mac/video_capture_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698