diff options
author | sr55 <[email protected]> | 2015-01-11 18:12:28 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-11 18:12:28 +0000 |
commit | 04392778932f7e6f424039f30d775ac4e1fd7b2b (patch) | |
tree | fa07d529e0a7fbb720173f40ae925e492ab117cb /win/CS/HandBrake.Interop | |
parent | 095576f3fbb5c96c9ef58fe45af9390bf718e1dd (diff) |
WinGui: Make LibHB a first class citizen for encoding. (Now on by default). Update for JSON API changes. Bug fixes in subtitles and twopass encoding.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6732 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop')
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Json/Encode/Video.cs | 6 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs | 27 |
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;
|