summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-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; }