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

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

Issue 464853002: Mac Video Capture: correct to float the erroneous handling of frame rate as int. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
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 399ad7d9387ba77fce36e5a357534a27314f6e8e..c700ca20a5676db5a884c05b1e152c687bf50d17 100644
--- a/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
+++ b/media/video/capture/mac/video_capture_device_avfoundation_mac.mm
@@ -171,7 +171,9 @@
return YES;
}
-- (BOOL)setCaptureHeight:(int)height width:(int)width frameRate:(int)frameRate {
+- (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.
@@ -208,14 +210,14 @@
[captureConnection isVideoMinFrameDurationSupported]) {
[captureConnection setVideoMinFrameDuration:
CoreMediaGlue::CMTimeMake(media::kFrameRatePrecision,
- frameRate * media::kFrameRatePrecision)];
+ (int)(frameRate * media::kFrameRatePrecision))];
}
if ([captureConnection
respondsToSelector:@selector(isVideoMaxFrameDurationSupported)] &&
[captureConnection isVideoMaxFrameDurationSupported]) {
[captureConnection setVideoMaxFrameDuration:
CoreMediaGlue::CMTimeMake(media::kFrameRatePrecision,
- frameRate * media::kFrameRatePrecision)];
+ (int)(frameRate * media::kFrameRatePrecision))];
}
return YES;
}

Powered by Google App Engine
This is Rietveld 408576698