-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update copyright header - Move private variables to .m file
- Loading branch information
Showing
2 changed files
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright (c) 2009, Oleksandr Tymoshenko <[email protected]> | ||
// Copyright (c) 2009-2016 Oleksandr Tymoshenko <[email protected]> | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
|
@@ -32,16 +32,11 @@ | |
#define ITUNES_METADATA_IMAGE_CLASS 0x0e | ||
#define ITUNES_METADATA_UINT8_CLASS 0x15 | ||
|
||
@interface MP4Atom : NSObject { | ||
NSString *name; | ||
UInt32 length; | ||
NSArray *children; | ||
UInt64 offset; | ||
} | ||
@interface MP4Atom : NSObject | ||
|
||
@property(readwrite, copy) NSString *name; | ||
@property(readwrite, assign) UInt32 length; | ||
@property(readwrite, assign) UInt64 offset; | ||
@property (copy) NSString *name; | ||
@property (assign) UInt32 length; | ||
@property (assign) UInt64 offset; | ||
|
||
-(id) initWithName:(NSString*)atom andLength:(UInt32)length; | ||
-(id) initWithHeaderData:(NSData*)data andOffset: (UInt64)offset; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright (c) 2009, Oleksandr Tymoshenko <[email protected]> | ||
// Copyright (c) 2009-2016 Oleksandr Tymoshenko <[email protected]> | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
|
@@ -27,12 +27,13 @@ | |
|
||
#import "MP4Atom.h" | ||
|
||
@interface MP4Atom() { | ||
NSArray *children; | ||
} | ||
|
||
@implementation MP4Atom | ||
@end | ||
|
||
@synthesize length; | ||
@synthesize offset; | ||
@synthesize name; | ||
@implementation MP4Atom | ||
|
||
-(id) initWithName: (NSString*)atom andLength:(UInt32)len; | ||
{ | ||
|
@@ -76,7 +77,7 @@ -(NSData*)encode | |
} hdr; | ||
|
||
hdr.beLength = htonl(self.length); | ||
NSAssert([name getCString:hdr.name maxLength:5 encoding:NSMacOSRomanStringEncoding], | ||
NSAssert([self.name getCString:hdr.name maxLength:5 encoding:NSMacOSRomanStringEncoding], | ||
@"Failed to convert tag name"); | ||
NSData *data = [NSData dataWithBytes:&hdr length:8]; | ||
return data; | ||
|