Switch to FourCC instead of NSStrings for media type and formats.
This commit is contained in:
1 parent
71ea7afd67
commit
1c562a65ea
32 files changed
+374
-409
No files matched your search
@@ -11,22 +11,20 @@
|
||||
|
||||
@implementation MP42XMLReader
|
||||
|
||||
@synthesize mMetadata;
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)url error:(NSError **)error
|
||||
{
|
||||
if (self = [super init]) {
|
||||
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithContentsOfURL:url options:0 error:NULL];
|
||||
if (xml) {
|
||||
NSError *err;
|
||||
mMetadata = [[MP42Metadata alloc] init];
|
||||
_mMetadata = [[MP42Metadata alloc] init];
|
||||
NSArray *nodes = [xml nodesForXPath:@"./movie" error:&err];
|
||||
if ([nodes count] == 1)
|
||||
[self metadata:mMetadata forNode:[nodes objectAtIndex:0]];
|
||||
[self metadata:_mMetadata forNode:[nodes objectAtIndex:0]];
|
||||
|
||||
nodes = [xml nodesForXPath:@"./video" error:&err];
|
||||
if ([nodes count] == 1)
|
||||
[self metadata2:mMetadata forNode:[nodes objectAtIndex:0]];
|
||||
[self metadata2:_mMetadata forNode:[nodes objectAtIndex:0]];
|
||||
}
|
||||
[xml release];
|
||||
}
|
||||
@@ -127,7 +125,7 @@
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[mMetadata release];
|
||||
[_mMetadata release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user