From f9d51a06728fd37a9f06ef0086ff8ba4c4fdf418 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 7 Feb 2015 15:45:02 +0000 Subject: WinGui: Advanced tab now correctly overrides video tab options. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6877 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrakeInterop/Json/Factories/EncodeFactory.cs | 15 +++++++++++---- .../HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs | 6 ++++++ 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'win/CS/HandBrake.Interop') 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 @@ -293,6 +293,12 @@ namespace HandBrake.Interop.Model /// public string VideoOptions { get; set; } + /// + /// Gets or sets the advanced options. + /// This overrides the VideoOptions, VideoPreset, VideoTunes and VideoLevel + /// + public string AdvancedOptions { get; set; } + /// /// Gets or sets the video encoder profile name. /// -- cgit v1.2.3