Files
MP42Foundation/MP42/MP42ChapterTrack.h
T
2013-11-01 11:07:35 +01:00

34 lines
969 B
Objective-C

//
// MP42ChapterTrack.h
// Subler
//
// Created by Damiano Galassi on 06/02/09.
// Copyright 2009 Damiano Galassi. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MP42Track.h"
#import "MP42TextSample.h"
@interface MP42ChapterTrack : MP42Track <NSCoding> {
NSMutableArray *chapters;
}
- (instancetype)initWithSourceURL:(NSURL *)URL trackID:(NSInteger)trackID fileHandle:(MP42FileHandle)fileHandle;
+ (instancetype)chapterTrackFromFile:(NSURL *)URL;
- (void)addChapter:(NSString *)title duration:(uint64_t)timestamp;
- (void)removeChapterAtIndex:(NSUInteger)index;
- (void)setTimestamp:(MP42Duration)timestamp forChapter:(MP42TextSample *)chapterSample;
- (void)setTitle:(NSString*)title forChapter:(MP42TextSample *)chapterSample;
- (MP42TextSample *)chapterAtIndex:(NSUInteger)index;
- (NSInteger)chapterCount;
- (BOOL)exportToURL:(NSURL *)url error:(NSError **)error;
@property(nonatomic, readonly, retain) NSArray *chapters;
@end