summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-02-07 15:45:02 +0000
committersr55 <[email protected]>2015-02-07 15:45:02 +0000
commitf9d51a06728fd37a9f06ef0086ff8ba4c4fdf418 (patch)
tree3dee9c69c4434933988d5ebe6b0a2acaec85545f
parent7e2a8accddcfda0a2a4514209afb5cf2054dd9b1 (diff)
WinGui: Advanced tab now correctly overrides video tab options.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6877 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs3
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs15
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs6
3 files changed, 19 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
index 7e5a2e5c0..141af6b55 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
@@ -209,7 +209,8 @@ namespace HandBrake.ApplicationServices.Utilities
job.UseDefaultChapterNames = work.IncludeChapterMarkers;
// Advanced Settings
- job.VideoOptions = work.ShowAdvancedTab ? work.AdvancedEncoderOptions : work.ExtraAdvancedArguments;
+ job.VideoOptions = work.ExtraAdvancedArguments;
+ job.AdvancedOptions = work.ShowAdvancedTab ? work.AdvancedEncoderOptions : string.Empty;
// Subtitles
job.Subtitles = new Subtitles { SourceSubtitles = new List<SourceSubtitle>(), SrtSubtitles = new List<SrtSubtitle>() };
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
index c013c8221..0560f05d6 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
@@ -248,11 +248,18 @@ namespace HandBrake.Interop.Json.Factories
video.Codec = videoEncoder.Id;
}
+ if (!string.IsNullOrEmpty(job.AdvancedOptions))
+ {
+ video.Options = job.AdvancedOptions;
+ }
+ else
+ {
+ video.Level = job.VideoLevel;
+ video.Options = job.VideoOptions;
+ video.Preset = job.VideoPreset;
+ video.Profile = job.VideoProfile;
+ }
- video.Level = job.VideoLevel;
- video.Options = job.VideoOptions;
- video.Preset = job.VideoPreset;
- video.Profile = job.VideoProfile;
if (job.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality) video.Quality = job.Quality;
if (job.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate)
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs
index f231073f4..fb5f8c76a 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs
@@ -294,6 +294,12 @@ namespace HandBrake.Interop.Model
public string VideoOptions { get; set; }
/// <summary>
+ /// Gets or sets the advanced options.
+ /// This overrides the VideoOptions, VideoPreset, VideoTunes and VideoLevel
+ /// </summary>
+ public string AdvancedOptions { get; set; }
+
+ /// <summary>
/// Gets or sets the video encoder profile name.
/// </summary>
public string VideoProfile { get; set; }