diff options
author | ritsuka <[email protected]> | 2014-12-27 10:46:04 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-12-27 10:46:04 +0000 |
commit | df8b2ff3e109699e3dadd88404911f8dfc7b210a (patch) | |
tree | 8489fee4edaf57adf55f69d0c0d28f61a5757057 /macosx/HBAudioDefaults.m | |
parent | 8df584534c0c39f5c2f298d8ba480cc906743bbf (diff) |
MacGui: change the queue to work with serialized HBJob objects, remove the NSDictionary job representation and the duplicate prepareJob method. Implement NSCopying protocol in HBJob.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6655 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudioDefaults.m')
-rw-r--r-- | macosx/HBAudioDefaults.m | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m index 3628b5564..d6b184f33 100644 --- a/macosx/HBAudioDefaults.m +++ b/macosx/HBAudioDefaults.m @@ -70,7 +70,7 @@ return nil; } -- (void)applySettingsFromPreset:(NSDictionary *)preset +- (void)applyPreset:(NSDictionary *)preset { // Track selection behavior if ([preset[@"AudioTrackSelectionBehavior"] isEqualToString:@"first"]) @@ -165,7 +165,7 @@ } } -- (void)prepareAudioDefaultsForPreset:(NSMutableDictionary *)preset +- (void)writeToPreset:(NSMutableDictionary *)preset { // Track selection behavior if (self.trackSelectionBehavior == HBAudioTrackSelectionBehaviorFirst) @@ -241,6 +241,34 @@ self.container = container; } +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone +{ + HBAudioDefaults *copy = [[[self class] alloc] init]; + + if (copy) + { + copy->_trackSelectionBehavior = _trackSelectionBehavior; + [copy->_trackSelectionLanguages release]; + copy->_trackSelectionLanguages = [_trackSelectionLanguages mutableCopy]; + + [copy->_tracksArray release]; + copy->_tracksArray = [[NSMutableArray alloc] initWithArray:_tracksArray copyItems:YES]; + + copy->_allowAACPassthru = _allowAACPassthru; + copy->_allowAC3Passthru = _allowAC3Passthru; + copy->_allowDTSHDPassthru = _allowDTSHDPassthru; + copy->_allowDTSPassthru = _allowDTSPassthru; + copy->_allowMP3Passthru = _allowMP3Passthru; + + copy->_encoderFallback = _encoderFallback; + copy->_secondaryEncoderMode = _secondaryEncoderMode; + } + + return copy; +} + #pragma mark - NSCoding - (void)encodeWithCoder:(NSCoder *)coder |