summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-08-21 18:08:23 +0000
committerritsuka <[email protected]>2014-08-21 18:08:23 +0000
commitb7bfda913fa95937b94254bd61294d8ccd7d8d01 (patch)
tree1332b763a38ce25b13e26b065768b4d1c919346d /macosx
parent3ee1f90e18726df817b94c04fda55ea823aae4e0 (diff)
MacGui: remapped lavcOption to VideoOptionExtra.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6337 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.m2
-rw-r--r--macosx/HBPresetsManager.m12
-rw-r--r--macosx/HBQueueController.mm8
-rw-r--r--macosx/HBVideoController.m36
4 files changed, 27 insertions, 31 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index d9327b0a1..97e5f08db 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -3418,7 +3418,7 @@ fWorkingCount = 0;
else if (job->vcodec & HB_VCODEC_FFMPEG_MASK)
{
hb_job_set_encoder_options(job,
- [[queueToApply objectForKey:@"lavcOption"]
+ [[queueToApply objectForKey:@"VideoOptionExtra"]
UTF8String]);
}
diff --git a/macosx/HBPresetsManager.m b/macosx/HBPresetsManager.m
index 1384a7438..86bd7f4fa 100644
--- a/macosx/HBPresetsManager.m
+++ b/macosx/HBPresetsManager.m
@@ -432,7 +432,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"fast";
@@ -547,7 +546,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -651,7 +649,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -755,7 +752,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -859,7 +855,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -974,7 +969,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -1089,7 +1083,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -1204,7 +1197,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -1308,7 +1300,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -1412,7 +1403,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
@@ -1516,7 +1506,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"veryfast";
@@ -1620,7 +1609,6 @@ NSString *HBPresetsChangedNotification = @"HBPresetsChangedNotification";
/* Video encoder and advanced options */
preset[@"VideoEncoder"] = @"H.264 (x264)";
- preset[@"lavcOption"] = @"";
preset[@"x264Option"] = @"";
preset[@"x264UseAdvancedOptions"] = @0;
preset[@"VideoPreset"] = @"medium";
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm
index 9fedcf943..3635ce296 100644
--- a/macosx/HBQueueController.mm
+++ b/macosx/HBQueueController.mm
@@ -991,16 +991,16 @@
{
/* we are using libavcodec */
NSString *lavcInfo = @"";
- if (item[@"lavcOption"] &&
- [item[@"lavcOption"] length])
+ if (item[@"VideoOptionExtra"] &&
+ [item[@"VideoOptionExtra"] length])
{
- lavcInfo = [lavcInfo stringByAppendingString: item[@"lavcOption"]];
+ lavcInfo = [lavcInfo stringByAppendingString: item[@"VideoOptionExtra"]];
}
else
{
lavcInfo = [lavcInfo stringByAppendingString: @"default settings"];
}
- [finalString appendString: @"ffmpeg: " withAttributes:detailBoldAttr];
+ [finalString appendString: @"Encoder Options: " withAttributes:detailBoldAttr];
[finalString appendString: lavcInfo withAttributes:detailAttr];
[finalString appendString:@"\n" withAttributes:detailAttr];
}
diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m
index af2c6c0db..325145969 100644
--- a/macosx/HBVideoController.m
+++ b/macosx/HBVideoController.m
@@ -281,8 +281,6 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
/* video encoder */
self.codec = [queueToApply[@"JobVideoEncoderVcodec"] intValue];
- self.lavcOptions = queueToApply[@"lavcOption"];
-
/* advanced x264 options */
if ([queueToApply[@"x264UseAdvancedOptions"] intValue])
{
@@ -298,7 +296,7 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
[fX264UseAdvancedOptionsCheck setState:NSOnState];
[self updateEncoderOptionsWidgets:nil];
}
- else
+ else if (self.codec == HB_VCODEC_X264 || self.codec == HB_VCODEC_X265)
{
// we are using the x264 preset system
[self setPreset: queueToApply[@"VideoPreset"]];
@@ -312,6 +310,10 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
[fX264UseAdvancedOptionsCheck setState:NSOffState];
[self updateEncoderOptionsWidgets:nil];
}
+ else
+ {
+ self.lavcOptions = queueToApply[@"VideoOptionExtra"];
+ }
/* Lets run through the following functions to get variables set there */
[self videoEncoderPopUpChanged:nil];
@@ -445,9 +447,11 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
[self updateEncoderOptionsWidgets:nil];
}
}
-
- // Apply the lavcOption
- self.lavcOptions = preset[@"lavcOption"];
+ else
+ {
+ // Apply the lavcOption
+ self.lavcOptions = preset[@"VideoOptionExtra"];
+ }
int qualityType = [preset[@"VideoQualityType"] intValue] - 1;
/* Note since the removal of Target Size encoding, the possible values for VideoQuality type are 0 - 1.
@@ -536,7 +540,7 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
queueFileJob[@"x264UseAdvancedOptions"] = @1;
queueFileJob[@"x264Option"] = [self.fAdvancedOptions optionsString];
}
- else
+ else if (self.codec == HB_VCODEC_X264 || self.codec == HB_VCODEC_X265)
{
// we are using the x264/x265 preset system
queueFileJob[@"x264UseAdvancedOptions"] = @0;
@@ -546,9 +550,11 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
queueFileJob[@"VideoProfile"] = [self profile];
queueFileJob[@"VideoLevel"] = [self level];
}
-
- /* FFmpeg (lavc) Option String */
- queueFileJob[@"lavcOption"] = self.lavcOptions;
+ else
+ {
+ /* FFmpeg (lavc) Option String */
+ queueFileJob[@"VideoOptionExtra"] = self.lavcOptions;
+ }
queueFileJob[@"VideoQualityType"] = @(self.qualityType + 1);
queueFileJob[@"VideoAvgBitrate"] = [fVidBitrateField stringValue];
@@ -708,7 +714,7 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
preset[@"x264UseAdvancedOptions"] = @1;
preset[@"x264Option"] = [self.fAdvancedOptions optionsString];
}
- else
+ else if (self.codec == HB_VCODEC_X264 || self.codec == HB_VCODEC_X265)
{
/* use the x264 preset system */
preset[@"x264UseAdvancedOptions"] = @0;
@@ -731,9 +737,11 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
preset[@"x264Option"] = @"";
}
}
-
- /* FFmpeg (lavc) Option String */
- preset[@"lavcOption"] = self.lavcOptions;
+ else
+ {
+ /* FFmpeg (lavc) Option String */
+ preset[@"VideoOptionExtra"] = self.lavcOptions;
+ }
/* though there are actually only 0 - 1 types available in the ui we need to map to the old 0 - 2
* set of indexes from when we had 0 == Target , 1 == Abr and 2 == Constant Quality for presets