diff options
author | ritsuka <[email protected]> | 2014-12-23 10:23:59 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-12-23 10:23:59 +0000 |
commit | a66b692e29674de9c444fd54f0493d03b4900abc (patch) | |
tree | 1356eec981d0542ad6ca9087794e7cc52a09c664 /macosx/HBAudio.m | |
parent | ee10e1fdb417c7f1047406522379c85c47143bfd (diff) |
MacGui: move the UI helper methods to new categories. Implement NSCoding in more classes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6643 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudio.m')
-rw-r--r-- | macosx/HBAudio.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index bdafebf0d..6eae9a1f6 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -7,6 +7,7 @@ #import "HBAudio.h" #import "HBAudioController.h" +#import "NSCodingMacro.h" #import "hb.h" NSString *keyAudioCodecName = @"keyAudioCodecName"; @@ -574,5 +575,45 @@ static NSMutableArray *masterBitRateArray = nil; return retval; } +#pragma mark - NSCoding + +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeInt:1 forKey:@"HBAudioTrackVersion"]; + + encodeObject(_track); + encodeObject(_codec); + encodeObject(_mixdown); + encodeObject(_sampleRate); + encodeObject(_bitRate); + encodeObject(_drc); + encodeObject(_gain); + encodeObject(_videoContainerTag); + + encodeObject(_codecs); + encodeObject(_mixdowns); + encodeObject(_bitRates); +} + +- (id)initWithCoder:(NSCoder *)decoder +{ + self = [super init]; + + decodeObject(_track); + decodeObject(_codec); + decodeObject(_mixdown); + decodeObject(_sampleRate); + decodeObject(_bitRate); + decodeObject(_drc); + decodeObject(_gain); + decodeObject(_videoContainerTag); + + decodeObject(_codecs); + decodeObject(_mixdowns); + decodeObject(_bitRates); + + return self; +} + @end |