summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueController.mm
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-01-02 19:36:28 +0000
committerRodeo <[email protected]>2013-01-02 19:36:28 +0000
commita1333dd07f61449d42b73f2b3329db649c6e223f (patch)
treec63152f40fb72fb245bef6f8b0b2882575014ab0 /macosx/HBQueueController.mm
parente993c7e5608e755a3d941d8521995bc0bf33ce1f (diff)
MacGui: more refactoring, bugfixes.
Apologies if anything breaks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5131 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBQueueController.mm')
-rw-r--r--macosx/HBQueueController.mm75
1 files changed, 31 insertions, 44 deletions
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm
index b2f4c2100..2a961be6d 100644
--- a/macosx/HBQueueController.mm
+++ b/macosx/HBQueueController.mm
@@ -1319,76 +1319,63 @@ return ![(HBQueueOutlineView*)outlineView isDragging];
[finalString appendString: videoInfo withAttributes:detailAttr];
[finalString appendString:@"\n" withAttributes:detailAttr];
- // x264 options (for now either the x264 presets panel or the hb x264 advanced panel
if ([[item objectForKey:@"VideoEncoder"] isEqualToString: @"H.264 (x264)"])
{
- // check to see if we are using a x264 preset, if so concatenate the display of presets, tunes , etc.
- if ([item objectForKey:@"x264Preset"])
+ /* we are using x264 */
+ NSString *x264Info = @"";
+ if ([[item objectForKey:@"x264UseAdvancedOptions"] intValue])
{
- [finalString appendString: @"x264 Presets: " withAttributes:detailBoldAttr];
- NSString * x264PresetsInfo = @"";
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Preset:%@ - ",[item objectForKey:@"x264Preset"]]];
- if ([item objectForKey:@"x264Tune"])
+ // we are using the old advanced panel
+ if ([item objectForKey:@"x264Option"] &&
+ [[item objectForKey:@"x264Option"] length])
{
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Tune:%@ - ",[item objectForKey:@"x264Tune"]]];
+ x264Info = [x264Info stringByAppendingString: [item objectForKey:@"x264Option"]];
}
else
{
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Tune:none - "]];
+ x264Info = [x264Info stringByAppendingString: @"default settings"];
}
- if ([item objectForKey:@"x264Option"])
- {
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Additional Options:%@ - ",[item objectForKey:@"x264AdditionalOptions"]]];
- }
- if ([item objectForKey:@"h264Profile"])
- {
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Profile:%@ - ",[item objectForKey:@"h264Profile"]]];
- }
- else
- {
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Profile:auto - "]];
- }
- if ([item objectForKey:@"h264Level"])
+ }
+ else
+ {
+ // we are using the x264 system
+ x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@"Preset: %@", [item objectForKey:@"x264Preset"]]];
+ if ([[item objectForKey:@"x264Tune"] length])
{
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Level:%@",[item objectForKey:@"h264Level"]]];
+ x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Tune: %@", [item objectForKey:@"x264Tune"]]];
}
- else
+ if ([[item objectForKey:@"x264OptionExtra"] length])
{
- x264PresetsInfo = [x264PresetsInfo stringByAppendingString: [NSString stringWithFormat:@"Level:auto"]];
+ x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Options: %@", [item objectForKey:@"x264OptionExtra"]]];
}
-
- [finalString appendString: x264PresetsInfo withAttributes:detailAttr];
-
- }
- else /// we are using the HB Advanced Panel
- {
- [finalString appendString: @"x264 Advanced Options: " withAttributes:detailBoldAttr];
- if ([item objectForKey:@"x264Option"])
+ if ([[item objectForKey:@"h264Profile"] length])
{
- [finalString appendString: [item objectForKey:@"x264Option"] withAttributes:detailAttr];
+ x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Profile: %@", [item objectForKey:@"h264Profile"]]];
}
- else
+ if ([[item objectForKey:@"h264Level"] length])
{
- [finalString appendString: @"x264 defaults" withAttributes:detailAttr];
+ x264Info = [x264Info stringByAppendingString: [NSString stringWithFormat:@" - Level: %@", [item objectForKey:@"h264Level"]]];
}
-
}
-
+ [finalString appendString: @"x264: " withAttributes:detailBoldAttr];
+ [finalString appendString: x264Info withAttributes:detailAttr];
[finalString appendString:@"\n" withAttributes:detailAttr];
}
-
- /*If we are not x264 and we are not Theora then we must be FFmpeg (lavc) */
else if (![[item objectForKey:@"VideoEncoder"] isEqualToString: @"VP3 (Theora)"])
{
- [finalString appendString: @"FFmpeg (lavc) Options: " withAttributes:detailBoldAttr];
- if ([item objectForKey:@"lavcOption"])
+ /* we are using libavcodec */
+ NSString *lavcInfo = @"";
+ if ([item objectForKey:@"lavcOption"] &&
+ [[item objectForKey:@"lavcOption"] length])
{
- [finalString appendString: [item objectForKey:@"lavcOption"] withAttributes:detailAttr];
+ lavcInfo = [lavcInfo stringByAppendingString: [item objectForKey:@"lavcOption"]];
}
else
{
- [finalString appendString: @"FFmpeg (lavc) defaults" withAttributes:detailAttr];
+ lavcInfo = [lavcInfo stringByAppendingString: @"default settings"];
}
+ [finalString appendString: @"ffmpeg: " withAttributes:detailBoldAttr];
+ [finalString appendString: lavcInfo withAttributes:detailAttr];
[finalString appendString:@"\n" withAttributes:detailAttr];
}