summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.Interop')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs6
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs27
2 files changed, 21 insertions, 12 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs
index a92253d7b..461397eb2 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs
@@ -9,6 +9,8 @@
namespace HandBrake.Interop.Json.Encode
{
+ using System;
+
/// <summary>
/// The video.
/// </summary>
@@ -30,9 +32,9 @@ namespace HandBrake.Interop.Json.Encode
public int Bitrate { get; set; }
/// <summary>
- /// Gets or sets the number of passes
+ /// Gets or sets a value indicating whether two pass.
/// </summary>
- public int pass { get; set; }
+ public bool TwoPass { get; set; }
/// <summary>
/// Gets or sets Turbo First Pass. For x264/5
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
index 88bae4116..ebfee5c21 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
@@ -170,24 +170,29 @@ namespace HandBrake.Interop.Json.Factories
foreach (SourceSubtitle item in job.Subtitles.SourceSubtitles)
{
- SubtitleList track = new SubtitleList
- {
- Burn = item.BurnedIn,
- Default = item.Default,
- Force = item.Forced,
- ID = item.TrackNumber,
- Track = item.TrackNumber
- };
-
- subtitle.SubtitleList.Add(track);
+ // Handle Foreign Audio Search
+ if (item.TrackNumber == 0)
+ {
+ subtitle.Search.Enable = true;
+ subtitle.Search.Burn = item.BurnedIn;
+ subtitle.Search.Default = item.Default;
+ subtitle.Search.Forced = item.Forced;
+ }
+ else
+ {
+ SubtitleList track = new SubtitleList { Burn = item.BurnedIn, Default = item.Default, Force = item.Forced, ID = item.TrackNumber, Track = item.TrackNumber };
+ subtitle.SubtitleList.Add(track);
+ }
}
foreach (SrtSubtitle item in job.Subtitles.SrtSubtitles)
{
SubtitleList track = new SubtitleList
{
+ Track = -1, // Indicates SRT
Default = item.Default,
Offset = item.Offset,
+ Burn = item.BurnedIn,
SRT =
new SRT
{
@@ -223,6 +228,8 @@ namespace HandBrake.Interop.Json.Factories
video.Codec = videoEncoder.Id;
}
+ video.TwoPass = job.EncodingProfile.TwoPass;
+ video.Turbo = job.EncodingProfile.TurboFirstPass;
video.Level = job.EncodingProfile.VideoLevel;
video.Options = job.EncodingProfile.VideoOptions;
video.Preset = job.EncodingProfile.VideoPreset;