Open mxf with AVFoundation (if the right component is available)
This commit is contained in:
4 files changed
+21
-1
No files matched your search
@@ -20,6 +20,8 @@
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <VideoToolbox/VideoToolbox.h>
|
||||
#import <MediaToolbox/MediaToolbox.h>
|
||||
|
||||
@interface AVFDemuxHelper : NSObject {
|
||||
@public
|
||||
@@ -45,7 +47,7 @@
|
||||
}
|
||||
|
||||
+ (NSArray<NSString *> *)supportedFileFormats {
|
||||
return @[@"mov", @"qt", @"mp4", @"m4v", @"m4a", @"mp3", @"m2ts", @"ts", @"mts",
|
||||
return @[@"mov", @"qt", @"mp4", @"m4v", @"m4a", @"mxf", @"mp3", @"m2ts", @"ts", @"mts",
|
||||
@"ac3", @"eac3", @"ec3", @"webvtt", @"vtt", @"caf", @"aif", @"aiff", @"aifc", @"wav", @"flac"];
|
||||
}
|
||||
|
||||
@@ -82,6 +84,10 @@
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)fileURL error:(NSError * __autoreleasing *)outError {
|
||||
if ((self = [super initWithURL:fileURL])) {
|
||||
|
||||
VTRegisterProfessionalVideoWorkflowVideoDecoders();
|
||||
MTRegisterProfessionalVideoWorkflowFormatReaders();
|
||||
|
||||
_localAsset = [AVAsset assetWithURL:self.fileURL];
|
||||
_helpers = [NSMutableArray array];
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ enum : MP42VideoCodecType
|
||||
kMP42VideoCodecType_DVCPROHD1080p30 = 'dvh3',
|
||||
kMP42VideoCodecType_DVCPROHD1080p25 = 'dvh2',
|
||||
|
||||
kMP42VideoCodecType_XAVC_Long_GOP = 'xalg',
|
||||
|
||||
kMP42VideoCodecType_FairPlay = 'drmi',
|
||||
};
|
||||
|
||||
|
||||
@@ -190,6 +190,10 @@ NSString *localizedVideoDisplayName(FourCharCode mediaSubtype)
|
||||
result = NSLocalizedString(@"DVC Pro PAL", nil);
|
||||
break;
|
||||
|
||||
case kMP42VideoCodecType_XAVC_Long_GOP:
|
||||
result = NSLocalizedString(@"XAVC Long GOP", nil);
|
||||
break;
|
||||
|
||||
case kMP42VideoCodecType_FairPlay:
|
||||
result = NSLocalizedString(@"FairPlay Video", nil);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user