summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideo.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-04-22 16:49:30 +0000
committerritsuka <[email protected]>2015-04-22 16:49:30 +0000
commit1e990c1a5441c64ce2b985e019a814deecf74843 (patch)
tree7ed44d3ebff43d4a052bc9646fc5a06636e85347 /macosx/HBVideo.m
parent992a1ab264904b96ab5b396e5fd505a272589196 (diff)
MacGui: implemented the NSSecureCoding protocol in HBJob. Added a compatibility class to fall back on NSCoding on 10.7 and earlier.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7112 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBVideo.m')
-rw-r--r--macosx/HBVideo.m17
1 files changed, 11 insertions, 6 deletions
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m
index e7e9b9798..48cd9f4a3 100644
--- a/macosx/HBVideo.m
+++ b/macosx/HBVideo.m
@@ -6,7 +6,7 @@
#import "HBVideo.h"
#import "HBJob.h"
-#import "NSCodingMacro.h"
+#import "HBCodingUtilities.h"
#include "hb.h"
NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
@@ -391,6 +391,11 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
#pragma mark - NSCoding
++ (BOOL)supportsSecureCoding
+{
+ return YES;
+}
+
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeInt:1 forKey:@"HBVideoVersion"];
@@ -441,12 +446,12 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
decodeBool(_turboTwoPass);
decodeBool(_advancedOptions);
- decodeObject(_preset);
- decodeObject(_tune);
- decodeObject(_profile);
- decodeObject(_level);
+ decodeObject(_preset, NSString);
+ decodeObject(_tune, NSString);
+ decodeObject(_profile, NSString);
+ decodeObject(_level, NSString);
- decodeObject(_videoOptionExtra);
+ decodeObject(_videoOptionExtra, NSString);
decodeBool(_fastDecode);