diff options
author | Damiano Galassi <[email protected]> | 2018-11-15 13:56:16 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2018-11-15 13:56:16 +0100 |
commit | 5c127e80911b92a8a47b08a51e8dfb52e67fc206 (patch) | |
tree | 563ef7ebb98d787281f6d4196e6aad59724e78ab /macosx/HBVideo+UIAdditions.m | |
parent | ba7d33db36abe423aadbd36e91bccdabf25709aa (diff) |
Add VideoToolbox hardware encoding thru FFmpeg.
Diffstat (limited to 'macosx/HBVideo+UIAdditions.m')
-rw-r--r-- | macosx/HBVideo+UIAdditions.m | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/macosx/HBVideo+UIAdditions.m b/macosx/HBVideo+UIAdditions.m index e23c1ab72..d7cbc0eda 100644 --- a/macosx/HBVideo+UIAdditions.m +++ b/macosx/HBVideo+UIAdditions.m @@ -104,6 +104,17 @@ (self.encoder & HB_VCODEC_X265_MASK)); } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingTwoPassSupported +{ + return [NSSet setWithObjects:@"encoder", nil]; +} + +- (BOOL)twoPassSupported +{ + return !((self.encoder & HB_VCODEC_FFMPEG_VT_H264) || + (self.encoder & HB_VCODEC_FFMPEG_VT_H265)); +} + + (NSSet<NSString *> *)keyPathsForValuesAffectingConstantQualityLabel { return [NSSet setWithObjects:@"encoder", nil]; @@ -114,6 +125,16 @@ return @(hb_video_quality_get_name(self.encoder)); } ++ (NSSet<NSString *> *)keyPathsForValuesAffectingIsConstantQualitySupported +{ + return [NSSet setWithObjects:@"encoder", nil]; +} + +- (BOOL)isConstantQualitySupported +{ + return (self.qualityMaxValue == 0 && self.qualityMinValue == 0) == NO; +} + + (NSSet<NSString *> *)keyPathsForValuesAffectingUnparseOptions { return [NSSet setWithObjects:@"encoder", @"preset", @"tune", @"profile", @"level", |