//
//  MEStreamLoader.h
//  MediaEncoding
//
//  Created by Henry Mason on Wed Mar 17 2004.
//  Copyright (c) 2004 Henry Mason. All rights reserved.
//

#import  <sys/cdefs.h>

__BEGIN_DECLS


#import <Foundation/Foundation.h>

#import "MEPacket.h"

@interface MEStreamLoader : NSObject <NSCoding> {
    NSMutableArray         *inputFiles;
}

+ (NSArray *)supportedInputFileTypes;

- (NSArray *)inputFiles;
- (BOOL)openInputFiles:(NSArray *)newFiles;

- (long long)totalLength;
- (long long)position;
- (long long)seekToPosition:(long long)newPos;

// The following allow the position to be key-value coded for the key "filePosition"

- (NSNumber *)filePosition;
- (void)setFilePosition:(NSNumber *)newPos;

// Note to reader of this code:
//  Yes, I know it should be indices, not indexes. I'm using indexes because
//  just about everyone else seems in coding. My apologies to the language.
- (NSArray *)streamIndexesForFormatType:(enum MEFormatType)type;
- (int)formatCodeForStreamAtIndex:(unsigned int)index;

- (unsigned int)requiredBufferSize;

- (BOOL)extractNextFrameToPacket:(MEPacketHeader *)outHeader;

@end

__END_DECLS
