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 <AppKit/AppKit.h> 20 #import <CoreData/CoreData.h> 21 #import <CoreFoundation/CoreFoundation.h> 22 #import <CoreVideo/CoreVideo.h> 23 #import <Foundation/Foundation.h> 24 #import <QTKit/QTKit.h> 25 26 #include "webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit.h" 27 28 @interface VideoCaptureMacQTKitObjC : NSObject { 29 bool _capturing; 30 int _frameRate; 31 int _frameWidth; 32 int _frameHeight; 33 int _framesDelivered; 34 int _framesRendered; 35 bool _captureInitialized; 36 37 webrtc::videocapturemodule::VideoCaptureMacQTKit* _owner; 38 NSLock* _lock; 39 40 QTCaptureSession* _captureSession; 41 QTCaptureDeviceInput* _captureVideoDeviceInput; 42 QTCaptureDecompressedVideoOutput* _captureDecompressedVideoOutput; 43 NSArray* _captureDevices; 44 int _captureDeviceCount; 45 char _captureDeviceNameUTF8[1024]; 46 char _captureDeviceNameUniqueID[1024]; 47 } 48 49 - (void)getCaptureDevices; 50 - (BOOL)initializeVideoCapture; 51 - (BOOL)initializeVariables; 52 53 - (void)registerOwner:(webrtc::videocapturemodule::VideoCaptureMacQTKit*)owner; 54 - (BOOL)setCaptureDeviceById:(char*)uniqueId; 55 - (void)setCaptureHeight:(int)height width:(int)width frameRate:(int)frameRate; 56 - (void)startCapture; 57 - (void)stopCapture; 58 59 @end 60 61 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_OBJC_H_ 62