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

Unified Diff: media/video/capture/mac/video_capture_device_mac_qtkit.h

Issue 8177008: Adding VideoCaptureDevice for Mac. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
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..54aa6bfc0b8ea7e0803c37d0f4e9df253091bb08
--- /dev/null
+++ b/media/video/capture/mac/video_capture_device_mac_qtkit.h
@@ -0,0 +1,58 @@
+// 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_
+
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.
+#import <QTKit/QTKit.h>
+
+#include "media/video/capture/mac/video_capture_device_mac.h"
+#include "media/video/capture/video_capture_device.h"
+
+@interface VideoCaptureDeviceMacQTKit : NSObject{
dmac 2011/10/06 23:42:04 space between NSObject and {
mflodman_chromium_OOO 2011/10/07 13:03:51 Done.
+ @private
+ // Settings.
+ int frameRate_;
+ int frameWidth_;
+ int frameHeight_;
+
+ media::VideoCaptureDeviceMac* frameReceiver_;
+
+ // QTKit variables.
+ QTCaptureSession* captureSession_;
+ QTCaptureDeviceInput* captureDeviceInput_;
+ QTCaptureDecompressedVideoOutput* captureDecompressedOutput_;
+
+ NSAutoreleasePool* pool_;
+}
+
+// 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
++ (void)deviceNames:(NSArray*)deviceNames;
+
+// Registers a receiver for the captured frames.
+- (void)registerReceiver:(media::VideoCaptureDeviceMac*)frameReceiver;
+
+// Sets which capture device to use. Returns YES on sucess, NO otherwise.
+- (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
+
+// Removes the set capture device.
+- (void)removeCaptureDevice;
+
+// Configures the capture properties.
+- (BOOL)setCaptureHeight:(int)height
+ 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
+ AndFrameRate:(int)frameRate;
+
+// 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_

Powered by Google App Engine
This is Rietveld 408576698