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 | |
|
dmac
2011/10/06 23:42:04
do you need all these imports, or can you forward
mflodman_chromium_OOO
2011/10/07 13:03:51
Done.
| |
| 11 #import <QTKit/QTKit.h> | |
| 12 | |
| 13 #include "media/video/capture/mac/video_capture_device_mac.h" | |
| 14 #include "media/video/capture/video_capture_device.h" | |
| 15 | |
| 16 @interface VideoCaptureDeviceMacQTKit : NSObject{ | |
|
dmac
2011/10/06 23:42:04
space between NSObject and {
mflodman_chromium_OOO
2011/10/07 13:03:51
Done.
| |
| 17 @private | |
| 18 // Settings. | |
| 19 int frameRate_; | |
| 20 int frameWidth_; | |
| 21 int frameHeight_; | |
| 22 | |
| 23 media::VideoCaptureDeviceMac* frameReceiver_; | |
| 24 | |
| 25 // QTKit variables. | |
| 26 QTCaptureSession* captureSession_; | |
| 27 QTCaptureDeviceInput* captureDeviceInput_; | |
| 28 QTCaptureDecompressedVideoOutput* captureDecompressedOutput_; | |
| 29 | |
| 30 NSAutoreleasePool* pool_; | |
| 31 } | |
| 32 | |
| 33 // Gets available devices. | |
|
dmac
2011/10/06 23:42:04
Normally you would return an autoreleased NSArray.
mflodman_chromium_OOO
2011/10/07 13:03:51
Done.
I'll also look at changing this one to remov
| |
| 34 + (void)deviceNames:(NSArray*)deviceNames; | |
| 35 | |
| 36 // Registers a receiver for the captured frames. | |
| 37 - (void)registerReceiver:(media::VideoCaptureDeviceMac*)frameReceiver; | |
| 38 | |
| 39 // Sets which capture device to use. Returns YES on sucess, NO otherwise. | |
| 40 - (BOOL)setCaptureDevice:(const char*)name; | |
|
dmac
2011/10/06 23:42:04
why a const char* instaed of an NSString?
Also, I
mflodman_chromium_OOO
2011/10/07 13:03:51
Changed to NSString*, nil will remove the device a
| |
| 41 | |
| 42 // Removes the set capture device. | |
| 43 - (void)removeCaptureDevice; | |
| 44 | |
| 45 // Configures the capture properties. | |
| 46 - (BOOL)setCaptureHeight:(int)height | |
| 47 AndWidth:(int)width | |
|
dmac
2011/10/06 23:42:04
lowercase in objc param names, and we don't use "a
mflodman_chromium_OOO
2011/10/07 13:03:51
Changed. Not used to this, so I hope the change is
| |
| 48 AndFrameRate:(int)frameRate; | |
| 49 | |
| 50 // Start video capturing. Returns YES on sucess, NO otherwise. | |
| 51 - (BOOL)startCapture; | |
| 52 | |
| 53 // Stops video capturing. | |
| 54 - (void)stopCapture; | |
| 55 | |
| 56 @end | |
| 57 | |
| 58 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_QTKIT_H_ | |
| OLD | NEW |