diff options
author | Damiano Galassi <[email protected]> | 2016-05-24 11:15:21 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-05-24 11:15:21 +0200 |
commit | e117959205266ad5b243391c976632e5ec186af8 (patch) | |
tree | b3bc58773186a562db98612560ad360283888bb6 /macosx/HBVideo.m | |
parent | b015c304d1d72ae7e43e0eae25048136069f03ad (diff) |
MacGui: use the right constant quality label in the video tab, and split HBVideo KVO dependecies.
Diffstat (limited to 'macosx/HBVideo.m')
-rw-r--r-- | macosx/HBVideo.m | 61 |
1 files changed, 20 insertions, 41 deletions
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m index df4c98a99..6a1bdf5fb 100644 --- a/macosx/HBVideo.m +++ b/macosx/HBVideo.m @@ -308,47 +308,6 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; } } -+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key -{ - NSSet *retval = nil; - - // Tell KVO to reload the presets settings - // after a change to the encoder. - if ([key isEqualToString:@"presets"] || - [key isEqualToString:@"tunes"] || - [key isEqualToString:@"profiles"] || - [key isEqualToString:@"levels"]) - { - retval = [NSSet setWithObjects:@"encoder", nil]; - } - - // Tell KVO to reload the x264 unparse string - // after values changes. - else if ([key isEqualToString:@"unparseOptions"]) - { - retval = [NSSet setWithObjects:@"encoder", @"preset", @"tune", @"profile", @"level", - @"videoOptionExtra", @"fastDecode", @"job.picture.width", @"job.picture.height", nil]; - } - - else if ([key isEqualToString:@"encoders"]) - { - retval = [NSSet setWithObjects:@"job.container", nil]; - } - - else if ([key isEqualToString:@"fastDecodeSupported"] || - [key isEqualToString:@"turboTwoPassSupported"]) - { - retval = [NSSet setWithObjects:@"encoder", nil]; - } - - else - { - retval = [NSSet set]; - } - - return retval; -} - - (void)setNilValueForKey:(NSString *)key { [self setValue:@0 forKey:key]; @@ -356,6 +315,11 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; #pragma mark - ++ (NSSet<NSString *> *)keyPathsForValuesAffectingPresets +{ + return [NSSet setWithObjects:@"encoder", nil]; +} + - (NSArray *)presets { NSMutableArray *temp = [NSMutableArray array]; @@ -373,6 +337,11 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; return [temp copy]; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingTunes +{ + return [NSSet setWithObjects:@"encoder", nil]; +} + - (NSArray *)tunes { NSMutableArray *temp = [NSMutableArray array]; @@ -393,6 +362,11 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; return [temp copy]; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingProfiles +{ + return [NSSet setWithObjects:@"encoder", nil]; +} + - (NSArray *)profiles { NSMutableArray *temp = [NSMutableArray array]; @@ -410,6 +384,11 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; return [temp copy]; } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingLevels +{ + return [NSSet setWithObjects:@"encoder", nil]; +} + - (NSArray *)levels { NSMutableArray *temp = [NSMutableArray array]; |