2022-01-03 09:51:53 +00:00
|
|
|
//
|
|
|
|
// libvgmPropertiesReader.m
|
|
|
|
// libvgmPlayer
|
|
|
|
//
|
|
|
|
// Created by Christopher Snowhill on 01/02/22.
|
|
|
|
// Copyright 2022 __LoSnoCo__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "libvgmPropertiesReader.h"
|
|
|
|
#import "libvgmDecoder.h"
|
|
|
|
|
|
|
|
@implementation libvgmPropertiesReader
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (NSArray *)fileTypes {
|
2022-01-03 09:51:53 +00:00
|
|
|
return [libvgmDecoder fileTypes];
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (NSArray *)mimeTypes {
|
2022-01-03 09:51:53 +00:00
|
|
|
return [libvgmDecoder mimeTypes];
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (float)priority {
|
|
|
|
return [libvgmDecoder priority];
|
2022-01-03 09:51:53 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source {
|
|
|
|
libvgmDecoder *decoder = [[libvgmDecoder alloc] init];
|
|
|
|
|
|
|
|
NSDictionary *properties = [NSDictionary dictionary];
|
|
|
|
|
|
|
|
if([decoder open:source]) {
|
|
|
|
properties = [decoder properties];
|
|
|
|
|
|
|
|
[decoder close];
|
|
|
|
}
|
|
|
|
|
|
|
|
return properties;
|
2022-01-03 09:51:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|