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

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

Issue 99353005: AVFoundation: Check selector when testing if max frame rate setting is supported. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rsesek@ comments Created 7 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/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 f780958b858da381a8f9ea2ef403648d0e401852..f99ac61d62deb89bc037940b2fcc06a33e847f45 100644
--- a/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/mac/foundation_util.h"
+#include "base/mac/scoped_nsexception_enabler.h"
Robert Sesek 2013/12/16 17:20:57 Remove
#include "media/video/capture/mac/video_capture_device_mac.h"
#include "ui/gfx/size.h"
@@ -168,7 +169,11 @@
[captureConnection setVideoMinFrameDuration:
CoreMediaGlue::CMTimeMake(1, frameRate)];
}
- if ([captureConnection isVideoMaxFrameDurationSupported]) {
+ // TODO(mcasas): Check selector existence, related to bugs
+ // http://crbug.com/327532 and http://crbug.com/328096.
+ if ([captureConnection
+ respondsToSelector:@selector(isVideoMaxFrameDurationSupported)] &&
+ [captureConnection isVideoMaxFrameDurationSupported]) {
[captureConnection setVideoMaxFrameDuration:
CoreMediaGlue::CMTimeMake(1, frameRate)];
}
« 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