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

Side by Side Diff: media/video/capture/mac/video_capture_device_avfoundation_mac.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ 5 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_
6 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ 6 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // the VideoCaptureDeviceAVFoundation object. 55 // the VideoCaptureDeviceAVFoundation object.
56 // 56 //
57 // 57 //
58 @interface VideoCaptureDeviceAVFoundation 58 @interface VideoCaptureDeviceAVFoundation
59 : NSObject<CrAVCaptureVideoDataOutputSampleBufferDelegate, 59 : NSObject<CrAVCaptureVideoDataOutputSampleBufferDelegate,
60 PlatformVideoCapturingMac> { 60 PlatformVideoCapturingMac> {
61 @private 61 @private
62 // The following attributes are set via -setCaptureHeight:width:frameRate:. 62 // The following attributes are set via -setCaptureHeight:width:frameRate:.
63 int frameWidth_; 63 int frameWidth_;
64 int frameHeight_; 64 int frameHeight_;
65 int frameRate_; 65 float frameRate_;
66 66
67 base::Lock lock_; // Protects concurrent setting and using of frameReceiver_. 67 base::Lock lock_; // Protects concurrent setting and using of frameReceiver_.
68 media::VideoCaptureDeviceMac* frameReceiver_; // weak. 68 media::VideoCaptureDeviceMac* frameReceiver_; // weak.
69 69
70 base::scoped_nsobject<CrAVCaptureSession> captureSession_; 70 base::scoped_nsobject<CrAVCaptureSession> captureSession_;
71 71
72 // |captureDevice_| is an object coming from AVFoundation, used only to be 72 // |captureDevice_| is an object coming from AVFoundation, used only to be
73 // plugged in |captureDeviceInput_| and to query for session preset support. 73 // plugged in |captureDeviceInput_| and to query for session preset support.
74 CrAVCaptureDevice* captureDevice_; 74 CrAVCaptureDevice* captureDevice_;
75 // |captureDeviceInput_| is owned by |captureSession_|. 75 // |captureDeviceInput_| is owned by |captureSession_|.
(...skipping 22 matching lines...) Expand all
98 // the deviceId is known, the library objects are created if needed and 98 // the deviceId is known, the library objects are created if needed and
99 // connected for the capture, and a by default resolution is set. If deviceId is 99 // connected for the capture, and a by default resolution is set. If deviceId is
100 // nil, then the eventual capture is stopped and library objects are 100 // nil, then the eventual capture is stopped and library objects are
101 // disconnected. Returns YES on sucess, NO otherwise. This method should not be 101 // disconnected. Returns YES on sucess, NO otherwise. This method should not be
102 // called during capture. 102 // called during capture.
103 - (BOOL)setCaptureDevice:(NSString*)deviceId; 103 - (BOOL)setCaptureDevice:(NSString*)deviceId;
104 104
105 // Configures the capture properties for the capture session and the video data 105 // Configures the capture properties for the capture session and the video data
106 // output; this means it MUST be called after setCaptureDevice:. Return YES on 106 // output; this means it MUST be called after setCaptureDevice:. Return YES on
107 // success, else NO. 107 // success, else NO.
108 - (BOOL)setCaptureHeight:(int)height width:(int)width frameRate:(int)frameRate; 108 - (BOOL)setCaptureHeight:(int)height
109 width:(int)width
110 frameRate:(float)frameRate;
109 111
110 // Starts video capturing and register the notification listeners. Must be 112 // Starts video capturing and register the notification listeners. Must be
111 // called after setCaptureDevice:, and, eventually, also after 113 // called after setCaptureDevice:, and, eventually, also after
112 // setCaptureHeight:width:frameRate:. Returns YES on sucess, NO otherwise. 114 // setCaptureHeight:width:frameRate:. Returns YES on sucess, NO otherwise.
113 - (BOOL)startCapture; 115 - (BOOL)startCapture;
114 116
115 // Stops video capturing and stops listening to notifications. 117 // Stops video capturing and stops listening to notifications.
116 - (void)stopCapture; 118 - (void)stopCapture;
117 119
118 @end 120 @end
119 121
120 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_ 122 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_AVFOUNDATION_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698