summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authordynaflash <[email protected]>2012-02-17 17:53:31 +0000
committerdynaflash <[email protected]>2012-02-17 17:53:31 +0000
commit616e9202fb4e157ca6b9de5d45f1064e7bf858c3 (patch)
tree5e4cdd369ca716a46373a80061bd908041d33231 /macosx/Controller.m
parent1a400b7b16844ee5455a1a994f89e2a7db95551b (diff)
MacGui: Advanced Options fixes
- Fix advanced FFmpeg options in two-pass mode. - Fix advanced FFmpeg options when re-scanning a queued item. -- Thanks Rodeo for the fixes! - Add HBAdvancedController.h to the HandBrake.app target in the xcode project. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4452 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m53
1 files changed, 28 insertions, 25 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index feb490dae..7a1aa1c58 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -2349,7 +2349,7 @@ fWorkingCount = 0;
[queueFileJob setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"];
/* x264 Option String */
[queueFileJob setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"];
- /* FFMpeg (lavc) Option String */
+ /* FFmpeg (lavc) Option String */
[queueFileJob setObject:[fAdvancedOptions optionsStringLavc] forKey:@"lavcOption"];
[queueFileJob setObject:[NSNumber numberWithInt:[[fVidQualityMatrix selectedCell] tag] + 1] forKey:@"VideoQualityType"];
@@ -2727,8 +2727,16 @@ fWorkingCount = 0;
job->pass = 2;
- job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */
- strcpy(job->advanced_opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]);
+ if( job->vcodec == HB_VCODEC_X264 )
+ {
+ job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */
+ strcpy(job->advanced_opts, [[queueToApply objectForKey:@"x264Option"] UTF8String]);
+ }
+ else
+ {
+ job->advanced_opts = (char *)calloc(1024, 1); /* Fixme, this just leaks */
+ strcpy(job->advanced_opts, [[queueToApply objectForKey:@"lavcOption"] UTF8String]);
+ }
hb_add( fQueueEncodeLibhb, job );
@@ -2817,6 +2825,7 @@ fWorkingCount = 0;
/* We set the advanced opt string here if applicable*/
[fVidEncoderPopUp selectItemWithTitle:[queueToApply objectForKey:@"VideoEncoder"]];
[fAdvancedOptions setOptions:[queueToApply objectForKey:@"x264Option"]];
+ [fAdvancedOptions setLavcOptions:[queueToApply objectForKey:@"lavcOption"]];
/* Lets run through the following functions to get variables set there */
[self videoEncoderPopUpChanged:nil];
@@ -3079,7 +3088,7 @@ fWorkingCount = 0;
job->chapter_markers = 0;
- if( job->vcodec & HB_VCODEC_X264 )
+ if( job->vcodec == HB_VCODEC_X264 )
{
/* Below Sends x264 options to the core library if x264 is selected*/
@@ -3560,7 +3569,7 @@ bool one_burned = FALSE;
job->chapter_markers = 0;
}
- if( job->vcodec & HB_VCODEC_X264 )
+ if( job->vcodec == HB_VCODEC_X264 )
{
if ([[queueToApply objectForKey:@"Mp4iPodCompatible"] intValue] == 1)
{
@@ -4930,7 +4939,7 @@ the user is using "Custom" settings by determining the sender*/
[fVidQualitySlider setNumberOfTickMarks:(([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) * fractionalGranularity) + 1];
qpRFLabelString = @"RF:";
}
- /* ffmpeg MPEG-2/4 1-31 */
+ /* FFmpeg MPEG-2/4 1-31 */
if ([[fVidEncoderPopUp selectedItem] tag] & HB_VCODEC_FFMPEG_MASK )
{
[fVidQualitySlider setMinValue:1.0];
@@ -5686,28 +5695,21 @@ return YES;
[fVidEncoderPopUp selectItemWithTitle:[chosenPreset objectForKey:@"VideoEncoder"]];
[self videoEncoderPopUpChanged:nil];
/* We set the advanced opt string here if applicable*/
- if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_X264)
+ if ([chosenPreset objectForKey:@"x264Option"])
{
- if ([chosenPreset objectForKey:@"x264Option"])
- {
- [fAdvancedOptions setOptions:[chosenPreset objectForKey:@"x264Option"]];
- }
- else
- {
- [fAdvancedOptions setOptions:@""];
- }
-
+ [fAdvancedOptions setOptions:[chosenPreset objectForKey:@"x264Option"]];
}
- else // we are ffmpeg encoder
+ else
{
- if ([chosenPreset objectForKey:@"lavcOption"])
- {
- [fAdvancedOptions setLavcOptions:[chosenPreset objectForKey:@"lavcOption"]];
- }
- else
- {
- [fAdvancedOptions setLavcOptions:@""];
- }
+ [fAdvancedOptions setOptions:@""];
+ }
+ if ([chosenPreset objectForKey:@"lavcOption"])
+ {
+ [fAdvancedOptions setLavcOptions:[chosenPreset objectForKey:@"lavcOption"]];
+ }
+ else
+ {
+ [fAdvancedOptions setLavcOptions:@""];
}
/* Lets run through the following functions to get variables set there */
@@ -6286,6 +6288,7 @@ return YES;
[preset setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"];
/* x264 Option String */
[preset setObject:[fAdvancedOptions optionsString] forKey:@"x264Option"];
+ /* FFmpeg (lavc) Option String */
[preset setObject:[fAdvancedOptions optionsStringLavc] forKey:@"lavcOption"];
/* though there are actually only 0 - 1 types available in the ui we need to map to the old 0 - 2