andrew@webrtc.org | a7b57da | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | // |
| 12 | // video_capture_qtkit_objc.h |
| 13 | // |
| 14 | // |
| 15 | |
| 16 | #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_OBJC_H_ |
| 17 | #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_OBJC_H_ |
| 18 | |
| 19 | #import <Foundation/Foundation.h> |
| 20 | #import <QTKit/QTKit.h> |
| 21 | #import <AppKit/AppKit.h> |
| 22 | #import <CoreData/CoreData.h> |
| 23 | #import <CoreFoundation/CoreFoundation.h> |
| 24 | #import <CoreVideo/CoreVideo.h> |
| 25 | |
| 26 | #import "video_capture_recursive_lock.h" |
| 27 | |
| 28 | #include "video_capture_qtkit.h" |
| 29 | |
| 30 | @interface VideoCaptureMacQTKitObjC : NSObject{ |
| 31 | // class properties |
| 32 | bool _capturing; |
| 33 | int _counter; |
| 34 | int _frameRate; |
| 35 | int _frameWidth; |
| 36 | int _frameHeight; |
| 37 | int _framesDelivered; |
| 38 | int _framesRendered; |
| 39 | bool _OSSupported; |
| 40 | bool _captureInitialized; |
| 41 | |
| 42 | // WebRTC Custom classes |
| 43 | webrtc::videocapturemodule::VideoCaptureMacQTKit* _owner; |
| 44 | VideoCaptureRecursiveLock* _rLock; |
| 45 | |
| 46 | // QTKit variables |
| 47 | QTCaptureSession* _captureSession; |
| 48 | QTCaptureDeviceInput* _captureVideoDeviceInput; |
| 49 | QTCaptureDecompressedVideoOutput* _captureDecompressedVideoOutput; |
| 50 | NSArray* _captureDevices; |
| 51 | int _captureDeviceCount; |
| 52 | int _captureDeviceIndex; |
| 53 | NSString* _captureDeviceName; |
| 54 | char _captureDeviceNameUTF8[1024]; |
| 55 | char _captureDeviceNameUniqueID[1024]; |
| 56 | char _captureDeviceNameProductID[1024]; |
| 57 | NSString* _key; |
| 58 | NSNumber* _val; |
| 59 | NSDictionary* _videoSettings; |
| 60 | NSString* _captureQuality; |
| 61 | |
| 62 | // other |
| 63 | NSAutoreleasePool* _pool; |
| 64 | |
| 65 | } |
| 66 | /************************************************************************** |
| 67 | * |
| 68 | * The following functions are considered to be private. |
| 69 | * |
| 70 | ***************************************************************************/ |
| 71 | |
| 72 | - (NSNumber*)getCaptureDevices; |
| 73 | - (NSNumber*)initializeVideoCapture; |
| 74 | - (NSNumber*)initializeVariables; |
| 75 | - (void)checkOSSupported; |
| 76 | |
| 77 | |
| 78 | /************************************************************************** |
| 79 | * |
| 80 | * The following functions are considered public and to be called by the VideoCaptureMacQTKit class. |
| 81 | * |
| 82 | ***************************************************************************/ |
| 83 | |
| 84 | |
| 85 | - (NSNumber*)registerOwner:(webrtc::videocapturemodule::VideoCaptureMacQTKit*)owner; |
| 86 | - (NSNumber*)setCaptureDeviceById:(char*)uniqueId; |
| 87 | - (NSNumber*)setCaptureHeight:(int)height AndWidth:(int)width AndFrameRate:(int)frameRate; |
| 88 | - (NSNumber*)startCapture; |
| 89 | - (NSNumber*)stopCapture; |
| 90 | |
| 91 | @end |
| 92 | |
| 93 | #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_OBJC_H_ |