Chromium Code Reviews| Index: media/video/capture/mac/video_capture_device_mac_qtkit.h |
| diff --git a/media/video/capture/mac/video_capture_device_mac_qtkit.h b/media/video/capture/mac/video_capture_device_mac_qtkit.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d91a966579cf8b46be36136902b0b9eb665eba59 |
| --- /dev/null |
| +++ b/media/video/capture/mac/video_capture_device_mac_qtkit.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// VideoCaptureDeviceMacQTKit implements all QTKit related code for |
| +// communicating with a QTKit capture device. |
| + |
| +#ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ |
| +#define MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ |
| + |
| +#import <Foundation/Foundation.h> |
| + |
| +#include "media/video/capture/mac/video_capture_device_mac.h" |
| +#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.
|
| + |
| +@class QTCaptureDecompressedVideoOutput; |
| +@class QTCaptureDeviceInput; |
| +@class QTCaptureSession; |
| + |
| +@interface VideoCaptureDeviceMacQTKit : NSObject { |
| + @private |
| + // Settings. |
| + int frameRate_; |
| + int frameWidth_; |
| + int frameHeight_; |
| + |
| + media::VideoCaptureDeviceMac *frameReceiver_; |
| + |
| + // QTKit variables. |
| + QTCaptureSession *captureSession_; |
| + 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?
|
| + QTCaptureDecompressedVideoOutput *captureDecompressedOutput_; |
| +} |
| + |
| +// Gets available devices. |
| ++ (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.
|
| + |
| +// Registers a receiver for the captured frames. |
| +- (void)setFrameReceiver:(media::VideoCaptureDeviceMac *)frameReceiver; |
| + |
| +// Sets which capture device to use. Returns YES on sucess, NO otherwise. |
| +- (BOOL)setCaptureDevice:(NSString *)deviceId; |
| + |
| +// Configures the capture properties. |
| +- (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.
|
| + |
| +// Start video capturing. Returns YES on sucess, NO otherwise. |
| +- (BOOL)startCapture; |
| + |
| +// Stops video capturing. |
| +- (void)stopCapture; |
| + |
| +@end |
| + |
| +#endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ |