//
//  MEStreamFilter.h
//  MediaEncoding
//
//  Created by Henry Mason on Fri Mar 12 2004.
//  Copyright (c) 2004 Henry Mason. All rights reserved.
//

#import  <sys/cdefs.h>

__BEGIN_DECLS


#import <Cocoa/Cocoa.h>

#import "MEPacket.h"

typedef MEPacketHeader    *MEPacketHeaderPtr;

@interface MEStreamFilter : NSObject <NSCoding> {
    NSMutableDictionary     *filterOptions;
    unsigned int            currentPass;
}

+ (NSDictionary *)defaultFilterOptions;

+ (NSArray *)supportedInputFormatTypes;
+ (NSArray *)supportedOutputFormatTypes;

+ (NSArray *)supportedInputFormatCodes;
+ (NSArray *)supportedOutputFormatCodes;

+ (BOOL)isCompressor;
+ (BOOL)isDecompressor;

+ (NSString *)filterName;

- (BOOL)canProcessInPlace;

- (NSDictionary *)filterOptions;
- (void)changeFilterOptions:(NSDictionary *)options;

- (NSView *)filterOptionsView;
- (void)updateViewFromFilterOptions;

// -updateFilterOptionsFromView is deprecated.
// It's the filter's job to update its options when a UI element
// changes.
- (void)updateFilterOptionsFromView;

- (unsigned int)currentPass;
- (void)setCurrentPass:(unsigned int)pass;
- (void)finishCurrentPass;

- (unsigned int)requiredPasses;

- (unsigned int)requiredBufferSizeForHeader:(MEPacketHeader *)header;

- (BOOL)processPacket:(MEPacketHeader *)inHeader
			 toPacket:(MEPacketHeader *)outHeader;


@end

extern NSString *MEStreamFilterOptionsDidChangeNotification;

__END_DECLS
