| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // VideoCaptureDeviceQTKit implements all QTKit related code for | 5 // VideoCaptureDeviceQTKit implements all QTKit related code for |
| 6 // communicating with a QTKit capture device. | 6 // communicating with a QTKit capture device. |
| 7 | 7 |
| 8 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | 8 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ |
| 9 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | 9 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 int frameWidth_; | 24 int frameWidth_; |
| 25 int frameHeight_; | 25 int frameHeight_; |
| 26 | 26 |
| 27 media::VideoCaptureDeviceMac *frameReceiver_; | 27 media::VideoCaptureDeviceMac *frameReceiver_; |
| 28 | 28 |
| 29 // QTKit variables. | 29 // QTKit variables. |
| 30 QTCaptureSession *captureSession_; | 30 QTCaptureSession *captureSession_; |
| 31 QTCaptureDeviceInput *captureDeviceInput_; | 31 QTCaptureDeviceInput *captureDeviceInput_; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Returns an array of QTCaptureDevices. | 34 // Returns a dictionary of capture devices with friendly name and unique id. |
| 35 // TODO(mflodman) Return arrays of friendly name and unique id instead. | 35 + (NSDictionary *)deviceNames; |
| 36 + (NSArray *)deviceNames; | |
| 37 | 36 |
| 38 // Initializes the instance and registers the frame receiver. | 37 // Initializes the instance and registers the frame receiver. |
| 39 - (id)initWithFrameReceiver:(media::VideoCaptureDeviceMac *)frameReceiver; | 38 - (id)initWithFrameReceiver:(media::VideoCaptureDeviceMac *)frameReceiver; |
| 40 | 39 |
| 41 // Sets which capture device to use. Returns YES on sucess, NO otherwise. | 40 // Sets which capture device to use. Returns YES on sucess, NO otherwise. |
| 42 - (BOOL)setCaptureDevice:(NSString *)deviceId; | 41 - (BOOL)setCaptureDevice:(NSString *)deviceId; |
| 43 | 42 |
| 44 // Configures the capture properties. | 43 // Configures the capture properties. |
| 45 - (BOOL)setCaptureHeight:(int)height width:(int)width frameRate:(int)frameRate; | 44 - (BOOL)setCaptureHeight:(int)height width:(int)width frameRate:(int)frameRate; |
| 46 | 45 |
| 47 // Start video capturing. Returns YES on sucess, NO otherwise. | 46 // Start video capturing. Returns YES on sucess, NO otherwise. |
| 48 - (BOOL)startCapture; | 47 - (BOOL)startCapture; |
| 49 | 48 |
| 50 // Stops video capturing. | 49 // Stops video capturing. |
| 51 - (void)stopCapture; | 50 - (void)stopCapture; |
| 52 | 51 |
| 53 @end | 52 @end |
| 54 | 53 |
| 55 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | 54 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ |
| OLD | NEW |