clean up the importers and remove the MP42File delegate
This commit is contained in:
1 parent
034431894d
commit
2d00a04689
25 files changed
+343
-323
No files matched your search
+15
-21
@@ -7,6 +7,8 @@
|
||||
//
|
||||
|
||||
#import "MP42AACImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
@@ -710,21 +712,19 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
_tracksArray = [[NSMutableArray alloc] initWithCapacity:1];
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
|
||||
MP42Track *newTrack = [[MP42AudioTrack alloc] init];
|
||||
|
||||
newTrack.format = MP42AudioFormatAAC;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
|
||||
if (!inFile)
|
||||
inFile = fopen([[_fileURL path] fileSystemRepresentation], "rb");
|
||||
if (!inFile) {
|
||||
inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb");
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
stat([[_fileURL path] fileSystemRepresentation], &st);
|
||||
stat(self.fileURL.path.fileSystemRepresentation, &st);
|
||||
size = st.st_size * 8;
|
||||
|
||||
// collect all the necessary meta information
|
||||
@@ -798,13 +798,13 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
channelConfig);
|
||||
|
||||
[(MP42AudioTrack*) newTrack setChannels:channelConfig];
|
||||
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:[_fileURL path] error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
|
||||
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
|
||||
|
||||
aacInfo = [[NSMutableData alloc] init];
|
||||
[aacInfo appendBytes:pConfig length:configLength];
|
||||
free(pConfig);
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
@@ -826,14 +826,14 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
return aacInfo;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
if (!inFile) {
|
||||
inFile = fopen(_fileURL.path.fileSystemRepresentation, "rb");
|
||||
inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb");
|
||||
}
|
||||
|
||||
MP4TrackId trackId = [[_inputTracks lastObject] sourceId];
|
||||
MP4TrackId trackId = self.inputTracks.lastObject.sourceId;
|
||||
|
||||
// parse the ADTS frames, and write the MP4 samples
|
||||
u_int8_t sampleBuffer[8 * 1024];
|
||||
@@ -870,15 +870,9 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
- (NSString *)description
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"AAC Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
return @"AAC demuxer";
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
||||
+15
-21
@@ -7,6 +7,8 @@
|
||||
//
|
||||
|
||||
#import "MP42AC3Importer.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
@@ -256,21 +258,19 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
_tracksArray = [[NSMutableArray alloc] initWithCapacity:1];
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
|
||||
MP42AudioTrack *newTrack = [[MP42AudioTrack alloc] init];
|
||||
|
||||
newTrack.format = MP42AudioFormatAC3;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
|
||||
if (!inFile)
|
||||
inFile = fopen([[_fileURL path] fileSystemRepresentation], "rb");
|
||||
if (!inFile) {
|
||||
inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb");
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
stat([[_fileURL path] fileSystemRepresentation], &st);
|
||||
stat(self.fileURL.path.fileSystemRepresentation, &st);
|
||||
size = st.st_size * 8;
|
||||
|
||||
// collect all the necessary meta information
|
||||
@@ -313,9 +313,9 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
[ac3Info appendBytes:&lfeon length:sizeof(uint64_t)];
|
||||
[ac3Info appendBytes:&frmsizecod length:sizeof(uint64_t)];
|
||||
|
||||
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:[_fileURL path] error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
|
||||
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
@@ -337,14 +337,14 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
return ac3Info;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
if (!inFile) {
|
||||
inFile = fopen(_fileURL.path.fileSystemRepresentation, "rb");
|
||||
inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb");
|
||||
}
|
||||
|
||||
MP4TrackId trackId = [[_inputTracks lastObject] sourceId];
|
||||
MP4TrackId trackId = self.inputTracks.lastObject.sourceId;
|
||||
|
||||
// parse the Ac3 frames, and write the MP4 samples
|
||||
u_int8_t sampleBuffer[8 * 1024];
|
||||
@@ -381,15 +381,9 @@ static bool GetFirstHeader(FILE* inFile)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
- (NSString *)description
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"AC-3 Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
return @"AC-3 demuxer";
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
||||
+16
-25
@@ -6,9 +6,9 @@
|
||||
// Copyright 2010 Damiano Galassi All rights reserved.
|
||||
//
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED > 1060
|
||||
|
||||
#import "MP42AVFImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
#import "MP42Image.h"
|
||||
@@ -171,14 +171,12 @@
|
||||
}
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError {
|
||||
if ((self = [super init])) {
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
_fileURL = [fileURL retain];
|
||||
_localAsset = [[AVAsset assetWithURL:_fileURL] retain];
|
||||
_tracksArray = [[NSMutableArray alloc] init];
|
||||
_localAsset = [[AVAsset assetWithURL:self.fileURL] retain];
|
||||
|
||||
NSArray *tracks = [_localAsset tracks];
|
||||
NSArray<AVAssetTrack *> *tracks = [_localAsset tracks];
|
||||
|
||||
NSArray *availableChapter = [_localAsset availableChapterLocales];
|
||||
MP42ChapterTrack *chapters = nil;
|
||||
@@ -291,7 +289,7 @@
|
||||
// Set the usual track properties
|
||||
newTrack.format = [self formatForTrack:track];
|
||||
newTrack.Id = [track trackID];
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
newTrack.dataLength = [track totalSampleDataLength];
|
||||
|
||||
// "name" is undefined in AVMetadataFormat.h, so read the official track name "tnam", and then "name". On 10.7, "name" is returned as an NSData
|
||||
@@ -311,7 +309,7 @@
|
||||
CMTimeRange timeRange = [track timeRange];
|
||||
newTrack.duration = timeRange.duration.value / timeRange.duration.timescale * 1000;
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
@@ -669,7 +667,7 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender {
|
||||
- (void)demux {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
BOOL success = YES;
|
||||
@@ -684,7 +682,7 @@
|
||||
|
||||
success = (assetReader != nil);
|
||||
if (success) {
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in self.inputTracks) {
|
||||
AVAssetReaderOutput *assetReaderOutput = [AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:[_localAsset trackWithTrackID:track.sourceId]
|
||||
outputSettings:nil];
|
||||
if (![assetReader canAddOutput: assetReaderOutput])
|
||||
@@ -707,7 +705,7 @@
|
||||
localError = [assetReader error];
|
||||
}
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in self.inputTracks) {
|
||||
demuxHelper = track.muxer_helper->demuxer_context;
|
||||
AVAssetReaderOutput *assetReaderOutput = demuxHelper->assetReaderOutput;
|
||||
|
||||
@@ -902,20 +900,10 @@
|
||||
[pool release];
|
||||
}
|
||||
|
||||
- (void)startReading {
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"AVFoundation Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)fileHandle {
|
||||
uint32_t timescale = MP4GetTimeScale(fileHandle);
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in self.outputsTracks) {
|
||||
MP4Duration trackDuration = 0;
|
||||
MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId];
|
||||
|
||||
@@ -939,11 +927,14 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return @"AVFoundation demuxer";
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[_localAsset release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -10,6 +10,7 @@
|
||||
#import "MP42Track.h"
|
||||
#import "MP42AudioTrack.h"
|
||||
#import "MP42FileImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
#import "MP42MediaFormat.h"
|
||||
#import "MP42Fifo.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#import "MP42BitmapSubConverter.h"
|
||||
|
||||
#import "MP42FileImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Sample.h"
|
||||
|
||||
#import "MP42PrivateUtilities.h"
|
||||
|
||||
+11
-19
@@ -7,6 +7,8 @@
|
||||
//
|
||||
|
||||
#import "MP42CCImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42SubUtilities.h"
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
@@ -18,18 +20,14 @@
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
_tracksArray = [[NSMutableArray alloc] initWithCapacity:1];
|
||||
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
MP42Track *newTrack = [[MP42ClosedCaptionTrack alloc] init];
|
||||
|
||||
newTrack.name = @"Closed Caption Track";
|
||||
newTrack.format = MP42ClosedCaptionFormatCEA608;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
@@ -46,7 +44,7 @@
|
||||
return NSMakeSize([(MP42SubtitleTrack*)track trackWidth], [(MP42SubtitleTrack*) track trackHeight]);
|
||||
}
|
||||
|
||||
- (NSData *)magicCookieForTrack:(MP42Track *)track
|
||||
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
@@ -107,12 +105,12 @@ static int ParseByte(const char *string, UInt8 *byte, Boolean hex)
|
||||
return err;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
MP4TrackId trackId = [[_inputTracks lastObject] sourceId];
|
||||
MP4TrackId trackId = self.inputTracks.lastObject.sourceId;
|
||||
|
||||
NSString *scc = STStandardizeStringNewlines(STLoadFileWithUnknownEncoding([_fileURL path]));
|
||||
NSString *scc = STStandardizeStringNewlines(STLoadFileWithUnknownEncoding(self.fileURL.path));
|
||||
if (!scc) return;
|
||||
|
||||
NSScanner *sc = [NSScanner scannerWithString:scc];
|
||||
@@ -242,15 +240,9 @@ static int ParseByte(const char *string, UInt8 *byte, Boolean hex)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
- (NSString *)description
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"Closed Caption Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
return @"CC demuxer";
|
||||
}
|
||||
|
||||
@end
|
||||
+9
-18
@@ -36,17 +36,11 @@ typedef NS_ENUM(NSUInteger, MP42Status) {
|
||||
MP42StatusWriting
|
||||
};
|
||||
|
||||
/**
|
||||
* MP42FileDelegate
|
||||
*/
|
||||
@protocol MP42FileDelegate <NSObject>
|
||||
@optional
|
||||
- (void)progressStatus:(CGFloat)progress;
|
||||
@end
|
||||
|
||||
@class MP42Muxer;
|
||||
@class MP42FileImporter;
|
||||
|
||||
typedef void (^MP42FileProgressHandler)(double progress);
|
||||
|
||||
/**
|
||||
* A MP42File object is an object that represents a mp4 file.
|
||||
*/
|
||||
@@ -55,11 +49,11 @@ typedef NS_ENUM(NSUInteger, MP42Status) {
|
||||
MP42FileHandle _fileHandle;
|
||||
NSURL *_fileURL;
|
||||
|
||||
id <MP42FileDelegate> _delegate;
|
||||
|
||||
MP42Status _status;
|
||||
BOOL _cancelled;
|
||||
|
||||
MP42FileProgressHandler _progressHandler;
|
||||
|
||||
NSMutableArray<__kindof MP42Track *> *_tracks;
|
||||
NSMutableArray<MP42Track *> *_tracksToBeDeleted;
|
||||
MP42Metadata *_metadata;
|
||||
@@ -72,8 +66,6 @@ typedef NS_ENUM(NSUInteger, MP42Status) {
|
||||
|
||||
+ (void)setGlobalLogger:(id <MP42Logging>)logger;
|
||||
|
||||
@property(nonatomic, readwrite, assign) id <MP42FileDelegate> delegate;
|
||||
|
||||
/**
|
||||
* indicates the URL with which the instance of MP42File was initialized.
|
||||
*/
|
||||
@@ -100,24 +92,21 @@ typedef NS_ENUM(NSUInteger, MP42Status) {
|
||||
@property(nonatomic, readonly) uint64_t dataSize;
|
||||
|
||||
/**
|
||||
* Creates a MP42File instance.
|
||||
*
|
||||
* @param del the object delegate
|
||||
* Creates a empty MP42File instance.
|
||||
*
|
||||
* @return An instance of MP42File
|
||||
*/
|
||||
|
||||
- (instancetype)initWithDelegate:(id <MP42FileDelegate>)del;
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
* Creates a MP42File instance from the passed URL.
|
||||
*
|
||||
* @param URL an instance of NSURL that references a mp4 file.
|
||||
* @param del the object delegate
|
||||
*
|
||||
* @return An instance of MP42File
|
||||
*/
|
||||
- (instancetype)initWithURL:(NSURL *)URL delegate:(nullable id <MP42FileDelegate>)del;
|
||||
- (instancetype)initWithURL:(NSURL *)URL;
|
||||
|
||||
/**
|
||||
* Provides the array of MP42Tracks contained by the mp4 file
|
||||
@@ -189,6 +178,8 @@ typedef NS_ENUM(NSUInteger, MP42Status) {
|
||||
*/
|
||||
- (void)organizeAlternateGroups;
|
||||
|
||||
@property (nonatomic, readwrite, copy, nullable) MP42FileProgressHandler progressHandler;
|
||||
|
||||
/**
|
||||
* Reads an existing mp4 file and writes a new version of the file with the two important changes:
|
||||
*
|
||||
|
||||
+11
-18
@@ -87,7 +87,6 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
@implementation MP42File
|
||||
|
||||
@synthesize fileHandle = _fileHandle;
|
||||
@synthesize delegate = _delegate;
|
||||
@synthesize URL = _fileURL;
|
||||
|
||||
@synthesize itracks = _tracks;
|
||||
@@ -96,6 +95,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
@synthesize hasFileRepresentation = _hasFileRepresentation;
|
||||
|
||||
@synthesize status = _status;
|
||||
@synthesize progressHandler = _progressHandler;
|
||||
@synthesize muxer = _muxer;
|
||||
|
||||
+ (void)initialize {
|
||||
@@ -145,7 +145,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
|
||||
#pragma mark - Inits
|
||||
|
||||
- (id)init {
|
||||
- (instancetype)init {
|
||||
if ((self = [super init])) {
|
||||
_hasFileRepresentation = NO;
|
||||
_tracks = [[NSMutableArray alloc] init];
|
||||
@@ -157,18 +157,9 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithDelegate:(id <MP42FileDelegate>)del {
|
||||
if ((self = [self init])) {
|
||||
_delegate = del;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)URL delegate:(nullable id <MP42FileDelegate>)del {
|
||||
- (instancetype)initWithURL:(NSURL *)URL {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_delegate = del;
|
||||
_fileURL = [[URL fileReferenceURL] retain];
|
||||
|
||||
// Open the file for reading
|
||||
@@ -571,12 +562,12 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
// Loop to check the progress
|
||||
while (!done) {
|
||||
unsigned long long fileSize = [[[fileManager attributesOfItemAtPath:self.tempURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue];
|
||||
[self progressStatus:((CGFloat)fileSize / originalFileSize) * 100];
|
||||
[self progressStatus:((double)fileSize / originalFileSize) * 100];
|
||||
usleep(450000);
|
||||
}
|
||||
|
||||
// Additional check to see if we can open the optimized file
|
||||
if (noErr && [[[MP42File alloc] initWithURL:tempURL delegate:nil] autorelease]) {
|
||||
if (noErr && [[[MP42File alloc] initWithURL:tempURL] autorelease]) {
|
||||
// Replace the original file
|
||||
NSURL *result = nil;
|
||||
noErr = [fileManager replaceItemAtURL:self.URL
|
||||
@@ -608,9 +599,10 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
[self.muxer cancel];
|
||||
}
|
||||
|
||||
- (void)progressStatus:(CGFloat)progress {
|
||||
if ([_delegate respondsToSelector:@selector(progressStatus:)])
|
||||
[_delegate progressStatus:progress];
|
||||
- (void)progressStatus:(double)progress {
|
||||
if (_progressHandler) {
|
||||
_progressHandler(progress);
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)writeToUrl:(NSURL *)url withAttributes:(NSDictionary *)attributes error:(NSError **)outError {
|
||||
@@ -642,7 +634,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
|
||||
while (!done) {
|
||||
unsigned long long fileSize = [[[fileManager attributesOfItemAtPath:[url path] error:NULL] valueForKey:NSFileSize] unsignedLongLongValue];
|
||||
[self progressStatus:((CGFloat)fileSize / originalFileSize) * 100];
|
||||
[self progressStatus:((double)fileSize / originalFileSize) * 100];
|
||||
usleep(450000);
|
||||
}
|
||||
[fileManager release];
|
||||
@@ -1077,6 +1069,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[_progressHandler release];
|
||||
[_fileURL release];
|
||||
[_tracks release];
|
||||
[_importers release];
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// MP42FileImporter+Private.h
|
||||
// MP42Foundation
|
||||
//
|
||||
// Created by Damiano Galassi on 05/09/15.
|
||||
// Copyright © 2015 Damiano Galassi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
#import "MP42MediaFormat.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MP42FileImporter (Private)
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL;
|
||||
|
||||
- (void)addTrack:(MP42Track *)track;
|
||||
- (void)addTracks:(NSArray<MP42Track *> *)tracks;
|
||||
|
||||
@property (nonatomic, copy) NSArray<MP42Track *> *inputTracks;
|
||||
@property (nonatomic, copy) NSArray<MP42Track *> *outputsTracks;
|
||||
|
||||
- (BOOL)containsTrack:(MP42Track *)track;
|
||||
- (MP42Track *)inputTrackWithTrackID:(MP42TrackId)trackId;
|
||||
|
||||
- (void)setActiveTrack:(MP42Track *)track;
|
||||
|
||||
- (void)startReading;
|
||||
- (void)cancelReading;
|
||||
|
||||
- (void)enqueue:(MP42SampleBuffer *)sample;
|
||||
|
||||
- (CGFloat)progress;
|
||||
|
||||
- (BOOL)done;
|
||||
- (void)setDone;
|
||||
|
||||
@end
|
||||
|
||||
@interface MP42FileImporter (Override)
|
||||
|
||||
- (NSUInteger)timescaleForTrack:(MP42Track *)track;
|
||||
- (NSSize)sizeForTrack:(MP42Track *)track;
|
||||
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track;
|
||||
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42Track *)track;
|
||||
- (BOOL)cleanUp:(MP42FileHandle)fileHandle;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+11
-33
@@ -7,9 +7,6 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
#import "MP42MediaFormat.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -19,48 +16,29 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MP42FileImporter : NSObject {
|
||||
@protected
|
||||
NSURL *_fileURL;
|
||||
|
||||
NSInteger _chapterId;
|
||||
MP42Metadata *_metadata;
|
||||
|
||||
NSMutableArray<MP42Track *> *_tracksArray;
|
||||
NSMutableArray<MP42Track *> *_inputTracks;
|
||||
NSMutableArray<MP42Track *> *_outputsTracks;
|
||||
NSThread *_demuxerThread;
|
||||
|
||||
CGFloat _progress;
|
||||
int32_t _cancelled;
|
||||
int32_t _done;
|
||||
|
||||
@private
|
||||
NSURL *_fileURL;
|
||||
|
||||
NSMutableArray<MP42Track *> *_tracksArray;
|
||||
|
||||
NSMutableArray<MP42Track *> *_inputTracks;
|
||||
NSMutableArray<MP42Track *> *_outputsTracks;
|
||||
|
||||
NSThread *_demuxerThread;
|
||||
|
||||
int32_t _done;
|
||||
dispatch_semaphore_t _doneSem;
|
||||
}
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
|
||||
|
||||
- (BOOL)containsTrack:(MP42Track *)track;
|
||||
- (MP42Track *)inputTrackWithTrackID:(MP42TrackId)trackId;
|
||||
|
||||
- (NSUInteger)timescaleForTrack:(MP42Track *)track;
|
||||
- (NSSize)sizeForTrack:(MP42Track *)track;
|
||||
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track;
|
||||
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42Track *)track;
|
||||
|
||||
- (void)setActiveTrack:(MP42Track *)track;
|
||||
|
||||
- (void)startReading;
|
||||
- (void)cancelReading;
|
||||
|
||||
- (void)enqueue:(MP42SampleBuffer *)sample;
|
||||
|
||||
- (CGFloat)progress;
|
||||
|
||||
- (BOOL)done;
|
||||
- (void)setDone;
|
||||
|
||||
- (BOOL)cleanUp:(MP42FileHandle)fileHandle;
|
||||
|
||||
@property(nonatomic, readonly) NSURL *fileURL;
|
||||
@property(nonatomic, readonly) MP42Metadata *metadata;
|
||||
@property(nonatomic, readonly) NSArray<MP42Track *> *tracks;
|
||||
|
||||
|
||||
+71
-10
@@ -93,6 +93,16 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_fileURL = [fileURL retain];
|
||||
_tracksArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
@@ -119,28 +129,72 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSURL *)fileURL
|
||||
{
|
||||
return _fileURL;
|
||||
}
|
||||
|
||||
- (void)addTrack:(MP42Track *)track
|
||||
{
|
||||
[_tracksArray addObject:track];
|
||||
}
|
||||
|
||||
- (void)addTracks:(NSArray<MP42Track *> *)tracks
|
||||
{
|
||||
[_tracksArray addObjectsFromArray:tracks];
|
||||
}
|
||||
|
||||
- (NSArray<MP42Track *> *)inputTracks
|
||||
{
|
||||
return [[_inputTracks copy] autorelease];
|
||||
}
|
||||
|
||||
- (NSArray<MP42Track *> *)outputsTracks
|
||||
{
|
||||
return [[_outputsTracks copy] autorelease];
|
||||
}
|
||||
|
||||
@synthesize metadata = _metadata;
|
||||
@synthesize tracks = _tracksArray;
|
||||
|
||||
- (NSUInteger)timescaleForTrack:(MP42Track *)track
|
||||
{
|
||||
return 0;
|
||||
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
||||
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
- (NSSize)sizeForTrack:(MP42Track *)track
|
||||
{
|
||||
return NSMakeSize(0,0);
|
||||
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
||||
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track
|
||||
{
|
||||
return nil;
|
||||
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
||||
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
- (AudioStreamBasicDescription)audioDescriptionForTrack:(MP42Track *)track
|
||||
{
|
||||
AudioStreamBasicDescription desc = {0,0,0,0,0,0,0,0,0};
|
||||
return desc;
|
||||
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
||||
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
- (void)demux
|
||||
{
|
||||
@throw [NSException exceptionWithName:NSInternalInconsistencyException
|
||||
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)fileHandle
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)setActiveTrack:(MP42Track *)track {
|
||||
@@ -170,6 +224,18 @@
|
||||
}
|
||||
|
||||
_doneSem = dispatch_semaphore_create(0);
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux) object:nil];
|
||||
_demuxerThread.name = self.description;
|
||||
|
||||
// 10.10+
|
||||
if ([_demuxerThread respondsToSelector:@selector(setQualityOfService:)]) {
|
||||
_demuxerThread.qualityOfService = NSQualityOfServiceUtility;
|
||||
}
|
||||
|
||||
[_demuxerThread start];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)cancelReading
|
||||
@@ -218,11 +284,6 @@
|
||||
return _progress;
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)fileHandle
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)containsTrack:(MP42Track *)track
|
||||
{
|
||||
return [_tracksArray containsObject:track];
|
||||
|
||||
@@ -10,16 +10,14 @@
|
||||
#import "MP42FileImporter.h"
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
typedef struct framerate_t {
|
||||
uint32_t code;
|
||||
uint32_t timescale;
|
||||
uint32_t duration;
|
||||
} framerate_t;
|
||||
typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
||||
+22
-26
@@ -7,8 +7,12 @@
|
||||
//
|
||||
|
||||
#import "MP42H264Importer.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
//#define DEBUG_H264
|
||||
@@ -1352,26 +1356,24 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
_tracksArray = [[NSMutableArray alloc] initWithCapacity:1];
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
|
||||
MP42VideoTrack *newTrack = [[MP42VideoTrack alloc] init];
|
||||
|
||||
newTrack.format = MP42VideoFormatH264;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
|
||||
if (!inFile)
|
||||
inFile = fopen([[_fileURL path] fileSystemRepresentation], "rb");
|
||||
if (!inFile) {
|
||||
inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb");
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
stat([[_fileURL path] fileSystemRepresentation], &st);
|
||||
stat(self.fileURL.path.fileSystemRepresentation, &st);
|
||||
_size = st.st_size;
|
||||
|
||||
uint32_t tw, th;
|
||||
uint8_t profile, level;
|
||||
if ((avcC = H264Info([[_fileURL path] cStringUsingEncoding:NSASCIIStringEncoding], &tw, &th, &profile, &level))) {
|
||||
if ((avcC = H264Info([self.fileURL.path cStringUsingEncoding:NSASCIIStringEncoding], &tw, &th, &profile, &level))) {
|
||||
newTrack.width = newTrack.trackWidth = tw;
|
||||
newTrack.height = newTrack.trackHeight = th;
|
||||
newTrack.hSpacing = newTrack.vSpacing = 1;
|
||||
@@ -1379,9 +1381,9 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
|
||||
newTrack.origLevel = newTrack.newLevel = level;
|
||||
}
|
||||
|
||||
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:[_fileURL path] error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
|
||||
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
@@ -1412,15 +1414,15 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
|
||||
return avcC;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
if (!inFile) {
|
||||
inFile = fopen([[_fileURL path] fileSystemRepresentation], "rb");
|
||||
inFile = fopen(self.fileURL.path.fileSystemRepresentation, "rb");
|
||||
}
|
||||
|
||||
MP42Track *track = [_inputTracks lastObject];
|
||||
MP4TrackId trackId = [track sourceId];
|
||||
MP42Track *track = self.inputTracks.lastObject;
|
||||
MP4TrackId trackId = track.sourceId;
|
||||
|
||||
framerate_t * framerate;
|
||||
int64_t currentSize = 0;
|
||||
@@ -1599,14 +1601,14 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
|
||||
DpbFlush(&h264_dpb);
|
||||
free(nal_buffer);
|
||||
|
||||
[self setDone:YES];
|
||||
[self setDone];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)fileHandle
|
||||
{
|
||||
MP42Track *track = [_inputTracks lastObject];
|
||||
MP4TrackId trackId = [track Id];
|
||||
MP42Track *track = self.inputTracks.lastObject;
|
||||
MP4TrackId trackId = track.Id;
|
||||
|
||||
if (h264_dpb.dpb.size_min > 0) {
|
||||
unsigned int ix;
|
||||
@@ -1630,15 +1632,9 @@ NSData* H264Info(const char *filePath, uint32_t *pic_width, uint32_t *pic_height
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
- (NSString *)description
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"H264 Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
return @"H264 demuxer";
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
||||
+21
-29
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42MkvImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42File.h"
|
||||
#import "MP42SubUtilities.h"
|
||||
@@ -142,11 +143,9 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
_ioStream = calloc(1, sizeof(StdIoStream));
|
||||
_matroskaFile = openMatroskaFile((char *)[[_fileURL path] UTF8String], _ioStream);
|
||||
_matroskaFile = openMatroskaFile(self.fileURL.path.fileSystemRepresentation, _ioStream);
|
||||
|
||||
if (!_matroskaFile) {
|
||||
if (outError) {
|
||||
@@ -161,11 +160,8 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
uint64_t *trackSizes = [self copyGuessedTrackDataLength];
|
||||
|
||||
NSInteger trackCount = mkv_GetNumTracks(_matroskaFile);
|
||||
_tracksArray = [[NSMutableArray alloc] initWithCapacity:trackCount];
|
||||
|
||||
NSInteger i;
|
||||
|
||||
for (i = 0; i < trackCount; i++) {
|
||||
for (NSInteger i = 0; i < trackCount; i++) {
|
||||
TrackInfo *mkvTrack = mkv_GetTrackInfo(_matroskaFile, i);
|
||||
MP42Track *newTrack = nil;
|
||||
|
||||
@@ -202,7 +198,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
[(MP42AudioTrack*)newTrack setChannels:mkvTrack->AV.Audio.Channels];
|
||||
[newTrack setAlternate_group:1];
|
||||
|
||||
for (MP42Track *audioTrack in _tracksArray) {
|
||||
for (MP42Track *audioTrack in self.tracks) {
|
||||
if ([audioTrack isMemberOfClass:[MP42AudioTrack class]])
|
||||
newTrack.enabled = NO;
|
||||
}
|
||||
@@ -213,7 +209,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
newTrack = [[MP42SubtitleTrack alloc] init];
|
||||
[newTrack setAlternate_group:2];
|
||||
|
||||
for (MP42Track *subtitleTrack in _tracksArray) {
|
||||
for (MP42Track *subtitleTrack in self.tracks) {
|
||||
if ([subtitleTrack isMemberOfClass:[MP42SubtitleTrack class]])
|
||||
newTrack.enabled = NO;
|
||||
}
|
||||
@@ -222,7 +218,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
if (newTrack) {
|
||||
newTrack.format = [self matroskaCodecIDToHumanReadableName:mkvTrack];
|
||||
newTrack.Id = i;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
newTrack.dataLength = trackSizes[i];
|
||||
if (mkvTrack->Type == TT_AUDIO)
|
||||
newTrack.startOffset = [self matroskaTrackStartTime:mkvTrack Id:i];
|
||||
@@ -253,12 +249,12 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
iso639_lang_t *isoLanguage = lang_for_code2(mkvTrack->Language);
|
||||
newTrack.language = [NSString stringWithUTF8String:isoLanguage->eng_name];
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
}
|
||||
|
||||
Chapter* chapters;
|
||||
Chapter *chapters;
|
||||
unsigned count;
|
||||
mkv_GetChapters(_matroskaFile, &chapters, &count);
|
||||
|
||||
@@ -285,7 +281,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
duration:timestamp];
|
||||
}
|
||||
}
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
@@ -588,7 +584,9 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
/* mask other tracks because we don't need them */
|
||||
unsigned int TrackMask = ~0;
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
NSArray<MP42Track *> *inputTracks = self.inputTracks;
|
||||
|
||||
for (MP42Track *track in inputTracks) {
|
||||
TrackMask &= ~(1 << [track sourceId]);
|
||||
track.muxer_helper->demuxer_context = [[MatroskaDemuxHelper alloc] init];
|
||||
}
|
||||
@@ -601,7 +599,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
|
||||
MP42Track *track = nil;
|
||||
|
||||
for (MP42Track *fTrack in _inputTracks){
|
||||
for (MP42Track *fTrack in inputTracks){
|
||||
if (fTrack.sourceId == Track) {
|
||||
helper = fTrack.muxer_helper;
|
||||
demuxHelper = helper->demuxer_context;
|
||||
@@ -818,7 +816,7 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
}
|
||||
}
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in inputTracks) {
|
||||
muxer_helper *helper = track.muxer_helper;
|
||||
demuxHelper = helper->demuxer_context;
|
||||
|
||||
@@ -942,20 +940,9 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
[pool release];
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux) object:nil];
|
||||
[_demuxerThread setName:@"Matroska Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)fileHandle
|
||||
{
|
||||
for (MP42Track *track in _outputsTracks) {
|
||||
for (MP42Track *track in self.outputsTracks) {
|
||||
MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId];
|
||||
|
||||
MatroskaDemuxHelper *demuxHelper = inputTrack.muxer_helper->demuxer_context;
|
||||
@@ -985,6 +972,11 @@ int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, uint64_t
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return @"Matroska demuxer";
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
closeMatroskaFile(_matroskaFile, _ioStream);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// MP42MkvFileImporter.h
|
||||
// MP42Mp4FileImporter.h
|
||||
// Subler
|
||||
//
|
||||
// Created by Damiano Galassi on 31/01/10.
|
||||
@@ -9,11 +9,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MP42FileImporter.h"
|
||||
#import "MP42File.h"
|
||||
#import "mp4v2.h"
|
||||
|
||||
@interface MP42Mp4Importer : MP42FileImporter <MP42FileDelegate> {
|
||||
@interface MP42Mp4Importer : MP42FileImporter {
|
||||
@private
|
||||
MP4FileHandle _fileHandle;
|
||||
MP42FileHandle _fileHandle;
|
||||
}
|
||||
|
||||
@end
|
||||
+18
-26
@@ -7,6 +7,8 @@
|
||||
//
|
||||
|
||||
#import "MP42Mp4Importer.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42Sample.h"
|
||||
|
||||
@@ -32,10 +34,8 @@
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError;
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
MP42File *sourceFile = [[MP42File alloc] initWithURL:_fileURL delegate:self];
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL];
|
||||
|
||||
if(!sourceFile) {
|
||||
if (outError) {
|
||||
@@ -46,7 +46,7 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
_tracksArray = [sourceFile.tracks mutableCopy];
|
||||
[self addTracks:sourceFile.tracks];
|
||||
_metadata = [sourceFile.metadata retain];
|
||||
|
||||
[sourceFile release];
|
||||
@@ -70,7 +70,7 @@
|
||||
- (NSData *)magicCookieForTrack:(MP42Track *)track
|
||||
{
|
||||
if (!_fileHandle) {
|
||||
_fileHandle = MP4Read(_fileURL.path.fileSystemRepresentation);
|
||||
_fileHandle = MP4Read(self.fileURL.path.fileSystemRepresentation);
|
||||
}
|
||||
|
||||
NSData *magicCookie = nil;
|
||||
@@ -216,10 +216,12 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
NSInteger tracksNumber = _inputTracks.count;
|
||||
NSArray<MP42Track *> *inputTracks = self.inputTracks;
|
||||
|
||||
NSInteger tracksNumber = inputTracks.count;
|
||||
NSInteger tracksDone = 0;
|
||||
MP4DemuxHelper *demuxHelper;
|
||||
|
||||
@@ -227,7 +229,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in inputTracks) {
|
||||
track.muxer_helper->demuxer_context = [[MP4DemuxHelper alloc] init];
|
||||
demuxHelper = track.muxer_helper->demuxer_context;
|
||||
demuxHelper->totalSampleNumber = MP4GetTrackNumberOfSamples(_fileHandle, track.sourceId);
|
||||
@@ -244,7 +246,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in inputTracks) {
|
||||
muxer_helper *helper = track.muxer_helper;
|
||||
demuxHelper = helper->demuxer_context;
|
||||
|
||||
@@ -303,24 +305,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
{
|
||||
if (!_fileHandle) {
|
||||
_fileHandle = MP4Read(_fileURL.path.fileSystemRepresentation);
|
||||
}
|
||||
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"MP4 Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)dstFileHandle
|
||||
{
|
||||
for (MP42Track *track in _outputsTracks) {
|
||||
for (MP42Track *track in self.outputsTracks) {
|
||||
MP4TrackId srcTrackId = track.sourceId;
|
||||
MP4TrackId dstTrackId = track.Id;
|
||||
|
||||
@@ -356,6 +343,11 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return @"MP4 demuxer";
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_fileHandle) {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class MP42Track;
|
||||
|
||||
@protocol MP42MuxerDelegate
|
||||
- (void)progressStatus:(CGFloat)progress;
|
||||
- (void)progressStatus:(double)progress;
|
||||
@end
|
||||
|
||||
@interface MP42Muxer : NSObject {
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
//
|
||||
|
||||
#import "MP42Muxer.h"
|
||||
|
||||
#import "MP42File.h"
|
||||
#import "MP42FileImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42Sample.h"
|
||||
#import "MP42AudioConverter.h"
|
||||
#import "MP42BitmapSubConverter.h"
|
||||
|
||||
+17
-25
@@ -8,6 +8,8 @@
|
||||
|
||||
#if !__LP64__
|
||||
#import "MP42QTImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42File.h"
|
||||
#import "MP42Image.h"
|
||||
#import "MP42Languages.h"
|
||||
@@ -37,10 +39,8 @@
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
|
||||
NSDictionary *attrs = @{QTMovieURLAttribute : _fileURL,
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
NSDictionary *attrs = @{QTMovieURLAttribute : self.fileURL,
|
||||
QTMovieOpenAsyncRequiredAttribute: @NO,
|
||||
QTMovieOpenAsyncOKAttribute: @NO};
|
||||
|
||||
@@ -75,8 +75,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
_tracksArray = [[NSMutableArray alloc] init];
|
||||
|
||||
[self convertMetadata];
|
||||
|
||||
for (QTTrack *track in [_sourceFile tracks]) {
|
||||
@@ -231,14 +229,14 @@
|
||||
if (newTrack) {
|
||||
newTrack.format = [self formatForTrack:track];
|
||||
newTrack.Id = [[track attributeForKey:QTTrackIDAttribute] integerValue];
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
newTrack.name = [track attributeForKey:QTTrackDisplayNameAttribute];
|
||||
newTrack.language = [self langForTrack:track];
|
||||
|
||||
TimeValue64 duration = GetMediaDisplayDuration(media) / GetMediaTimeScale(media) * 1000;
|
||||
newTrack.duration = duration;
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
}
|
||||
@@ -819,17 +817,17 @@
|
||||
return [super audioDescriptionForTrack:track];
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
OSStatus err = noErr;
|
||||
|
||||
NSInteger tracksNumber = [_inputTracks count];
|
||||
NSInteger tracksNumber = self.inputTracks.count;
|
||||
NSInteger tracksDone = 0;
|
||||
|
||||
MovDemuxHelper *demuxHelper = nil;
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in self.inputTracks) {
|
||||
track.muxer_helper->demuxer_context = [[MovDemuxHelper alloc] init];
|
||||
|
||||
Track qtcTrack = [[_sourceFile trackWithTrackID:[track sourceId]] quickTimeTrack];
|
||||
@@ -839,7 +837,7 @@
|
||||
demuxHelper->totalSampleNumber = GetMediaSampleCount(media);
|
||||
}
|
||||
|
||||
for (MP42Track * track in _inputTracks) {
|
||||
for (MP42Track * track in self.inputTracks) {
|
||||
if (_cancelled)
|
||||
break;
|
||||
|
||||
@@ -928,21 +926,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"QuickTime Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)cleanUp:(MP4FileHandle)fileHandle
|
||||
{
|
||||
for (MP42Track *track in _outputsTracks) {
|
||||
Track qtcTrack = [[_sourceFile trackWithTrackID:[track sourceId]] quickTimeTrack];
|
||||
for (MP42Track *track in self.outputsTracks) {
|
||||
Track qtcTrack = [[_sourceFile trackWithTrackID:track.sourceId] quickTimeTrack];
|
||||
MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId];
|
||||
|
||||
TimeValue editTrackStart, editTrackDuration;
|
||||
@@ -991,6 +978,11 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return @"QuickTime demuxer";
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_sourceFile release];
|
||||
|
||||
+18
-21
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42SrtImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42File.h"
|
||||
#import "MP42SubUtilities.h"
|
||||
@@ -20,19 +21,16 @@
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_fileURL = [fileURL retain];
|
||||
_tracksArray = [[NSMutableArray alloc] init];
|
||||
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
NSInteger success = 0;
|
||||
MP4Duration duration = 0;
|
||||
|
||||
MP42SubtitleTrack *newTrack = [[MP42SubtitleTrack alloc] init];
|
||||
|
||||
newTrack.format = MP42SubtitleFormatTx3g;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
newTrack.alternate_group = 2;
|
||||
newTrack.language = getFilenameLanguage((CFStringRef)[_fileURL path]);
|
||||
newTrack.language = getFilenameLanguage((CFStringRef)self.fileURL.path);
|
||||
|
||||
// Check if a 10.10 only class is available, NSLinguisticTagger crashes on 10.9
|
||||
// if the string contains some characters.
|
||||
@@ -86,10 +84,10 @@
|
||||
}
|
||||
|
||||
_ss = [[SBSubSerializer alloc] init];
|
||||
if ([[_fileURL pathExtension] caseInsensitiveCompare: @"srt"] == NSOrderedSame) {
|
||||
success = LoadSRTFromPath([_fileURL path], _ss, &duration);
|
||||
} else if ([[_fileURL pathExtension] caseInsensitiveCompare: @"smi"] == NSOrderedSame) {
|
||||
success = LoadSMIFromPath([_fileURL path], _ss, 1);
|
||||
if ([self.fileURL.pathExtension caseInsensitiveCompare: @"srt"] == NSOrderedSame) {
|
||||
success = LoadSRTFromPath(self.fileURL.path, _ss, &duration);
|
||||
} else if ([self.fileURL.pathExtension caseInsensitiveCompare: @"smi"] == NSOrderedSame) {
|
||||
success = LoadSMIFromPath(self.fileURL.path, _ss, 1);
|
||||
}
|
||||
|
||||
[newTrack setDuration:duration];
|
||||
@@ -115,13 +113,18 @@
|
||||
newTrack.someSamplesAreForced = YES;
|
||||
}
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (nullable NSData *)magicCookieForTrack:(MP42Track *)track
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSUInteger)timescaleForTrack:(MP42Track *)track
|
||||
{
|
||||
return 1000;
|
||||
@@ -132,12 +135,12 @@
|
||||
return NSMakeSize([(MP42SubtitleTrack*)track trackWidth], [(MP42SubtitleTrack*) track trackHeight]);
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
MP42SampleBuffer *sample;
|
||||
|
||||
for (MP42SubtitleTrack *track in _inputTracks) {
|
||||
for (MP42SubtitleTrack *track in self.inputTracks) {
|
||||
CGSize trackSize;
|
||||
trackSize.width = track.trackWidth;
|
||||
trackSize.height = track.trackHeight;
|
||||
@@ -164,15 +167,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
- (NSString *)description
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"Srt Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
return @"SRT demuxer";
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MP42Track+Muxer.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
@implementation MP42Track (MP42TrackMuxerExtentions)
|
||||
|
||||
|
||||
+14
-20
@@ -7,6 +7,8 @@
|
||||
//
|
||||
|
||||
#import "MP42VobSubImporter.h"
|
||||
#import "MP42FileImporter+Private.h"
|
||||
|
||||
#import "MP42SubUtilities.h"
|
||||
#import "MP42Languages.h"
|
||||
#import "MP42File.h"
|
||||
@@ -221,28 +223,26 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
NSInteger count = 0;
|
||||
_fileURL = [fileURL retain];
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
|
||||
_VobSubTracks = LoadVobSubSubtitles(_fileURL.URLByDeletingLastPathComponent, _fileURL.lastPathComponent);
|
||||
_tracksArray = [[NSMutableArray alloc] initWithCapacity:_VobSubTracks.count];
|
||||
NSInteger count = 0;
|
||||
_VobSubTracks = LoadVobSubSubtitles(self.fileURL.URLByDeletingLastPathComponent, self.fileURL.lastPathComponent);
|
||||
|
||||
for (SBVobSubTrack *track in _VobSubTracks) {
|
||||
MP42SubtitleTrack *newTrack = [[MP42SubtitleTrack alloc] init];
|
||||
|
||||
newTrack.format = MP42SubtitleFormatVobSub;
|
||||
newTrack.sourceURL = _fileURL;
|
||||
newTrack.sourceURL = self.fileURL;
|
||||
newTrack.alternate_group = 2;
|
||||
newTrack.Id = count++;
|
||||
newTrack.language = [NSString stringWithFormat:@"%s", lang_for_code_s([track->language UTF8String])->eng_name];;
|
||||
newTrack.duration = track->duration;
|
||||
|
||||
[_tracksArray addObject:newTrack];
|
||||
[self addTrack:newTrack];
|
||||
[newTrack release];
|
||||
}
|
||||
|
||||
if (!_tracksArray.count) {
|
||||
if (!self.tracks.count) {
|
||||
if (outError) {
|
||||
*outError = MP42Error(@"The file could not be opened.", @"The file is not a idx file, or it does not contain any subtitles.", 100);
|
||||
}
|
||||
@@ -289,18 +289,18 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
|
||||
return magicCookie;
|
||||
}
|
||||
|
||||
- (void)demux:(id)sender
|
||||
- (void)demux
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
||||
NSURL *subFileURL = [[_fileURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"sub"];
|
||||
NSURL *subFileURL = [self.fileURL.URLByDeletingPathExtension URLByAppendingPathExtension:@"sub"];
|
||||
|
||||
NSData *subFileData = [NSData dataWithContentsOfURL:subFileURL];
|
||||
|
||||
NSInteger tracksNumber = [_inputTracks count];
|
||||
NSInteger tracksNumber = self.inputTracks.count;
|
||||
NSInteger tracksDone = 0;
|
||||
|
||||
for (MP42Track *track in _inputTracks) {
|
||||
for (MP42Track *track in self.inputTracks) {
|
||||
SBVobSubTrack *vobTrack = [_VobSubTracks objectAtIndex:track.sourceId];
|
||||
SBVobSubSample *firstSample = nil;
|
||||
|
||||
@@ -388,15 +388,9 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
|
||||
}
|
||||
}
|
||||
|
||||
- (void)startReading
|
||||
- (NSString *)description
|
||||
{
|
||||
[super startReading];
|
||||
|
||||
if (!_demuxerThread && !_done) {
|
||||
_demuxerThread = [[NSThread alloc] initWithTarget:self selector:@selector(demux:) object:self];
|
||||
[_demuxerThread setName:@"VobSub Demuxer"];
|
||||
[_demuxerThread start];
|
||||
}
|
||||
return @"VobSub demuxer";
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
||||
@@ -92,7 +92,7 @@ int StdIoProgress(StdIoStream *st, uint64_t cur, uint64_t max) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
MatroskaFile *openMatroskaFile(char *filePath, StdIoStream *ioStream)
|
||||
MatroskaFile *openMatroskaFile(const char *filePath, StdIoStream *ioStream)
|
||||
{
|
||||
char err_msg[256];
|
||||
|
||||
|
||||
@@ -19,5 +19,5 @@ struct StdIoStream {
|
||||
|
||||
typedef struct StdIoStream StdIoStream;
|
||||
|
||||
MatroskaFile *openMatroskaFile(char *filePath, StdIoStream *ioStream);
|
||||
MatroskaFile *openMatroskaFile(const char *filePath, StdIoStream *ioStream);
|
||||
void closeMatroskaFile(MatroskaFile *matroskaFile, StdIoStream *ioStream);
|
||||
@@ -89,6 +89,8 @@
|
||||
A9A0C9B31981593900A72763 /* MP42ComponentLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A0C9B01981593900A72763 /* MP42ComponentLoader.m */; };
|
||||
A9A0C9B41981593900A72763 /* MP42ComponentLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A0C9B01981593900A72763 /* MP42ComponentLoader.m */; };
|
||||
A9A268E2196D6367003AFF57 /* MP42EditListsReconstructor.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DFBDCA1960174500410060 /* MP42EditListsReconstructor.m */; };
|
||||
A9AEFE151B9B111B00771292 /* MP42FileImporter+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A9AEFE141B9B111B00771292 /* MP42FileImporter+Private.h */; settings = {ASSET_TAGS = (); }; };
|
||||
A9AEFE161B9B111B00771292 /* MP42FileImporter+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A9AEFE141B9B111B00771292 /* MP42FileImporter+Private.h */; settings = {ASSET_TAGS = (); }; };
|
||||
A9B9C1F1182391DF00416A4E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C1F0182391DF00416A4E /* Cocoa.framework */; };
|
||||
A9B9C1FB182391DF00416A4E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9B9C1F9182391DF00416A4E /* InfoPlist.strings */; };
|
||||
A9B9C206182391DF00416A4E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B9C205182391DF00416A4E /* XCTest.framework */; };
|
||||
@@ -280,6 +282,7 @@
|
||||
A9A0C9A319814C9B00A72763 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||
A9A0C9AF1981593900A72763 /* MP42ComponentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP42ComponentLoader.h; sourceTree = "<group>"; };
|
||||
A9A0C9B01981593900A72763 /* MP42ComponentLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP42ComponentLoader.m; sourceTree = "<group>"; };
|
||||
A9AEFE141B9B111B00771292 /* MP42FileImporter+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MP42FileImporter+Private.h"; sourceTree = "<group>"; };
|
||||
A9B9C1ED182391DF00416A4E /* MP42Foundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MP42Foundation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A9B9C1F0182391DF00416A4E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
A9B9C1F3182391DF00416A4E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
@@ -627,6 +630,7 @@
|
||||
A9DFBDA0195FF5BA00410060 /* MP42Heap.m */,
|
||||
A9B9C2321823923100416A4E /* MP42FileImporter.h */,
|
||||
A9B9C2331823923100416A4E /* MP42FileImporter.m */,
|
||||
A9AEFE141B9B111B00771292 /* MP42FileImporter+Private.h */,
|
||||
A9B9C4A518239BE900416A4E /* converters */,
|
||||
A9B9C4A318239B7600416A4E /* Importers */,
|
||||
A9B9C25A1823923200416A4E /* others */,
|
||||
@@ -723,6 +727,7 @@
|
||||
files = (
|
||||
A9A0C9B21981593900A72763 /* MP42ComponentLoader.h in Headers */,
|
||||
A917286719FD2BCE00348DF8 /* MP42Logging.h in Headers */,
|
||||
A9AEFE161B9B111B00771292 /* MP42FileImporter+Private.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -731,6 +736,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A917286619FD2BCE00348DF8 /* MP42Logging.h in Headers */,
|
||||
A9B9C27D1823923200416A4E /* MP42FileImporter.h in Headers */,
|
||||
A9B9C27B1823923200416A4E /* MP42File.h in Headers */,
|
||||
A9DFBDCB1960174500410060 /* MP42EditListsReconstructor.h in Headers */,
|
||||
A9B9C29B1823923200416A4E /* MP42Track.h in Headers */,
|
||||
@@ -746,7 +752,6 @@
|
||||
A9B9C2831823923200416A4E /* MP42Image.h in Headers */,
|
||||
A9B9C2C41823957800416A4E /* MP42Languages.h in Headers */,
|
||||
A9B9C2CF182396A100416A4E /* MP42Ratings.h in Headers */,
|
||||
A9B9C27D1823923200416A4E /* MP42FileImporter.h in Headers */,
|
||||
A925AAAF18379AF800BE84D4 /* MP42Utilities.h in Headers */,
|
||||
A9B9C2CB1823968400416A4E /* RegexKitLite.h in Headers */,
|
||||
A9B9C2D3182396C400416A4E /* JSONKit.h in Headers */,
|
||||
@@ -757,6 +762,7 @@
|
||||
A9B9C2AA1823923200416A4E /* MatroskaParser.h in Headers */,
|
||||
A9B9C26E1823923200416A4E /* MP42AVFImporter.h in Headers */,
|
||||
A9B9C2791823923200416A4E /* MP42Fifo.h in Headers */,
|
||||
A9AEFE151B9B111B00771292 /* MP42FileImporter+Private.h in Headers */,
|
||||
A9B9C2A31823923200416A4E /* MP42XMLReader.h in Headers */,
|
||||
A9B9C28D1823923200416A4E /* MP42Muxer.h in Headers */,
|
||||
A9B9C2AD1823923200416A4E /* mpeg4ip_bitstream.h in Headers */,
|
||||
|
||||
Reference in new issue
Block a user