Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // VideoCaptureDeviceMacQTKit implements all QTKit related code for | |
| 6 // communicating with a QTKit capture device. | |
| 7 | |
| 8 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | |
| 9 #define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | |
| 10 | |
| 11 #import <Foundation/Foundation.h> | |
| 12 | |
| 13 #include "media/video/capture/mac/video_capture_device_mac.h" | |
| 14 #include "media/video/capture/video_capture_device.h" | |
|
dmac
2011/10/07 17:38:55
do you need these includes? All I can see needing
mflodman_chromium_OOO
2011/10/10 12:56:52
Done.
| |
| 15 | |
| 16 @class QTCaptureDecompressedVideoOutput; | |
| 17 @class QTCaptureDeviceInput; | |
| 18 @class QTCaptureSession; | |
| 19 | |
| 20 @interface VideoCaptureDeviceMacQTKit : NSObject { | |
| 21 @private | |
| 22 // Settings. | |
| 23 int frameRate_; | |
| 24 int frameWidth_; | |
| 25 int frameHeight_; | |
| 26 | |
| 27 media::VideoCaptureDeviceMac *frameReceiver_; | |
| 28 | |
| 29 // QTKit variables. | |
| 30 QTCaptureSession *captureSession_; | |
| 31 QTCaptureDeviceInput *captureDeviceInput_; | |
|
dmac
2011/10/07 17:38:55
any reason for retaining the input and the output
mflodman_chromium_OOO
2011/10/10 12:56:52
input gets disconnected in 'Stop', to avoid a poss
dmac
2011/10/11 00:25:47
Done.
dmac
2011/10/11 00:25:47
What hang are you referring to?
| |
| 32 QTCaptureDecompressedVideoOutput *captureDecompressedOutput_; | |
| 33 } | |
| 34 | |
| 35 // Gets available devices. | |
| 36 + (NSArray *)deviceNames; | |
|
dmac
2011/10/07 17:38:55
what is this returning in the NSArray? Names? or S
mflodman_chromium_OOO
2011/10/10 12:56:52
Added a comment, but I'll change this to return tw
dmac
2011/10/11 00:25:47
Done.
| |
| 37 | |
| 38 // Registers a receiver for the captured frames. | |
| 39 - (void)setFrameReceiver:(media::VideoCaptureDeviceMac *)frameReceiver; | |
| 40 | |
| 41 // Sets which capture device to use. Returns YES on sucess, NO otherwise. | |
| 42 - (BOOL)setCaptureDevice:(NSString *)deviceId; | |
| 43 | |
| 44 // Configures the capture properties. | |
| 45 - (BOOL)setCaptureCapabilities:(int)height:(int)width:(int)frameRate; | |
|
dmac
2011/10/07 17:38:55
actually, this should be:
- (BOOL)setCaptureHeigh
mflodman_chromium_OOO
2011/10/10 12:56:52
Done.
| |
| 46 | |
| 47 // Start video capturing. Returns YES on sucess, NO otherwise. | |
| 48 - (BOOL)startCapture; | |
| 49 | |
| 50 // Stops video capturing. | |
| 51 - (void)stopCapture; | |
| 52 | |
| 53 @end | |
| 54 | |
| 55 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | |
| OLD | NEW |