summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideo.m
diff options
context:
space:
mode:
authorRodeo <[email protected]>2015-05-29 22:20:35 +0000
committerRodeo <[email protected]>2015-05-29 22:20:35 +0000
commit93fb333304b2493a50623b04caac95b53eca3240 (patch)
tree6770a27513b3c5f1d8a5231cfad9692d3fcd7329 /macosx/HBVideo.m
parent1538772d963815afb194a80fe73e751d75badb99 (diff)
MacGui: don't hardcode which encoders support the preset system.
Just ask libhb instead. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7243 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBVideo.m')
-rw-r--r--macosx/HBVideo.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m
index b1a002bba..f264a16b5 100644
--- a/macosx/HBVideo.m
+++ b/macosx/HBVideo.m
@@ -331,6 +331,10 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
{
[temp addObject:@(profiles[i])];
}
+ if (!temp.count)
+ {
+ [temp addObject:@"auto"];
+ }
return [temp copy];
}
@@ -506,7 +510,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
// map legacy encoder names via libhb.
self.encoder = hb_video_encoder_get_from_name([preset[@"VideoEncoder"] UTF8String]);
- if (self.encoder == HB_VCODEC_X264 || self.encoder == HB_VCODEC_X265)
+ if (hb_video_encoder_get_presets(self.encoder) != NULL)
{
if (self.encoder == HB_VCODEC_X264 && [preset[@"x264UseAdvancedOptions"] boolValue])
{
@@ -613,7 +617,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
{
preset[@"VideoEncoder"] = @(hb_video_encoder_get_short_name(self.encoder));
- if (self.encoder == HB_VCODEC_X264 || self.encoder == HB_VCODEC_X265)
+ if (hb_video_encoder_get_presets(self.encoder) != NULL)
{
preset[@"VideoPreset"] = self.preset;
preset[@"VideoTune"] = [self completeTune];