job->ipod_atom = self.mp4iPodCompatible;
}
- job->twopass = self.video.twoPass;
- if (job->vcodec == HB_VCODEC_X264 || job->vcodec == HB_VCODEC_X265)
+ if (self.video.twoPass && (self.video.encoder == HB_VCODEC_X264 ||
+ self.video.encoder == HB_VCODEC_X265))
{
- // set fastfirstpass if 2-pass and Turbo are enabled
- if (self.video.twoPass)
- {
- job->fastfirstpass = self.video.turboTwoPass;
- }
+ job->fastfirstpass = self.video.turboTwoPass;
+ }
+ job->twopass = self.video.twoPass;
+ if (hb_video_encoder_get_presets(self.video.encoder) != NULL)
+ {
// advanced x264/x265 options
NSString *tmpString;
// translate zero-length strings to NULL for libhb
[finalString appendString:@"\n" withAttributes:detailAttr];
- if (self.video.encoder == HB_VCODEC_X264 || self.video.encoder == HB_VCODEC_X265)
+ if (hb_video_encoder_get_presets(self.video.encoder) != NULL)
{
// we are using x264/x265
NSString *encoderPresetInfo = @"";
- (BOOL)fastDecodeSupported
{
- return (self.encoder == HB_VCODEC_X264 || self.encoder == HB_VCODEC_X265);
+ const char * const *tunes = hb_video_encoder_get_tunes(self.encoder);
+
+ for (int i = 0; tunes != NULL && tunes[i] != NULL; i++)
+ {
+ if (!strcasecmp(tunes[i], "fastdecode"))
+ {
+ return YES;
+ }
+ }
+ return NO;
}
- (BOOL)turboTwoPassSupported
{
[temp addObject:@(profiles[i])];
}
+ if (!temp.count)
+ {
+ [temp addObject:@"auto"];
+ }
return [temp copy];
}
// 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])
{
{
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];
{
self.advancedController.hidden = YES;
- if (self.video.encoder == HB_VCODEC_X264 || self.video.encoder == HB_VCODEC_X265)
+ if (hb_video_encoder_get_presets(self.video.encoder) != NULL)
{
[self toggleAdvancedOptionsCheckBoxForEncoder:self.video.encoder];