//
//  BXQECS.h
//  BXQuickTime
//
//  Created by Michael Ehrmann on 14.09.06.
//  Copyright 2006 Boinx Software. All rights reserved.
//

#if !__LP64__

#import <BXBase/BXBase.h>
#include <Carbon/Carbon.h>
#include <QuickTime/ImageCompression.h>
#include <QuickTime/QuickTimeComponents.h> 

extern NSString *const BXQECSErrorDomain;

@interface NSObject (BXQECSExportDelegate)
- (BOOL)exportCallbackForMovie:(Movie)theMovie message:(short)message whatOperation:(short)whatOperation percentDone:(float)percentDone error:(NSError**)ioError;
@end

@interface NSError (BXQECSError) 
+ (NSError *)errorWitQECSErrorCode:(int)inErrorCode;
@end

@class BXQECSReader, QTMovie;

@interface BXQECS : NSObject {

	id _exportDelegate;
	
	int _exportedMovieHeight;
	int _exportedMovieWidth;
	double _exportedMovieFrameRate;
	
	NSError *_exportError;
	NSDictionary *_componentsDict;
	NSMutableDictionary *_QECSDict;
}

+ (BXQECS*)QECSWithDictionary:(NSDictionary *)inDict;

- (id)initWithDictionary:(NSDictionary *)inDict;

- (BOOL)isThreadSafe;
- (BOOL)usesExportComponentWithSubtype:(OSType)inSubType manufacturer:(OSType)inManufacturer;

- (BOOL)exportMovie:(Movie)inMovie toFilePath:(NSString *)inFilePath error:(NSError **)ioError;
- (BOOL)exportMovie:(Movie)inMovie toFilePath:(NSString *)inFilePath fromStartTime:(TimeValue)inStartTime withDuration:(TimeValue)inDuration error:(NSError **)ioError;

- (BOOL)exportQTMovie:(QTMovie *)inMovie toFilePath:(NSString *)inFilePath error:(NSError **)ioError;

- (BOOL)componentHasUserInterface;
- (OSStatus)customizeComponentSettingsWithComponentDialogForMovie:(Movie)inMovie;

- (id)objectForKey:(id)inKey;
- (void)setObject:(id)inObject forKey:(id)inKey;
- (void)removeObjectForKey:(id)inKey;

- (BOOL)isInstalled;

- (NSString *)identifier;
- (NSString *)name;
- (NSString *)comment;

- (NSString *)exportedMovieFileExtension;

@property (assign) id exportDelegate;
@property (assign) int exportedMovieHeight;
@property (assign) int exportedMovieWidth;
@property (assign) double exportedMovieFrameRate;
@property (retain) NSMutableDictionary* QECSDict;
@property (retain) NSDictionary* componentsDict;
@property (retain) NSError* exportError;

@end

#endif
