summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs4
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs12
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs4
3 files changed, 13 insertions, 7 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs
index ede0f919c..3b2cd4571 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs
@@ -29,7 +29,7 @@ namespace HandBrake.Interop.Json.Encode
/// <summary>
/// Gets or sets the bitrate for the encode.
/// </summary>
- public int Bitrate { get; set; }
+ public int? Bitrate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether two pass.
@@ -64,7 +64,7 @@ namespace HandBrake.Interop.Json.Encode
/// <summary>
/// Gets or sets the quality.
/// </summary>
- public double Quality { get; set; }
+ public double? Quality { get; set; }
/// <summary>
/// Gets or sets the tune.
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
index 19a5e047c..c013c8221 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
@@ -248,13 +248,19 @@ namespace HandBrake.Interop.Json.Factories
video.Codec = videoEncoder.Id;
}
- video.TwoPass = job.TwoPass;
- video.Turbo = job.TurboFirstPass;
+
video.Level = job.VideoLevel;
video.Options = job.VideoOptions;
video.Preset = job.VideoPreset;
video.Profile = job.VideoProfile;
- video.Quality = job.Quality;
+ if (job.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality) video.Quality = job.Quality;
+ if (job.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate)
+ {
+ video.Bitrate = job.VideoBitrate;
+ video.TwoPass = job.TwoPass;
+ video.Turbo = job.TurboFirstPass;
+ }
+
if (job.VideoTunes != null && job.VideoTunes.Count > 0)
{
video.Tune = string.Join(",", job.VideoTunes);
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
index 1ea596ef7..0f18c5b86 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
@@ -134,8 +134,8 @@ namespace HandBrakeWPF.Services.Presets.Model
}
this.Task = task;
- this.AudioTrackBehaviours = audioBehaviours;
- this.SubtitleTrackBehaviours = subtitleBehaviours;
+ this.AudioTrackBehaviours = new AudioBehaviours(audioBehaviours);
+ this.SubtitleTrackBehaviours = new SubtitleBehaviours(subtitleBehaviours);
}
/// <summary>