// // MP42File.h // Subler // // Created by Damiano Galassi on 31/01/09. // Copyright 2009 Damiano Galassi. All rights reserved. // #import #import "MP42Track.h" #import "MP42VideoTrack.h" #import "MP42AudioTrack.h" #import "MP42SubtitleTrack.h" #import "MP42ClosedCaptionTrack.h" #import "MP42ChapterTrack.h" #import "MP42Metadata.h" #import "MP42MediaFormat.h" extern NSString * const MP42Create64BitData; extern NSString * const MP42Create64BitTime; extern NSString * const MP42CreateChaptersPreviewTrack; extern NSString * const MP42OrganizeAlternateGroups; @protocol MP42FileDelegate @optional - (void)progressStatus:(CGFloat)progress; - (void)endSave:(id)sender; @end @interface MP42File : NSObject @property(readwrite, assign) id delegate; @property(readonly) NSURL *URL; @property(readonly) MP42Metadata *metadata; @property(readonly, copy) NSArray *tracks; @property(readonly) BOOL hasFileRepresentation; @property(readonly) NSUInteger duration; @property(readonly) uint64_t dataSize; - (instancetype)initWithDelegate:(id )del; - (instancetype)initWithExistingFile:(NSURL *)URL andDelegate:(id )del; - (NSUInteger)tracksCount; - (MP42Track *)trackAtIndex:(NSUInteger)index; - (MP42Track *)trackWithTrackID:(NSUInteger)trackId; - (NSArray *)tracksWithMediaType:(NSString *)mediaType; - (void)addTrack:(MP42Track *)track; - (void)removeTrackAtIndex:(NSUInteger)index; - (void)removeTracksAtIndexes:(NSIndexSet *)indexes; - (void)moveTrackAtIndex:(NSUInteger)index toIndex:(NSUInteger)newIndex; - (MP42ChapterTrack *)chapters; - (void)organizeAlternateGroups; - (BOOL)writeToUrl:(NSURL *)url withAttributes:(NSDictionary *)attributes error:(NSError **)outError; - (BOOL)updateMP4FileWithAttributes:(NSDictionary *)attributes error:(NSError **)outError; - (BOOL)optimize; - (void)cancel; @end