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

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..a6bf920a2c2e41c6bf438eee609f5f543644633c 100644
--- a/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
@@ -164,11 +164,17 @@
CrAVCaptureConnection* captureConnection = [captureVideoDataOutput_
connectionWithMediaType:AVFoundationGlue::AVMediaTypeVideo()];
- if ([captureConnection isVideoMinFrameDurationSupported]) {
+ // TODO(mcasas): Check selector existence, related to bugs
+ // http://crbug.com/327532 and http://crbug.com/328096.
+ if ([captureConnection
+ respondsToSelector:@selector(isVideoMinFrameDurationSupported)] &&
+ [captureConnection isVideoMinFrameDurationSupported]) {
[captureConnection setVideoMinFrameDuration:
CoreMediaGlue::CMTimeMake(1, frameRate)];
}
- if ([captureConnection isVideoMaxFrameDurationSupported]) {
+ 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