summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideo.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBVideo.m')
-rw-r--r--macosx/HBVideo.m61
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];