Move some files to ARC.

This commit is contained in:
Damiano Galassi committed 2017-09-29 14:00:38 +02:00
1 parent 44a8f8d14e
commit ea5fc13f87
15 files changed
+105 -256

No files matched your search

-8
View File
@@ -750,7 +750,6 @@ static bool GetFirstHeader(FILE* inFile)
*outError = MP42Error(MP42LocalizedString(@"The audio could not be opened.", @"error message"), *outError = MP42Error(MP42LocalizedString(@"The audio could not be opened.", @"error message"),
MP42LocalizedString(@"Data in file doesn't appear to be valid audio.", @"error message"), 100); MP42LocalizedString(@"Data in file doesn't appear to be valid audio.", @"error message"), 100);
} }
[newTrack release];
return nil; return nil;
} }
@@ -763,7 +762,6 @@ static bool GetFirstHeader(FILE* inFile)
*outError = MP42Error(MP42LocalizedString(@"The audio could not be opened.", @"error message"), *outError = MP42Error(MP42LocalizedString(@"The audio could not be opened.", @"error message"),
MP42LocalizedString(@"Can't convert profile to mpeg2", @"error message"), 100); MP42LocalizedString(@"Can't convert profile to mpeg2", @"error message"), 100);
} }
[newTrack release];
return nil; return nil;
} }
mpegVersion = 1; mpegVersion = 1;
@@ -793,7 +791,6 @@ static bool GetFirstHeader(FILE* inFile)
*outError = MP42Error(MP42LocalizedString(@"The audio could not be opened.", @"error message"), *outError = MP42Error(MP42LocalizedString(@"The audio could not be opened.", @"error message"),
MP42LocalizedString(@"Data in file doesn't appear to be valid audio.", @"error message"), 100); MP42LocalizedString(@"Data in file doesn't appear to be valid audio.", @"error message"), 100);
} }
[newTrack release];
return nil; return nil;
default: default:
break; break;
@@ -821,7 +818,6 @@ static bool GetFirstHeader(FILE* inFile)
free(pConfig); free(pConfig);
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
return self; return self;
@@ -872,7 +868,6 @@ static bool GetFirstHeader(FILE* inFile)
sample->trackId = trackId; sample->trackId = trackId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
sampleId++; sampleId++;
sampleSize = sizeof(sampleBuffer); sampleSize = sizeof(sampleBuffer);
@@ -892,10 +887,7 @@ static bool GetFirstHeader(FILE* inFile)
- (void) dealloc - (void) dealloc
{ {
[aacInfo release];
fclose(inFile); fclose(inFile);
[super dealloc];
} }
@end @end
-5
View File
@@ -332,7 +332,6 @@ static bool GetFirstHeader(FILE* inFile)
[newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue]]; [newTrack setDataLength:[[[[NSFileManager defaultManager] attributesOfItemAtPath:self.fileURL.path error:nil] valueForKey:NSFileSize] unsignedLongLongValue]];
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
return self; return self;
@@ -382,7 +381,6 @@ static bool GetFirstHeader(FILE* inFile)
sample->trackId = trackId; sample->trackId = trackId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
sampleId++; sampleId++;
@@ -403,10 +401,7 @@ static bool GetFirstHeader(FILE* inFile)
- (void) dealloc - (void) dealloc
{ {
[ac3Info release];
fclose(inFile); fclose(inFile);
[super dealloc];
} }
@end @end
+33 -50
View File
@@ -16,7 +16,6 @@
#import "mp4v2.h" #import "mp4v2.h"
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42FormatUtilites.h" #import "MP42FormatUtilites.h"
#import "MP42Track+Muxer.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
#import "MP42EditListsReconstructor.h" #import "MP42EditListsReconstructor.h"
@@ -29,6 +28,7 @@
MP42TrackId sourceID; MP42TrackId sourceID;
CMTimeScale timescale; CMTimeScale timescale;
CMTimeValue currentTime; CMTimeValue currentTime;
MP42CodecType format;
uint32_t done; uint32_t done;
@@ -39,12 +39,6 @@
@end @end
@implementation AVFDemuxHelper @implementation AVFDemuxHelper
- (void)dealloc {
[editsConstructor release];
[super dealloc];
}
@end @end
@implementation MP42AVFImporter { @implementation MP42AVFImporter {
@@ -62,7 +56,7 @@
- (FourCharCode)formatForTrack:(AVAssetTrack *)track { - (FourCharCode)formatForTrack:(AVAssetTrack *)track {
FourCharCode result = 0; FourCharCode result = 0;
CMFormatDescriptionRef formatDescription = (CMFormatDescriptionRef)track.formatDescriptions.firstObject; CMFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)track.formatDescriptions.firstObject;
if (formatDescription) { if (formatDescription) {
FourCharCode code = CMFormatDescriptionGetMediaSubType(formatDescription); FourCharCode code = CMFormatDescriptionGetMediaSubType(formatDescription);
@@ -89,7 +83,7 @@
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError { - (instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)outError {
if ((self = [super initWithURL:fileURL])) { if ((self = [super initWithURL:fileURL])) {
_localAsset = [[AVAsset assetWithURL:self.fileURL] retain]; _localAsset = [AVAsset assetWithURL:self.fileURL];
NSArray<AVAssetTrack *> *tracks = [_localAsset tracks]; NSArray<AVAssetTrack *> *tracks = [_localAsset tracks];
CMTime globaDuration = _localAsset.duration; CMTime globaDuration = _localAsset.duration;
@@ -118,7 +112,7 @@
// Retrieves the formatDescription // Retrieves the formatDescription
NSArray *formatDescriptions = track.formatDescriptions; NSArray *formatDescriptions = track.formatDescriptions;
CMFormatDescriptionRef formatDescription = (CMFormatDescriptionRef)formatDescriptions.firstObject; CMFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)formatDescriptions.firstObject;
if ([track.mediaType isEqualToString:AVMediaTypeVideo]) { if ([track.mediaType isEqualToString:AVMediaTypeVideo]) {
@@ -380,7 +374,6 @@
} }
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
[self convertMetadata]; [self convertMetadata];
@@ -423,7 +416,7 @@
[result appendString:name]; [result appendString:name];
} }
return [[result copy] autorelease]; return [result copy];
} }
- (MP42MetadataItem *)metadataItemWithValue:(id)value identifier:(NSString *)identifier - (MP42MetadataItem *)metadataItemWithValue:(id)value identifier:(NSString *)identifier
@@ -465,7 +458,7 @@
MP42MetadataKeyEncodingTool, AVMetadataCommonKeySoftware, MP42MetadataKeyEncodingTool, AVMetadataCommonKeySoftware,
nil]; nil];
self.metadata = [[[MP42Metadata alloc] init] autorelease]; self.metadata = [[MP42Metadata alloc] init];
for (NSString *commonKey in commonItemsDict.allKeys) { for (NSString *commonKey in commonItemsDict.allKeys) {
NSArray<AVMetadataItem *> *items = [AVMetadataItem metadataItemsFromArray:_localAsset.commonMetadata NSArray<AVMetadataItem *> *items = [AVMetadataItem metadataItemsFromArray:_localAsset.commonMetadata
@@ -488,8 +481,6 @@
NSImage *imageData = [[NSImage alloc] initWithData:artworkData]; NSImage *imageData = [[NSImage alloc] initWithData:artworkData];
MP42Image *image = [[MP42Image alloc] initWithImage:imageData]; MP42Image *image = [[MP42Image alloc] initWithImage:imageData];
[self.metadata addMetadataItem:[self metadataItemWithValue:image identifier:MP42MetadataKeyCoverArt]]; [self.metadata addMetadataItem:[self metadataItemWithValue:image identifier:MP42MetadataKeyCoverArt]];
[image release];
[imageData release];
} }
} }
@@ -692,7 +683,7 @@
// Prefer the asbd sample rate, naturalTimeScale might not be // Prefer the asbd sample rate, naturalTimeScale might not be
// the right one if we are reading for .ts // the right one if we are reading for .ts
if ([assetTrack.mediaType isEqualToString:AVMediaTypeAudio] && assetTrack.naturalTimeScale == 90000) { if ([assetTrack.mediaType isEqualToString:AVMediaTypeAudio] && assetTrack.naturalTimeScale == 90000) {
CMFormatDescriptionRef formatDescription = (CMFormatDescriptionRef)assetTrack.formatDescriptions.firstObject; CMFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)assetTrack.formatDescriptions.firstObject;
if (formatDescription) { if (formatDescription) {
const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription); const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription);
@@ -714,7 +705,7 @@
- (NSData *)magicCookieForTrack:(MP42Track *)track { - (NSData *)magicCookieForTrack:(MP42Track *)track {
AVAssetTrack *assetTrack = [_localAsset trackWithTrackID:track.sourceId]; AVAssetTrack *assetTrack = [_localAsset trackWithTrackID:track.sourceId];
CMFormatDescriptionRef formatDescription = (CMFormatDescriptionRef)assetTrack.formatDescriptions.firstObject; CMFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)assetTrack.formatDescriptions.firstObject;
if (formatDescription) { if (formatDescription) {
@@ -736,7 +727,7 @@
magicCookie = CFDictionaryGetValue(atoms, @"esds"); magicCookie = CFDictionaryGetValue(atoms, @"esds");
} }
return (NSData *)magicCookie; return (__bridge NSData *)magicCookie;
} else if ([assetTrack.mediaType isEqualToString:AVMediaTypeAudio]) { } else if ([assetTrack.mediaType isEqualToString:AVMediaTypeAudio]) {
@@ -849,7 +840,7 @@
[ac3Info appendBytes:&lfeon length:sizeof(uint64_t)]; [ac3Info appendBytes:&lfeon length:sizeof(uint64_t)];
[ac3Info appendBytes:&bit_rate_code length:sizeof(uint64_t)]; [ac3Info appendBytes:&bit_rate_code length:sizeof(uint64_t)];
return [ac3Info autorelease]; return ac3Info;
} else if (cookieSizeOut) { } else if (cookieSizeOut) {
return [NSData dataWithBytes:cookieBuffer length:cookieSizeOut]; return [NSData dataWithBytes:cookieBuffer length:cookieSizeOut];
@@ -864,7 +855,7 @@
CFDictionaryRef atoms = CFDictionaryGetValue(extentions, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms); CFDictionaryRef atoms = CFDictionaryGetValue(extentions, kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms);
CFDataRef magicCookie = CFDictionaryGetValue(atoms, @"vttC"); CFDataRef magicCookie = CFDictionaryGetValue(atoms, @"vttC");
return (NSData *)magicCookie; return (__bridge NSData *)magicCookie;
} }
} }
@@ -878,7 +869,7 @@
bzero(&result, sizeof(AudioStreamBasicDescription)); bzero(&result, sizeof(AudioStreamBasicDescription));
AVAssetTrack *assetTrack = [_localAsset trackWithTrackID:track.sourceId]; AVAssetTrack *assetTrack = [_localAsset trackWithTrackID:track.sourceId];
CMFormatDescriptionRef formatDescription = (CMFormatDescriptionRef)assetTrack.formatDescriptions.firstObject; CMFormatDescriptionRef formatDescription = (__bridge CMFormatDescriptionRef)assetTrack.formatDescriptions.firstObject;
if (formatDescription) { if (formatDescription) {
const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription); const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription);
@@ -894,20 +885,25 @@
} }
- (void)demux { - (void)demux {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @autoreleasepool {
NSError *localError;
BOOL success = YES; BOOL success = YES;
OSStatus err = noErr; OSStatus err = noErr;
CMTimeValue currentTime = 1;
uint64_t currentDataLength = 0; uint64_t currentDataLength = 0;
uint64_t totalDataLength = 0; uint64_t totalDataLength = 0;
AVFDemuxHelper *demuxHelper = nil; NSInteger tracksDone = 0;
NSError *localError; NSInteger tracksNumber = self.inputTracks.count;
AVAssetReader *assetReader = [[AVAssetReader alloc] initWithAsset:_localAsset error:&localError]; AVAssetReader *assetReader = [[AVAssetReader alloc] initWithAsset:_localAsset error:&localError];
AVFDemuxHelper * helpers[tracksNumber];
success = (assetReader != nil); success = (assetReader != nil);
if (success) { if (success) {
NSUInteger index = 0;
for (MP42Track *track in self.inputTracks) { for (MP42Track *track in self.inputTracks) {
AVAssetReaderOutput *assetReaderOutput = [AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:[_localAsset trackWithTrackID:track.sourceId] AVAssetReaderOutput *assetReaderOutput = [AVAssetReaderTrackOutput assetReaderTrackOutputWithTrack:[_localAsset trackWithTrackID:track.sourceId]
outputSettings:nil]; outputSettings:nil];
@@ -920,13 +916,17 @@
NSLog(@"Unable to add the output to assetReader!"); NSLog(@"Unable to add the output to assetReader!");
} }
track.muxer_helper->demuxer_context = [[AVFDemuxHelper alloc] init]; AVFDemuxHelper *demuxHelper = [[AVFDemuxHelper alloc] init];
demuxHelper = track.muxer_helper->demuxer_context;
demuxHelper->sourceID = track.sourceId; demuxHelper->sourceID = track.sourceId;
demuxHelper->timescale = [self timescaleForTrack:track]; demuxHelper->timescale = [self timescaleForTrack:track];
demuxHelper->format = track.format;
demuxHelper->assetReaderOutput = assetReaderOutput; demuxHelper->assetReaderOutput = assetReaderOutput;
demuxHelper->editsConstructor = [[MP42EditListsReconstructor alloc] init]; demuxHelper->editsConstructor = [[MP42EditListsReconstructor alloc] init];
track.demuxerHelper = demuxHelper;
helpers[index] = demuxHelper;
index += 1;
totalDataLength += track.dataLength; totalDataLength += track.dataLength;
} }
} }
@@ -935,25 +935,17 @@
if (!success) { if (!success) {
localError = [assetReader error]; localError = [assetReader error];
[assetReader release];
[self setDone]; [self setDone];
[pool release];
return; return;
} }
CMTimeValue currentTime = 1;
NSInteger tracksNumber = self.inputTracks.count;
NSInteger tracksDone = 0;
while (tracksDone != tracksNumber) { while (tracksDone != tracksNumber) {
if (self.isCancelled) { if (self.isCancelled) {
break; break;
} }
for (MP42Track *track in self.inputTracks) { for (NSUInteger index = 0; index < tracksNumber; index += 1) {
demuxHelper = track.muxer_helper->demuxer_context; AVFDemuxHelper *demuxHelper = helpers[index];
AVAssetReaderOutput *assetReaderOutput = demuxHelper->assetReaderOutput; AVAssetReaderOutput *assetReaderOutput = demuxHelper->assetReaderOutput;
while (demuxHelper->currentTime < demuxHelper->timescale * currentTime && !demuxHelper->done) { while (demuxHelper->currentTime < demuxHelper->timescale * currentTime && !demuxHelper->done) {
@@ -975,7 +967,7 @@
BOOL doNotDisplay = NO; BOOL doNotDisplay = NO;
CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, NO); CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, NO);
if (attachmentsArray) { if (attachmentsArray) {
for (NSDictionary *dict in (NSArray *)attachmentsArray) { for (NSDictionary *dict in (__bridge NSArray *)attachmentsArray) {
if (dict[(NSString *)kCMSampleAttachmentKey_NotSync]) { if (dict[(NSString *)kCMSampleAttachmentKey_NotSync]) {
sync = 0; sync = 0;
} }
@@ -993,7 +985,7 @@
// We have only a sample // We have only a sample
// or the format is PCM, if so send only a single buffer to improve performance // or the format is PCM, if so send only a single buffer to improve performance
if (samplesNum == 1 || (samplesNum > 1 && track.format == kMP42AudioCodecType_LinearPCM)) { if (samplesNum == 1 || (samplesNum > 1 && demuxHelper->format == kMP42AudioCodecType_LinearPCM)) {
void *sampleData = malloc(bufferSize); void *sampleData = malloc(bufferSize);
CMBlockBufferCopyDataBytes(buffer, 0, bufferSize, sampleData); CMBlockBufferCopyDataBytes(buffer, 0, bufferSize, sampleData);
@@ -1015,7 +1007,6 @@
[demuxHelper->editsConstructor addSample:sample]; [demuxHelper->editsConstructor addSample:sample];
[self enqueue:sample]; [self enqueue:sample];
[sample release];
currentDataLength += bufferSize; currentDataLength += bufferSize;
demuxHelper->currentTime = currentOutputTimeStamp.value; demuxHelper->currentTime = currentOutputTimeStamp.value;
@@ -1141,7 +1132,6 @@
[demuxHelper->editsConstructor addSample:sample]; [demuxHelper->editsConstructor addSample:sample];
[self enqueue:sample]; [self enqueue:sample];
[sample release];
currentOutputTimeStamp.value = currentOutputTimeStamp.value + sampleTimingInfo.duration.value; currentOutputTimeStamp.value = currentOutputTimeStamp.value + sampleTimingInfo.duration.value;
currentDataLength += sampleSize; currentDataLength += sampleSize;
@@ -1172,7 +1162,6 @@
[demuxHelper->editsConstructor addSample:sample]; [demuxHelper->editsConstructor addSample:sample];
demuxHelper->currentTime = currentOutputTimeStamp.value; demuxHelper->currentTime = currentOutputTimeStamp.value;
[sample release];
} }
CFRelease(sampleBuffer); CFRelease(sampleBuffer);
@@ -1188,9 +1177,8 @@
currentTime += 1; currentTime += 1;
} }
[assetReader release];
[self setDone]; [self setDone];
[pool release]; }
} }
- (BOOL)cleanUp:(MP4FileHandle)fileHandle { - (BOOL)cleanUp:(MP4FileHandle)fileHandle {
@@ -1202,7 +1190,7 @@
MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId]; MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId];
AVFDemuxHelper *helper = inputTrack.muxer_helper->demuxer_context; AVFDemuxHelper *helper = inputTrack.demuxerHelper;
MP42EditListsReconstructor *editsConstructor = helper->editsConstructor; MP42EditListsReconstructor *editsConstructor = helper->editsConstructor;
// Make sure the sample offsets are all positive. // Make sure the sample offsets are all positive.
@@ -1244,9 +1232,4 @@
return @"AVFoundation demuxer"; return @"AVFoundation demuxer";
} }
- (void) dealloc {
[_localAsset release];
[super dealloc];
}
@end @end
+5 -11
View File
@@ -15,7 +15,8 @@
#import "MP42AudioEncoder.h" #import "MP42AudioEncoder.h"
#import "MP42AC3AudioEncoder.h" #import "MP42AC3AudioEncoder.h"
#import "MP42Track+Muxer.h" #import "MP42Track+Private.h"
#import "MP42FileImporter.h"
#import "MP42FileImporter+Private.h" #import "MP42FileImporter+Private.h"
#import <CoreAudio/CoreAudio.h> #import <CoreAudio/CoreAudio.h>
@@ -36,7 +37,7 @@
self = [super init]; self = [super init];
if (self) { if (self) {
NSData *magicCookie = [track.muxer_helper->importer magicCookieForTrack:track]; NSData *magicCookie = [track.importer magicCookieForTrack:track];
AudioStreamBasicDescription asbd = [self basicDescriptorForTrack:track]; AudioStreamBasicDescription asbd = [self basicDescriptorForTrack:track];
UInt32 initialPadding = [self initialPaddingForTrack:track]; UInt32 initialPadding = [self initialPaddingForTrack:track];
UInt32 channelLayoutSize = sizeof(AudioChannelLayout); UInt32 channelLayoutSize = sizeof(AudioChannelLayout);
@@ -103,11 +104,11 @@
{ {
AudioStreamBasicDescription asbd; AudioStreamBasicDescription asbd;
bzero(&asbd, sizeof(AudioStreamBasicDescription)); bzero(&asbd, sizeof(AudioStreamBasicDescription));
asbd.mSampleRate = [track.muxer_helper->importer timescaleForTrack:track];; asbd.mSampleRate = [track.importer timescaleForTrack:track];;
asbd.mChannelsPerFrame = track.channels; asbd.mChannelsPerFrame = track.channels;
if (track.format == kMP42AudioCodecType_LinearPCM) { if (track.format == kMP42AudioCodecType_LinearPCM) {
AudioStreamBasicDescription temp = [track.muxer_helper->importer audioDescriptionForTrack:track]; AudioStreamBasicDescription temp = [track.importer audioDescriptionForTrack:track];
if (temp.mFormatID) { if (temp.mFormatID) {
asbd = temp; asbd = temp;
} }
@@ -144,11 +145,4 @@
return sampleRate; return sampleRate;
} }
- (void)dealloc {
[_decoder release];
[_encoder release];
[super dealloc];
}
@end @end
+3
View File
@@ -345,6 +345,7 @@ static void configureDescriptors(MP42DecodeContext *context, AVFrame *frame)
// Get real channels number and layout // Get real channels number and layout
int nb_channels = av_get_channel_layout_nb_channels(frame->channel_layout); int nb_channels = av_get_channel_layout_nb_channels(frame->channel_layout);
int sample_rate = frame->sample_rate; int sample_rate = frame->sample_rate;
int container_sample_rate = context->inputFormat->mSampleRate;
// Reset the channels per frame and sample rate // Reset the channels per frame and sample rate
if (context->inputFormat->mChannelsPerFrame == context->outputFormat->mChannelsPerFrame) { if (context->inputFormat->mChannelsPerFrame == context->outputFormat->mChannelsPerFrame) {
@@ -357,7 +358,9 @@ static void configureDescriptors(MP42DecodeContext *context, AVFrame *frame)
sample_rate = 48000; sample_rate = 48000;
} }
if (sample_rate < container_sample_rate) {
context->outputFormat->mSampleRate = sample_rate; context->outputFormat->mSampleRate = sample_rate;
}
context->outputFormat->mBytesPerPacket = 4 * context->outputFormat->mChannelsPerFrame; context->outputFormat->mBytesPerPacket = 4 * context->outputFormat->mChannelsPerFrame;
context->outputFormat->mBytesPerFrame = context->outputFormat->mBytesPerPacket * context->outputFormat->mFramesPerPacket; context->outputFormat->mBytesPerFrame = context->outputFormat->mBytesPerPacket * context->outputFormat->mFramesPerPacket;
+6 -37
View File
@@ -11,11 +11,13 @@
#import "MP42FileImporter.h" #import "MP42FileImporter.h"
#import "MP42FileImporter+Private.h" #import "MP42FileImporter+Private.h"
#import "MP42Track.h"
#import "MP42Track+Private.h"
#import "MP42Fifo.h"
#import "MP42Sample.h" #import "MP42Sample.h"
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42Track+Muxer.h"
#import "MP42SubtitleTrack.h" #import "MP42SubtitleTrack.h"
#import "MP42OCRWrapper.h" #import "MP42OCRWrapper.h"
@@ -56,8 +58,8 @@
- (CIContext *)imgContext { - (CIContext *)imgContext {
if (!_imgContext) { if (!_imgContext) {
_imgContext = [[CIContext contextWithCGContext:[[NSGraphicsContext currentContext] graphicsPort] _imgContext = [CIContext contextWithCGContext:[[NSGraphicsContext currentContext] graphicsPort]
options:nil] retain]; options:nil];
} }
return _imgContext; return _imgContext;
} }
@@ -106,7 +108,6 @@
if (sampleBuffer->flags & MP42SampleBufferFlagEndOfFile) { if (sampleBuffer->flags & MP42SampleBufferFlagEndOfFile) {
[_outputSamplesBuffer enqueue:sampleBuffer]; [_outputSamplesBuffer enqueue:sampleBuffer];
[sampleBuffer release];
break; break;
} }
@@ -118,9 +119,6 @@
MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO); MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO);
[_outputSamplesBuffer enqueue:subSample]; [_outputSamplesBuffer enqueue:subSample];
[subSample release];
[sampleBuffer release];
continue; continue;
} }
@@ -156,9 +154,6 @@
MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO); MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO);
[_outputSamplesBuffer enqueue:subSample]; [_outputSamplesBuffer enqueue:subSample];
[subSample release];
[sampleBuffer release];
continue; continue;
} }
@@ -243,7 +238,6 @@
} }
[_outputSamplesBuffer enqueue:subSample]; [_outputSamplesBuffer enqueue:subSample];
[subSample release];
CGImageRelease(cgImage); CGImageRelease(cgImage);
CGImageRelease(filteredCGImage); CGImageRelease(filteredCGImage);
@@ -255,8 +249,6 @@
avsubtitle_free(&subtitle); avsubtitle_free(&subtitle);
av_packet_unref(&pkt); av_packet_unref(&pkt);
[sampleBuffer release];
} }
} }
dispatch_semaphore_signal(_done); dispatch_semaphore_signal(_done);
@@ -273,8 +265,6 @@
if (sampleBuffer->flags & MP42SampleBufferFlagEndOfFile) { if (sampleBuffer->flags & MP42SampleBufferFlagEndOfFile) {
[_outputSamplesBuffer enqueue:sampleBuffer]; [_outputSamplesBuffer enqueue:sampleBuffer];
[sampleBuffer release];
break; break;
} }
@@ -291,9 +281,6 @@
MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO); MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO);
[_outputSamplesBuffer enqueue:subSample]; [_outputSamplesBuffer enqueue:subSample];
[subSample release];
[sampleBuffer release];
continue; continue;
} }
@@ -306,7 +293,6 @@
if (rect->w == 0 || rect->h == 0) { if (rect->w == 0 || rect->h == 0) {
MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO); MP42SampleBuffer *subSample = copyEmptySubtitleSample(sampleBuffer->trackId, sampleBuffer->duration, NO);
[_outputSamplesBuffer enqueue:subSample]; [_outputSamplesBuffer enqueue:subSample];
[subSample release];
continue; continue;
} }
@@ -377,12 +363,9 @@
} }
[_outputSamplesBuffer enqueue:subSample]; [_outputSamplesBuffer enqueue:subSample];
[subSample release];
avsubtitle_free(&subtitle); avsubtitle_free(&subtitle);
av_packet_unref(&pkt); av_packet_unref(&pkt);
[sampleBuffer release];
} }
} }
dispatch_semaphore_signal(_done); dispatch_semaphore_signal(_done);
@@ -408,11 +391,9 @@
if (avcodec_open2(avContext, avCodec, NULL)) { if (avcodec_open2(avContext, avCodec, NULL)) {
NSLog(@"Error opening subtitle decoder"); NSLog(@"Error opening subtitle decoder");
av_freep(&avContext); av_freep(&avContext);
[self release];
return nil; return nil;
} }
} else { } else {
[self release];
return nil; return nil;
} }
@@ -420,7 +401,7 @@
_inputSamplesBuffer = [[MP42Fifo alloc] initWithCapacity:20]; _inputSamplesBuffer = [[MP42Fifo alloc] initWithCapacity:20];
_done = dispatch_semaphore_create(0); _done = dispatch_semaphore_create(0);
srcMagicCookie = [[track.muxer_helper->importer magicCookieForTrack:track] retain]; srcMagicCookie = [track.importer magicCookieForTrack:track];
_ocr = [[MP42OCRWrapper alloc] initWithLanguage:track.language]; _ocr = [[MP42OCRWrapper alloc] initWithLanguage:track.language];
@@ -468,18 +449,6 @@
if (codecData) { if (codecData) {
av_freep(&codecData); av_freep(&codecData);
} }
[srcMagicCookie release];
[_outputSamplesBuffer release];
[_inputSamplesBuffer release];
[decoderThread release];
[_ocr release];
[_imgContext release];
dispatch_release(_done);
[super dealloc];
} }
@end @end
-5
View File
@@ -31,7 +31,6 @@
newTrack.URL = self.fileURL; newTrack.URL = self.fileURL;
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
return self; return self;
@@ -155,7 +154,6 @@ static int ParseByte(const char *string, UInt8 *byte, Boolean hex)
sample.title = [lineArray lastObject]; sample.title = [lineArray lastObject];
[sampleArray addObject:sample]; [sampleArray addObject:sample];
[sample release];
} }
for (MP42TextSample *ccSample in sampleArray) { for (MP42TextSample *ccSample in sampleArray) {
@@ -203,7 +201,6 @@ static int ParseByte(const char *string, UInt8 *byte, Boolean hex)
sample->trackId = trackId; sample->trackId = trackId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
frameDrop += ccSample.timestamp; frameDrop += ccSample.timestamp;
minutesDrop += frameDrop; minutesDrop += frameDrop;
@@ -239,13 +236,11 @@ static int ParseByte(const char *string, UInt8 *byte, Boolean hex)
sample->trackId = trackId; sample->trackId = trackId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
i++; i++;
self.progress = ((CGFloat)i / sampleArray.count) * 100; self.progress = ((CGFloat)i / sampleArray.count) * 100;
} }
[sampleArray release];
[self setDone]; [self setDone];
} }
} }
+13 -40
View File
@@ -8,6 +8,7 @@
#import "MP42MkvImporter.h" #import "MP42MkvImporter.h"
#import "MP42FileImporter+Private.h" #import "MP42FileImporter+Private.h"
#import "MP42Sample.h"
#import "MP42File.h" #import "MP42File.h"
#import "MP42SubUtilities.h" #import "MP42SubUtilities.h"
@@ -19,7 +20,6 @@
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42FormatUtilites.h" #import "MP42FormatUtilites.h"
#import "MP42Track+Muxer.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
#define SCALE_FACTOR 1000000.f #define SCALE_FACTOR 1000000.f
@@ -62,12 +62,6 @@
return self; return self;
} }
- (void)dealloc {
[queue release]; queue = nil;
[ss release]; ss = nil;
[super dealloc];
}
@end @end
static int readData(struct StdIoStream *ioStream, uint64_t pos, uint8_t **data, uint32_t dataSize) static int readData(struct StdIoStream *ioStream, uint64_t pos, uint8_t **data, uint32_t dataSize)
@@ -213,8 +207,6 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
*outError = MP42Error(MP42LocalizedString(@"The movie could not be opened.", @"mkv error message"), *outError = MP42Error(MP42LocalizedString(@"The movie could not be opened.", @"mkv error message"),
MP42LocalizedString(@"The file is not a matroska file.", @"mkv error message"), 100); MP42LocalizedString(@"The file is not a matroska file.", @"mkv error message"), 100);
} }
[self release];
return nil; return nil;
} }
@@ -350,7 +342,6 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
newTrack.language = [MP42Languages.defaultManager extendedTagForISO_639_2b:@(mkvTrack->Language)]; newTrack.language = [MP42Languages.defaultManager extendedTagForISO_639_2b:@(mkvTrack->Language)];
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
} }
@@ -382,7 +373,6 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
} }
} }
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
self.metadata = [self readMatroskaMetadata]; self.metadata = [self readMatroskaMetadata];
@@ -402,7 +392,7 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
- (MP42Metadata *)readMatroskaMetadata - (MP42Metadata *)readMatroskaMetadata
{ {
MP42Metadata *mkvMetadata = [[[MP42Metadata alloc] init] autorelease]; MP42Metadata *mkvMetadata = [[MP42Metadata alloc] init];
SegmentInfo *segInfo = mkv_GetFileInfo(_matroskaFile); SegmentInfo *segInfo = mkv_GetFileInfo(_matroskaFile);
if (segInfo->Title) { if (segInfo->Title) {
@@ -467,8 +457,6 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui
MP42Image *image = [[MP42Image alloc] initWithBytes:data length:attachment->Length type:type]; MP42Image *image = [[MP42Image alloc] initWithBytes:data length:attachment->Length type:type];
[self addMetadataItem:image identifier:MP42MetadataKeyCoverArt metadata:mkvMetadata]; [self addMetadataItem:image identifier:MP42MetadataKeyCoverArt metadata:mkvMetadata];
[image release];
} }
free(data); free(data);
@@ -655,7 +643,7 @@ static NSString * TrackNameToString(TrackInfo *track)
aac[1] = 0x90; aac[1] = 0x90;
[magicCookie appendBytes:aac length:2]; [magicCookie appendBytes:aac length:2];
return [magicCookie autorelease]; return magicCookie;
} }
else if (!strcmp(trackInfo->CodecID, "A_AC3") || !strcmp(trackInfo->CodecID, "A_EAC3")) { else if (!strcmp(trackInfo->CodecID, "A_AC3") || !strcmp(trackInfo->CodecID, "A_EAC3")) {
mkv_SetTrackMask(_matroskaFile, ~(1l << track.sourceId)); mkv_SetTrackMask(_matroskaFile, ~(1l << track.sourceId));
@@ -727,14 +715,14 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
if (context) { if (context) {
magicCookie = (NSData *)createCookie_EAC3(context); magicCookie = (__bridge NSData *)createCookie_EAC3(context);
free(context); free(context);
} }
} }
mkv_Seek(_matroskaFile, 0, 0); mkv_Seek(_matroskaFile, 0, 0);
return [magicCookie autorelease]; return magicCookie;
} }
else if (!strcmp(trackInfo->CodecID, "S_VOBSUB")) { else if (!strcmp(trackInfo->CodecID, "S_VOBSUB")) {
char *string = (char *) trackInfo->CodecPrivate; char *string = (char *) trackInfo->CodecPrivate;
@@ -794,8 +782,7 @@ static NSString * TrackNameToString(TrackInfo *track)
// Methods to extract all the samples from the active tracks at the same time // Methods to extract all the samples from the active tracks at the same time
- (void)demux - (void)demux
{ {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @autoreleasepool {
uint64_t StartTime, EndTime, FilePos; uint64_t StartTime, EndTime, FilePos;
uint32_t Track, FrameSize, FrameFlags; uint32_t Track, FrameSize, FrameFlags;
uint8_t *frame = NULL; uint8_t *frame = NULL;
@@ -813,21 +800,19 @@ static NSString * TrackNameToString(TrackInfo *track)
for (MP42Track *track in inputTracks) { for (MP42Track *track in inputTracks) {
TrackMask &= ~(1l << track.sourceId); TrackMask &= ~(1l << track.sourceId);
track.muxer_helper->demuxer_context = [[MatroskaDemuxHelper alloc] init]; track.demuxerHelper = [[MatroskaDemuxHelper alloc] init];
} }
mkv_SetTrackMask(_matroskaFile, TrackMask); mkv_SetTrackMask(_matroskaFile, TrackMask);
while (!mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &FrameFlags) && !self.isCancelled) { while (!mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &FrameFlags) && !self.isCancelled) {
self.progress = (StartTime / _fileDuration / 10000); self.progress = (StartTime / _fileDuration / 10000);
muxer_helper *helper = NULL;
MP42Track *track = nil; MP42Track *track = nil;
for (MP42Track *fTrack in inputTracks){ for (MP42Track *fTrack in inputTracks){
if (fTrack.sourceId == Track) { if (fTrack.sourceId == Track) {
helper = fTrack.muxer_helper; demuxHelper = fTrack.demuxerHelper;
demuxHelper = helper->demuxer_context;
track = fTrack; track = fTrack;
} }
} }
@@ -889,7 +874,6 @@ static NSString * TrackNameToString(TrackInfo *track)
demuxHelper->currentTime = sample->decodeTimestamp * (double)mkv_TruncFloat(trackInfo->AV.Audio.SamplingFreq) / 1000000000.f; demuxHelper->currentTime = sample->decodeTimestamp * (double)mkv_TruncFloat(trackInfo->AV.Audio.SamplingFreq) / 1000000000.f;
} }
[demuxHelper->previousSample release];
demuxHelper->previousSample = sample; demuxHelper->previousSample = sample;
#else #else
[self enqueue:sample]; [self enqueue:sample];
@@ -908,14 +892,14 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
} }
NSString *string = [[[NSString alloc] initWithBytes:frame length:FrameSize encoding:NSUTF8StringEncoding] autorelease]; NSString *string = [[NSString alloc] initWithBytes:frame length:FrameSize encoding:NSUTF8StringEncoding];
if (!strcmp(trackInfo->CodecID, "S_TEXT/ASS") || !strcmp(trackInfo->CodecID, "S_TEXT/SSA")) { if (!strcmp(trackInfo->CodecID, "S_TEXT/ASS") || !strcmp(trackInfo->CodecID, "S_TEXT/SSA")) {
string = StripSSALine(string); string = StripSSALine(string);
} }
if ([string length]) { if ([string length]) {
SBSubLine *sl = [[SBSubLine alloc] initWithLine:string start:StartTime / SCALE_FACTOR end:EndTime / SCALE_FACTOR]; SBSubLine *sl = [[SBSubLine alloc] initWithLine:string start:StartTime / SCALE_FACTOR end:EndTime / SCALE_FACTOR];
[demuxHelper->ss addLine:[sl autorelease]]; [demuxHelper->ss addLine:sl];
} }
demuxHelper->samplesWritten++; demuxHelper->samplesWritten++;
free(frame); free(frame);
@@ -951,7 +935,6 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
[self enqueue:demuxHelper->previousSample]; [self enqueue:demuxHelper->previousSample];
[demuxHelper->previousSample release];
demuxHelper->previousSample = nextSample; demuxHelper->previousSample = nextSample;
demuxHelper->samplesWritten++; demuxHelper->samplesWritten++;
@@ -966,13 +949,11 @@ static NSString * TrackNameToString(TrackInfo *track)
sample->trackId = track.sourceId; sample->trackId = track.sourceId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
} }
nextSample->duration = (EndTime - StartTime) / SCALE_FACTOR; nextSample->duration = (EndTime - StartTime) / SCALE_FACTOR;
[self enqueue:nextSample]; [self enqueue:nextSample];
[nextSample release];
demuxHelper->currentTime = EndTime; demuxHelper->currentTime = EndTime;
} }
@@ -990,7 +971,6 @@ static NSString * TrackNameToString(TrackInfo *track)
frameSample->frameSize = FrameSize; frameSample->frameSize = FrameSize;
frameSample->frameFlags = FrameFlags; frameSample->frameFlags = FrameFlags;
[demuxHelper->queue addObject:frameSample]; [demuxHelper->queue addObject:frameSample];
[frameSample release];
if ([demuxHelper->queue count] < bufferSize) { if ([demuxHelper->queue count] < bufferSize) {
continue; continue;
@@ -1044,7 +1024,6 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
[self enqueue:sample]; [self enqueue:sample];
[sample release];
} }
else { else {
continue; continue;
@@ -1054,8 +1033,7 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
for (MP42Track *track in inputTracks) { for (MP42Track *track in inputTracks) {
muxer_helper *helper = track.muxer_helper; demuxHelper = track.demuxerHelper;
demuxHelper = helper->demuxer_context;
if (demuxHelper->queue) { if (demuxHelper->queue) {
TrackInfo *trackInfo = mkv_GetTrackInfo(_matroskaFile, [track sourceId]); TrackInfo *trackInfo = mkv_GetTrackInfo(_matroskaFile, [track sourceId]);
@@ -1071,7 +1049,6 @@ static NSString * TrackNameToString(TrackInfo *track)
frameSample = [[MatroskaSample alloc] init]; frameSample = [[MatroskaSample alloc] init];
frameSample->startTime = lastSample->endTime; frameSample->startTime = lastSample->endTime;
[demuxHelper->queue addObject:frameSample]; [demuxHelper->queue addObject:frameSample];
[frameSample release];
} }
currentSample = [demuxHelper->queue objectAtIndex:demuxHelper->buffer]; currentSample = [demuxHelper->queue objectAtIndex:demuxHelper->buffer];
@@ -1115,7 +1092,6 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
[self enqueue:sample]; [self enqueue:sample];
[sample release];
demuxHelper->bufferFlush++; demuxHelper->bufferFlush++;
if (demuxHelper->bufferFlush >= bufferSize - 1) { if (demuxHelper->bufferFlush >= bufferSize - 1) {
@@ -1153,7 +1129,6 @@ static NSString * TrackNameToString(TrackInfo *track)
sample->decodeTimestamp = demuxHelper->currentTime; sample->decodeTimestamp = demuxHelper->currentTime;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
demuxHelper->samplesWritten++; demuxHelper->samplesWritten++;
} }
@@ -1165,13 +1140,12 @@ static NSString * TrackNameToString(TrackInfo *track)
} }
[self enqueue:demuxHelper->previousSample]; [self enqueue:demuxHelper->previousSample];
[demuxHelper->previousSample release];
demuxHelper->previousSample = nil; demuxHelper->previousSample = nil;
} }
} }
[self setDone]; [self setDone];
[pool release]; }
} }
- (BOOL)cleanUp:(MP4FileHandle)fileHandle - (BOOL)cleanUp:(MP4FileHandle)fileHandle
@@ -1179,7 +1153,7 @@ static NSString * TrackNameToString(TrackInfo *track)
for (MP42Track *track in self.outputsTracks) { for (MP42Track *track in self.outputsTracks) {
MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId]; MP42Track *inputTrack = [self inputTrackWithTrackID:track.sourceId];
MatroskaDemuxHelper *demuxHelper = inputTrack.muxer_helper->demuxer_context; MatroskaDemuxHelper *demuxHelper = inputTrack.demuxerHelper;
MP4TrackId trackId = track.trackId; MP4TrackId trackId = track.trackId;
if (demuxHelper->minDisplayOffset != 0) { if (demuxHelper->minDisplayOffset != 0) {
@@ -1238,7 +1212,6 @@ static NSString * TrackNameToString(TrackInfo *track)
- (void)dealloc - (void)dealloc
{ {
closeMatroskaFile(_matroskaFile, _ioStream); closeMatroskaFile(_matroskaFile, _ioStream);
[super dealloc];
} }
@end @end
+18 -26
View File
@@ -15,11 +15,9 @@
#import "mp4v2.h" #import "mp4v2.h"
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42Track+Muxer.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
@interface MP4DemuxHelper : NSObject { typedef struct MP4DemuxHelper {
@public
MP4TrackId sourceID; MP4TrackId sourceID;
MP4SampleId currentSampleId; MP4SampleId currentSampleId;
@@ -28,11 +26,7 @@
uint64_t timeScale; uint64_t timeScale;
uint32_t done; uint32_t done;
} } MP4DemuxHelper;
@end
@implementation MP4DemuxHelper
@end
@implementation MP42Mp4Importer { @implementation MP42Mp4Importer {
@private @private
@@ -49,14 +43,11 @@
MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL error:outError]; MP42File *sourceFile = [[MP42File alloc] initWithURL:self.fileURL error:outError];
if (!sourceFile) { if (!sourceFile) {
[self release];
return nil; return nil;
} }
[self addTracks:sourceFile.tracks]; [self addTracks:sourceFile.tracks];
self.metadata = sourceFile.metadata; self.metadata = sourceFile.metadata;
[sourceFile release];
} }
return self; return self;
@@ -110,8 +101,7 @@
[ac3Info appendBytes:&lfeon length:sizeof(uint64_t)]; [ac3Info appendBytes:&lfeon length:sizeof(uint64_t)];
[ac3Info appendBytes:&bit_rate_code length:sizeof(uint64_t)]; [ac3Info appendBytes:&bit_rate_code length:sizeof(uint64_t)];
return [ac3Info autorelease]; return ac3Info;
} }
else if (!strcmp(media_data_name, "ec-3")) { else if (!strcmp(media_data_name, "ec-3")) {
if (MP4HaveTrackAtom(_fileHandle, srcTrackId, "mdia.minf.stbl.stsd.ec-3.dec3")) { if (MP4HaveTrackAtom(_fileHandle, srcTrackId, "mdia.minf.stbl.stsd.ec-3.dec3")) {
@@ -161,7 +151,7 @@
if (!strcmp(media_data_name, "avc1")) { if (!strcmp(media_data_name, "avc1")) {
// Extract and rewrite some kind of avcC extradata from the mp4 file. // Extract and rewrite some kind of avcC extradata from the mp4 file.
NSMutableData *avcCData = [[[NSMutableData alloc] init] autorelease]; NSMutableData *avcCData = [[NSMutableData alloc] init];
uint8_t configurationVersion = 1; uint8_t configurationVersion = 1;
uint8_t AVCProfileIndication; uint8_t AVCProfileIndication;
@@ -227,10 +217,8 @@
free(pictheadersize); free(pictheadersize);
magicCookie = [avcCData copy]; magicCookie = [avcCData copy];
[seqData release];
[pictData release];
return [magicCookie autorelease]; return magicCookie;
} }
else if (!strcmp(media_data_name, "hev1")) { else if (!strcmp(media_data_name, "hev1")) {
uint8_t *ppValue; uint8_t *ppValue;
@@ -287,19 +275,23 @@
NSInteger tracksNumber = inputTracks.count; NSInteger tracksNumber = inputTracks.count;
NSInteger tracksDone = 0; NSInteger tracksDone = 0;
MP4DemuxHelper *demuxHelper;
if (!_fileHandle) { if (!_fileHandle) {
return; return;
} }
MP4DemuxHelper * helpers[tracksNumber];
NSUInteger index = 0;
for (MP42Track *track in inputTracks) { for (MP42Track *track in inputTracks) {
track.muxer_helper->demuxer_context = [[MP4DemuxHelper alloc] init]; MP4DemuxHelper *demuxHelper = malloc(sizeof(MP4DemuxHelper));
demuxHelper = track.muxer_helper->demuxer_context;
demuxHelper->sourceID = track.sourceId; demuxHelper->sourceID = track.sourceId;
demuxHelper->totalSampleNumber = MP4GetTrackNumberOfSamples(_fileHandle, track.sourceId); demuxHelper->totalSampleNumber = MP4GetTrackNumberOfSamples(_fileHandle, track.sourceId);
demuxHelper->timeScale = MP4GetTrackTimeScale(_fileHandle, track.sourceId); demuxHelper->timeScale = MP4GetTrackTimeScale(_fileHandle, track.sourceId);
demuxHelper->done = 0; demuxHelper->done = 0;
helpers[index] = demuxHelper;
index += 1;
} }
MP4Timestamp currentTime = 1; MP4Timestamp currentTime = 1;
@@ -311,9 +303,8 @@
break; break;
} }
for (MP42Track *track in inputTracks) { for (NSUInteger index = 0; index < tracksNumber; index += 1) {
muxer_helper *helper = track.muxer_helper; MP4DemuxHelper *demuxHelper = helpers[index];
demuxHelper = helper->demuxer_context;
if (self.isCancelled) { if (self.isCancelled) {
break; break;
@@ -355,7 +346,6 @@
sample->trackId = demuxHelper->sourceID; sample->trackId = demuxHelper->sourceID;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
demuxHelper->currentTime = pStartTime; demuxHelper->currentTime = pStartTime;
} }
@@ -366,6 +356,10 @@
} }
[self setDone]; [self setDone];
for (NSUInteger index = 0; index < tracksNumber; index += 1) {
free(helpers[index]);
}
} }
} }
@@ -417,8 +411,6 @@
if (_fileHandle) { if (_fileHandle) {
MP4Close(_fileHandle, 0); MP4Close(_fileHandle, 0);
} }
[super dealloc];
} }
@end @end
+1 -15
View File
@@ -15,7 +15,6 @@
#import "mp4v2.h" #import "mp4v2.h"
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42Track+Muxer.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
@implementation MP42SrtImporter { @implementation MP42SrtImporter {
@@ -39,7 +38,7 @@
newTrack.format = kMP42SubtitleCodecType_3GText; newTrack.format = kMP42SubtitleCodecType_3GText;
newTrack.URL = self.fileURL; newTrack.URL = self.fileURL;
newTrack.alternateGroup = 2; newTrack.alternateGroup = 2;
newTrack.language = getFilenameLanguage((CFStringRef)self.fileURL.path); newTrack.language = getFilenameLanguage((__bridge CFStringRef)self.fileURL.path);
// Check if a 10.10 only class is available, NSLinguisticTagger crashes on 10.9 // Check if a 10.10 only class is available, NSLinguisticTagger crashes on 10.9
// if the string contains some characters. // if the string contains some characters.
@@ -87,7 +86,6 @@
if (languageName) { if (languageName) {
newTrack.language = [MP42Languages.defaultManager extendedTagForLang:languageName]; newTrack.language = [MP42Languages.defaultManager extendedTagForLang:languageName];
} }
[locale release];
} }
} }
} }
@@ -107,9 +105,6 @@
MP42LocalizedString(@"The file is not a srt file, or it does not contain any subtitles.", @"srt error message"), 100); MP42LocalizedString(@"The file is not a srt file, or it does not contain any subtitles.", @"srt error message"), 100);
} }
[newTrack release];
[self release];
return nil; return nil;
} }
@@ -124,7 +119,6 @@
} }
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
return self; return self;
@@ -167,7 +161,6 @@
} }
[self enqueue:sample]; [self enqueue:sample];
[sample release];
} }
} }
@@ -182,11 +175,4 @@
return @"SRT demuxer"; return @"SRT demuxer";
} }
- (void) dealloc
{
[_ss release];
[super dealloc];
}
@end @end
+11
View File
@@ -13,6 +13,17 @@
@dynamic muxer_helper; @dynamic muxer_helper;
- (id)demuxerHelper {
muxer_helper *helper = (muxer_helper *)_helper;
return helper->demuxer_context;
}
- (void)setDemuxerHelper:(id)demuxerHelper {
[demuxerHelper retain];
muxer_helper *helper = (muxer_helper *)_helper;
helper->demuxer_context = demuxerHelper;
}
- (MP42FileImporter *)importer - (MP42FileImporter *)importer
{ {
return self.muxer_helper->importer; return self.muxer_helper->importer;
+1
View File
@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, readonly) NSMutableDictionary<NSString *, NSNumber *> *updatedProperty; @property(nonatomic, readonly) NSMutableDictionary<NSString *, NSNumber *> *updatedProperty;
@property (nonatomic, readwrite) MP42FileImporter *importer; @property (nonatomic, readwrite) MP42FileImporter *importer;
@property (nonatomic, readwrite) id demuxerHelper;
- (void *)copy_muxer_helper; - (void *)copy_muxer_helper;
- (void *)create_muxer_helper; - (void *)create_muxer_helper;
-22
View File
@@ -19,12 +19,6 @@
@interface MP42Track () @interface MP42Track ()
{ {
NSString *_name; NSString *_name;
NSString *_language;
BOOL _enabled;
uint64_t _alternateGroup;
NSTimeInterval _startOffset;
} }
@property(nonatomic, readwrite) MP42TrackId trackId; @property(nonatomic, readwrite) MP42TrackId trackId;
@@ -280,10 +274,6 @@
} }
- (NSString *)language {
return _language;
}
- (void)setLanguage:(NSString *)newLang - (void)setLanguage:(NSString *)newLang
{ {
_language = [newLang copy]; _language = [newLang copy];
@@ -308,14 +298,6 @@
} }
} }
- (BOOL)isEnabled {
return _enabled;
}
- (uint64_t)alternateGroup {
return _alternateGroup;
}
- (void)setAlternateGroup:(uint64_t)newGroup - (void)setAlternateGroup:(uint64_t)newGroup
{ {
_alternateGroup = newGroup; _alternateGroup = newGroup;
@@ -323,10 +305,6 @@
_updatedProperty[@"alternate_group"] = @YES; _updatedProperty[@"alternate_group"] = @YES;
} }
- (NSTimeInterval)startOffset {
return _startOffset;
}
- (void)setStartOffset:(NSTimeInterval)newOffset - (void)setStartOffset:(NSTimeInterval)newOffset
{ {
_startOffset = newOffset; _startOffset = newOffset;
+4 -27
View File
@@ -15,8 +15,8 @@
#import "mp4v2.h" #import "mp4v2.h"
#import "MP42PrivateUtilities.h" #import "MP42PrivateUtilities.h"
#import "MP42Track+Muxer.h"
#import "MP42Track+Private.h" #import "MP42Track+Private.h"
#import "MP42Sample.h"
@interface SBVobSubSample : NSObject @interface SBVobSubSample : NSObject
{ {
@@ -68,22 +68,14 @@
if(!self) if(!self)
return self; return self;
privateData = [idxPrivateData retain]; privateData = [idxPrivateData copy];
language = [lang retain]; language = [lang copy];
index = trackIndex; index = trackIndex;
samples = [[NSMutableArray alloc] init]; samples = [[NSMutableArray alloc] init];
return self; return self;
} }
- (void)dealloc
{
[privateData release];
[language release];
[samples release];
[super dealloc];
}
- (void)addSample:(SBVobSubSample *)sample - (void)addSample:(SBVobSubSample *)sample
{ {
[samples addObject:sample]; [samples addObject:sample];
@@ -94,7 +86,6 @@
{ {
SBVobSubSample *sample = [[SBVobSubSample alloc] initWithTime:time offset:offset]; SBVobSubSample *sample = [[SBVobSubSample alloc] initWithTime:time offset:offset];
[self addSample:sample]; [self addSample:sample];
[sample release];
} }
@end @end
@@ -190,7 +181,6 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
currentTrack = [[SBVobSubTrack alloc] initWithPrivateData:privateLines language:language andIndex:index]; currentTrack = [[SBVobSubTrack alloc] initWithPrivateData:privateLines language:language andIndex:index];
[tracks addObject:currentTrack]; [tracks addObject:currentTrack];
[currentTrack release];
} }
break; break;
case VOB_SUB_STATE_READING_DELAY: case VOB_SUB_STATE_READING_DELAY:
@@ -211,10 +201,9 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
} }
} }
return [tracks retain]; return [tracks copy];
} }
bail: bail:
;
NSLog(@"Exception occurred while importing VobSub"); NSLog(@"Exception occurred while importing VobSub");
return nil; return nil;
} }
@@ -247,7 +236,6 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
newTrack.duration = track->duration; newTrack.duration = track->duration;
[self addTrack:newTrack]; [self addTrack:newTrack];
[newTrack release];
} }
if (!self.tracks.count) { if (!self.tracks.count) {
@@ -255,8 +243,6 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
*outError = MP42Error(MP42LocalizedString(@"The file could not be opened.", @"vobsub error message"), *outError = MP42Error(MP42LocalizedString(@"The file could not be opened.", @"vobsub error message"),
MP42LocalizedString(@"The file is not a idx file, or it does not contain any subtitles.", @"vobsub error message"), 100); MP42LocalizedString(@"The file is not a idx file, or it does not contain any subtitles.", @"vobsub error message"), 100);
} }
[self release];
return nil; return nil;
} }
} }
@@ -373,7 +359,6 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
sample->trackId = track.sourceId; sample->trackId = track.sourceId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
} }
MP42SampleBuffer *sample = [[MP42SampleBuffer alloc] init]; MP42SampleBuffer *sample = [[MP42SampleBuffer alloc] init];
@@ -388,7 +373,6 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
sample->trackId = track.sourceId; sample->trackId = track.sourceId;
[self enqueue:sample]; [self enqueue:sample];
[sample release];
lastTime = endTime; lastTime = endTime;
@@ -406,11 +390,4 @@ static NSArray<SBVobSubTrack *> * LoadVobSubSubtitles(NSURL *theDirectory, NSStr
return @"VobSub demuxer"; return @"VobSub demuxer";
} }
- (void)dealloc
{
[_VobSubTracks release];
[super dealloc];
}
@end @end
+10 -10
View File
@@ -140,19 +140,19 @@
A9B9C210182391DF00416A4E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9B9C20E182391DF00416A4E /* InfoPlist.strings */; }; A9B9C210182391DF00416A4E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9B9C20E182391DF00416A4E /* InfoPlist.strings */; };
A9B9C212182391DF00416A4E /* MP42Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C211182391DF00416A4E /* MP42Tests.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C212182391DF00416A4E /* MP42Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C211182391DF00416A4E /* MP42Tests.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
A9B9C2661823923200416A4E /* MP42AACImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C21B1823923100416A4E /* MP42AACImporter.h */; }; A9B9C2661823923200416A4E /* MP42AACImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C21B1823923100416A4E /* MP42AACImporter.h */; };
A9B9C2671823923200416A4E /* MP42AACImporter.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C21C1823923100416A4E /* MP42AACImporter.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C2671823923200416A4E /* MP42AACImporter.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C21C1823923100416A4E /* MP42AACImporter.mm */; };
A9B9C2681823923200416A4E /* MP42AC3Importer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C21D1823923100416A4E /* MP42AC3Importer.h */; }; A9B9C2681823923200416A4E /* MP42AC3Importer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C21D1823923100416A4E /* MP42AC3Importer.h */; };
A9B9C2691823923200416A4E /* MP42AC3Importer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C21E1823923100416A4E /* MP42AC3Importer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C2691823923200416A4E /* MP42AC3Importer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C21E1823923100416A4E /* MP42AC3Importer.m */; };
A9B9C26A1823923200416A4E /* MP42AudioConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C21F1823923100416A4E /* MP42AudioConverter.h */; }; A9B9C26A1823923200416A4E /* MP42AudioConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C21F1823923100416A4E /* MP42AudioConverter.h */; };
A9B9C26B1823923200416A4E /* MP42AudioConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2201823923100416A4E /* MP42AudioConverter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C26B1823923200416A4E /* MP42AudioConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2201823923100416A4E /* MP42AudioConverter.m */; };
A9B9C26C1823923200416A4E /* MP42AudioTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2211823923100416A4E /* MP42AudioTrack.h */; settings = {ATTRIBUTES = (Public, ); }; }; A9B9C26C1823923200416A4E /* MP42AudioTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2211823923100416A4E /* MP42AudioTrack.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C26D1823923200416A4E /* MP42AudioTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2221823923100416A4E /* MP42AudioTrack.m */; }; A9B9C26D1823923200416A4E /* MP42AudioTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2221823923100416A4E /* MP42AudioTrack.m */; };
A9B9C26E1823923200416A4E /* MP42AVFImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2231823923100416A4E /* MP42AVFImporter.h */; }; A9B9C26E1823923200416A4E /* MP42AVFImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2231823923100416A4E /* MP42AVFImporter.h */; };
A9B9C26F1823923200416A4E /* MP42AVFImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2241823923100416A4E /* MP42AVFImporter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C26F1823923200416A4E /* MP42AVFImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2241823923100416A4E /* MP42AVFImporter.m */; };
A9B9C2701823923200416A4E /* MP42BitmapSubConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2251823923100416A4E /* MP42BitmapSubConverter.h */; }; A9B9C2701823923200416A4E /* MP42BitmapSubConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2251823923100416A4E /* MP42BitmapSubConverter.h */; };
A9B9C2711823923200416A4E /* MP42BitmapSubConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2261823923100416A4E /* MP42BitmapSubConverter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C2711823923200416A4E /* MP42BitmapSubConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2261823923100416A4E /* MP42BitmapSubConverter.m */; };
A9B9C2721823923200416A4E /* MP42CCImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2271823923100416A4E /* MP42CCImporter.h */; }; A9B9C2721823923200416A4E /* MP42CCImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2271823923100416A4E /* MP42CCImporter.h */; };
A9B9C2731823923200416A4E /* MP42CCImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2281823923100416A4E /* MP42CCImporter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C2731823923200416A4E /* MP42CCImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2281823923100416A4E /* MP42CCImporter.m */; };
A9B9C2741823923200416A4E /* MP42ChapterTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2291823923100416A4E /* MP42ChapterTrack.h */; settings = {ATTRIBUTES = (Public, ); }; }; A9B9C2741823923200416A4E /* MP42ChapterTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2291823923100416A4E /* MP42ChapterTrack.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C2751823923200416A4E /* MP42ChapterTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C22A1823923100416A4E /* MP42ChapterTrack.m */; }; A9B9C2751823923200416A4E /* MP42ChapterTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C22A1823923100416A4E /* MP42ChapterTrack.m */; };
A9B9C2761823923200416A4E /* MP42ClosedCaptionTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C22B1823923100416A4E /* MP42ClosedCaptionTrack.h */; settings = {ATTRIBUTES = (Public, ); }; }; A9B9C2761823923200416A4E /* MP42ClosedCaptionTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C22B1823923100416A4E /* MP42ClosedCaptionTrack.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -174,16 +174,16 @@
A9B9C2871823923200416A4E /* MP42Metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C23C1823923100416A4E /* MP42Metadata.h */; settings = {ATTRIBUTES = (Public, ); }; }; A9B9C2871823923200416A4E /* MP42Metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C23C1823923100416A4E /* MP42Metadata.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C2881823923200416A4E /* MP42Metadata.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C23D1823923100416A4E /* MP42Metadata.m */; }; A9B9C2881823923200416A4E /* MP42Metadata.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C23D1823923100416A4E /* MP42Metadata.m */; };
A9B9C2891823923200416A4E /* MP42MkvImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C23E1823923100416A4E /* MP42MkvImporter.h */; }; A9B9C2891823923200416A4E /* MP42MkvImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C23E1823923100416A4E /* MP42MkvImporter.h */; };
A9B9C28A1823923200416A4E /* MP42MkvImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C23F1823923100416A4E /* MP42MkvImporter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C28A1823923200416A4E /* MP42MkvImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C23F1823923100416A4E /* MP42MkvImporter.m */; };
A9B9C28B1823923200416A4E /* MP42Mp4Importer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2401823923100416A4E /* MP42Mp4Importer.h */; }; A9B9C28B1823923200416A4E /* MP42Mp4Importer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2401823923100416A4E /* MP42Mp4Importer.h */; };
A9B9C28C1823923200416A4E /* MP42Mp4Importer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2411823923100416A4E /* MP42Mp4Importer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C28C1823923200416A4E /* MP42Mp4Importer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2411823923100416A4E /* MP42Mp4Importer.m */; };
A9B9C28D1823923200416A4E /* MP42Muxer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2421823923100416A4E /* MP42Muxer.h */; }; A9B9C28D1823923200416A4E /* MP42Muxer.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2421823923100416A4E /* MP42Muxer.h */; };
A9B9C28E1823923200416A4E /* MP42Muxer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2431823923100416A4E /* MP42Muxer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C28E1823923200416A4E /* MP42Muxer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2431823923100416A4E /* MP42Muxer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
A9B9C28F1823923200416A4E /* MP42OCRWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2441823923100416A4E /* MP42OCRWrapper.h */; }; A9B9C28F1823923200416A4E /* MP42OCRWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2441823923100416A4E /* MP42OCRWrapper.h */; };
A9B9C2901823923200416A4E /* MP42OCRWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2451823923100416A4E /* MP42OCRWrapper.mm */; }; A9B9C2901823923200416A4E /* MP42OCRWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2451823923100416A4E /* MP42OCRWrapper.mm */; };
A9B9C2941823923200416A4E /* MP42Sample.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2491823923100416A4E /* MP42Sample.m */; }; A9B9C2941823923200416A4E /* MP42Sample.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2491823923100416A4E /* MP42Sample.m */; };
A9B9C2951823923200416A4E /* MP42SrtImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C24A1823923100416A4E /* MP42SrtImporter.h */; }; A9B9C2951823923200416A4E /* MP42SrtImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C24A1823923100416A4E /* MP42SrtImporter.h */; };
A9B9C2961823923200416A4E /* MP42SrtImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C24B1823923100416A4E /* MP42SrtImporter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C2961823923200416A4E /* MP42SrtImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C24B1823923100416A4E /* MP42SrtImporter.m */; };
A9B9C2971823923200416A4E /* MP42SubtitleTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C24C1823923100416A4E /* MP42SubtitleTrack.h */; settings = {ATTRIBUTES = (Public, ); }; }; A9B9C2971823923200416A4E /* MP42SubtitleTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C24C1823923100416A4E /* MP42SubtitleTrack.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C2981823923200416A4E /* MP42SubtitleTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C24D1823923100416A4E /* MP42SubtitleTrack.m */; }; A9B9C2981823923200416A4E /* MP42SubtitleTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C24D1823923100416A4E /* MP42SubtitleTrack.m */; };
A9B9C2991823923200416A4E /* MP42SubUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C24E1823923100416A4E /* MP42SubUtilities.h */; }; A9B9C2991823923200416A4E /* MP42SubUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C24E1823923100416A4E /* MP42SubUtilities.h */; };
@@ -195,7 +195,7 @@
A9B9C29F1823923200416A4E /* MP42VideoTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2541823923100416A4E /* MP42VideoTrack.h */; settings = {ATTRIBUTES = (Public, ); }; }; A9B9C29F1823923200416A4E /* MP42VideoTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2541823923100416A4E /* MP42VideoTrack.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9B9C2A01823923200416A4E /* MP42VideoTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2551823923100416A4E /* MP42VideoTrack.m */; }; A9B9C2A01823923200416A4E /* MP42VideoTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2551823923100416A4E /* MP42VideoTrack.m */; };
A9B9C2A11823923200416A4E /* MP42VobSubImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2561823923200416A4E /* MP42VobSubImporter.h */; }; A9B9C2A11823923200416A4E /* MP42VobSubImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2561823923200416A4E /* MP42VobSubImporter.h */; };
A9B9C2A21823923200416A4E /* MP42VobSubImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2571823923200416A4E /* MP42VobSubImporter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; A9B9C2A21823923200416A4E /* MP42VobSubImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2571823923200416A4E /* MP42VobSubImporter.m */; };
A9B9C2A31823923200416A4E /* MP42XMLReader.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2581823923200416A4E /* MP42XMLReader.h */; }; A9B9C2A31823923200416A4E /* MP42XMLReader.h in Headers */ = {isa = PBXBuildFile; fileRef = A9B9C2581823923200416A4E /* MP42XMLReader.h */; };
A9B9C2A41823923200416A4E /* MP42XMLReader.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2591823923200416A4E /* MP42XMLReader.m */; }; A9B9C2A41823923200416A4E /* MP42XMLReader.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C2591823923200416A4E /* MP42XMLReader.m */; };
A9B9C2A71823923200416A4E /* MatroskaFile.c in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C25D1823923200416A4E /* MatroskaFile.c */; }; A9B9C2A71823923200416A4E /* MatroskaFile.c in Sources */ = {isa = PBXBuildFile; fileRef = A9B9C25D1823923200416A4E /* MatroskaFile.c */; };