Load the DTS decoder from Perian too.
This commit is contained in:
1 parent
adc294be53
commit
dbf73e87c8
1 file changed
+17
@@ -41,6 +41,7 @@ static NSMutableDictionary *_loadedComponents;
|
||||
}
|
||||
|
||||
- (void)loadBundledComponents {
|
||||
@synchronized(self) {
|
||||
NSURL *url = [[[NSBundle mainBundle] resourceURL] URLByAppendingPathComponent:@"Decoders"];
|
||||
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:[url path] isDirectory:NULL]) {
|
||||
@@ -79,11 +80,26 @@ static NSMutableDictionary *_loadedComponents;
|
||||
NSLog(@"FLAC Decoder loaded");
|
||||
}
|
||||
}
|
||||
|
||||
if (![self componentLoadedForFormat:'DTS ']) {
|
||||
OSStatus err = [self loadComponent:kAudioDecoderComponentType
|
||||
format:'DTS '
|
||||
manufacturer:'Peri'
|
||||
url:[url URLByAppendingPathComponent:@"Perian.component/Contents/MacOS/Perian"]
|
||||
entry:"FFissionVBRDecoderEntry"];
|
||||
if (!err) {
|
||||
NSLog(@"DTS Decoder loaded");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)componentLoadedForFormat:(OSType)format {
|
||||
BOOL loaded = NO;
|
||||
|
||||
if ([_loadedComponents valueForKey:@(FourCC2Str(format))]) {
|
||||
loaded = YES;;
|
||||
} else {
|
||||
AudioComponentDescription acd = { 0 };
|
||||
acd.componentType = kAudioDecoderComponentType;
|
||||
acd.componentSubType = format;
|
||||
@@ -96,6 +112,7 @@ static NSMutableDictionary *_loadedComponents;
|
||||
loaded = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return loaded;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user