diff options
3 files changed, 22 insertions, 11 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs index 8023882e0..2c3f013ff 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs @@ -11,6 +11,7 @@ namespace HandBrake.ApplicationServices.Utilities {
using System;
using System.Collections.Generic;
+ using System.Diagnostics;
using System.Linq;
using System.Windows.Media.Animation;
@@ -75,6 +76,7 @@ namespace HandBrake.ApplicationServices.Utilities job.ChosenAudioTracks = new List<int>();
foreach (AudioTrack track in work.AudioTracks)
{
+
AudioEncoding newTrack = new AudioEncoding
{
Bitrate = track.Bitrate,
@@ -85,7 +87,8 @@ namespace HandBrake.ApplicationServices.Utilities Mixdown = Converters.GetCliMixDown(track.MixDown),
SampleRateRaw = GetSampleRateRaw(track.SampleRate),
EncodeRateType = AudioEncodeRateType.Bitrate,
- Name = track.TrackName
+ Name = track.TrackName,
+ IsPassthru = track.IsPassthru
};
profile.AudioEncodings.Add(newTrack);
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs index 6d10b64eb..51b29533f 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs @@ -307,19 +307,22 @@ namespace HandBrake.Interop.Json.Factories Name = item.Name,
};
- if (item.EncodeRateType == AudioEncodeRateType.Quality)
+ if (!item.IsPassthru)
{
- audioTrack.Quality = item.Quality;
- }
+ if (item.EncodeRateType == AudioEncodeRateType.Quality)
+ {
+ audioTrack.Quality = item.Quality;
+ }
- if (item.EncodeRateType == AudioEncodeRateType.Compression)
- {
- audioTrack.CompressionLevel = item.Compression;
- }
+ if (item.EncodeRateType == AudioEncodeRateType.Compression)
+ {
+ audioTrack.CompressionLevel = item.Compression;
+ }
- if (item.EncodeRateType == AudioEncodeRateType.Bitrate)
- {
- audioTrack.Bitrate = item.Bitrate;
+ if (item.EncodeRateType == AudioEncodeRateType.Bitrate)
+ {
+ audioTrack.Bitrate = item.Bitrate;
+ }
}
audio.AudioList.Add(audioTrack);
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs index 5d76a9f5d..2f08623c1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs @@ -80,5 +80,10 @@ namespace HandBrake.Interop.Model.Encoding /// Gets or sets Name.
/// </summary>
public string Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether is passthru.
+ /// </summary>
+ public bool IsPassthru { get; set; }
}
}
|