//
//  MEQTMultiplexer.h
//  MediaEncoding
//
//  Created by Henry Mason on Thu Mar 18 2004.
//  Copyright (c) 2004 Henry Mason. All rights reserved.
//

#import <QuickTime/QuickTime.h>

#import "MEStreamMultiplexer.h"

@interface MEQTMultiplexer : MEStreamMultiplexer {
    OSErr err;
    Movie outMovie;
    Track outTrackVideo, outTrackAudio;
    Media outMediaVideo, outMediaAudio;
    
    ImageDescriptionHandle      imageDesc;
    SoundDescriptionHandle		soundDesc;
    
    DataHandler outDataHandler;
    Handle      outDataRef;
    OSType      outDataRefType;
    Component   dataHandlerComponent;
    
    int     audioIndex, videoIndex, totalAudioDuration;
    BOOL    audioIsOpened, videoIsOpened;
    
    long long   firstAudioTimeStamp, firstVideoTimeStamp;
    
    BOOL fileIsOpened;
}

- (BOOL)openFile;
- (void)closeFile;

- (BOOL)openAudioWithHeader:(MEPacketHeader *)header;
- (void)closeAudio;

- (BOOL)openVideoWithHeader:(MEPacketHeader *)header;
- (void)closeVideo;

@end
