//
//  EXCameraCaptureController.h
//  EXCameraCapture
//
//  Created by Raphael Sebbe on 02/01/06.
//  Copyright 2006 eX-cinder. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <QTKit/QTKit.h>

//@class SeqGrab, SGVideo;

@class QTCaptureView;
@class QTCaptureSession;
@class QTCaptureDeviceInput;
@class QTCaptureMovieFileOutput;
@class QTCaptureAudioPreviewOutput;
@class QTCaptureConnection;
@class QTCaptureDevice;

@interface EXCameraCaptureController : NSObject 
{
	IBOutlet NSWindow		*_captureWindow;
	IBOutlet NSDrawer		*_captureDrawer;
	IBOutlet QTCaptureView		*_captureView;
	IBOutlet NSLevelIndicator	*audioLevelMeter;
	
	NSString 			*_outputMoviePath;
	NSString 			*_outputPicturePath;
	NSString			*_tempPicturePath;
	
	BOOL				_shouldTakePhoto, videoCaptureEnabled, stillCaptureEnabled;

	NSUInteger			_defaultCompressionOptionIndex;
	NSArray				*_compressionOptions;
	QTCompressionOptions		*_selectedCompressionOption;
	
	QTCaptureSession		*_session;
	QTCaptureDeviceInput		*_videoDeviceInput;
	QTCaptureDeviceInput		*_audioDeviceInput;
	QTCaptureMovieFileOutput	*_movieFileOutput;
	QTCaptureAudioPreviewOutput	*_audioPreviewOutput;
	
	NSArray				*_videoDevices;
	NSArray				*_audioDevices;
	
	NSArray				*_videoPreviewFilterDescriptions;
	NSDictionary			*_videoPreviewFilterDescription;
	
	NSTimer				*_audioLevelTimer;
}

@property (readwrite) BOOL videoCaptureEnabled, stillCaptureEnabled;

- (IBAction)takePhoto:sender;

- (IBAction)showCaptureWindow:sender;
- (void)reset;
- (BOOL)didRecordMovie;
- (BOOL)didSavePicture;
- (NSString*)moviePath;
- (NSString*)picturePath;


@end
