diff --git a/MP42/MP42MediaFormat.h b/MP42/MP42MediaFormat.h index 0abb3ef..aa463e3 100644 --- a/MP42/MP42MediaFormat.h +++ b/MP42/MP42MediaFormat.h @@ -56,6 +56,7 @@ extern NSString *const MP42AudioFormatVorbis; extern NSString *const MP42AudioFormatFLAC; extern NSString *const MP42AudioFormatALAC; extern NSString *const MP42AudioFormatAC3; +extern NSString *const MP42AudioFormatEAC3; extern NSString *const MP42AudioFormatDTS; extern NSString *const MP42AudioFormatTrueHD; extern NSString *const MP42AudioFormatAMR; @@ -64,6 +65,7 @@ extern NSString *const MP42AudioFormatFairPlay; // Subtitle Format +extern NSString *const MP42SubtitleFormatWebVTT; extern NSString *const MP42SubtitleFormatTx3g; extern NSString *const MP42SubtitleFormatText; extern NSString *const MP42SubtitleFormatVobSub; diff --git a/MP42/MP42QTImporter.m b/MP42/MP42QTImporter.m index fb79530..117af5b 100644 --- a/MP42/MP42QTImporter.m +++ b/MP42/MP42QTImporter.m @@ -210,7 +210,7 @@ } // Subtitle - else if([mediaType isEqualToString:@"sbtl"]) { + else if ([mediaType isEqualToString:@"sbtl"]) { newTrack = [[MP42SubtitleTrack alloc] init]; NSSize dimension = [track apertureModeDimensionsForMode:QTMovieApertureModeClean]; [(MP42SubtitleTrack*)newTrack setTrackWidth: dimension.width]; @@ -220,11 +220,13 @@ } // Closed Caption - else if([mediaType isEqualToString:@"clcp"]) + else if ([mediaType isEqualToString:@"clcp"]) { newTrack = [[MP42ClosedCaptionTrack alloc] init]; + } - else + else { newTrack = [[MP42Track alloc] init]; + } if (newTrack) { newTrack.format = [self formatForTrack:track]; @@ -242,9 +244,9 @@ } } -- (NSString*)formatForTrack: (QTTrack *)track; +- (NSString *)formatForTrack:(QTTrack *)track; { - NSString* result = @""; + NSString *result = @""; ImageDescriptionHandle idh = (ImageDescriptionHandle) NewHandleClear(sizeof(ImageDescription)); GetMediaSampleDescription([[track media] quickTimeMedia], 1, @@ -347,7 +349,7 @@ return result; } -- (NSString*)langForTrack: (QTTrack *)track +- (NSString *)langForTrack:(QTTrack *)track { long data = [[track attributeForKey:QTTrackLanguageAttribute] longValue]; char code[4];