summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-13 21:43:22 +0000
committersr55 <[email protected]>2015-01-13 21:43:22 +0000
commit44bdd8ef8cbedef21c84d9c7eac3ba05189b653e (patch)
treeeb50e62528be2700b27a66a0801431a12d587c50 /win/CS
parent677686f70a18f5d5fbf1a49f4b6593ac955ffa1a (diff)
WinGui: Fixes to new JSON API Code, Audio and Chapter settings.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6747 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs2
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs23
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs3
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs11
4 files changed, 22 insertions, 17 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
index 17a8ba000..a7dac9fcd 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
@@ -80,6 +80,8 @@ namespace HandBrake.ApplicationServices.Utilities
InputNumber = track.Track.HasValue ? track.Track.Value : 0,
Mixdown = Converters.GetCliMixDown(track.MixDown),
SampleRateRaw = GetSampleRateRaw(track.SampleRate),
+ EncodeRateType = AudioEncodeRateType.Bitrate,
+ Name = track.TrackName
};
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 ebfee5c21..060821341 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs
@@ -114,7 +114,7 @@ namespace HandBrake.Interop.Json.Factories
ChapterList = new List<ChapterList>()
};
- if (!job.UseDefaultChapterNames)
+ if (job.UseDefaultChapterNames)
{
foreach (string item in job.CustomChapterNames)
{
@@ -278,17 +278,30 @@ namespace HandBrake.Interop.Json.Factories
AudioList audioTrack = new AudioList
{
Track = numTracks++,
- Bitrate = item.Bitrate,
- CompressionLevel = item.Compression,
DRC = item.Drc,
Encoder = encoder.Id,
Gain = item.Gain,
Mixdown = mixdown.Id,
NormalizeMixLevel = false,
- Quality = item.Quality,
- Samplerate = item.SampleRateRaw
+ Samplerate = item.SampleRateRaw,
+ Name = item.Name,
};
+ if (item.EncodeRateType == AudioEncodeRateType.Quality)
+ {
+ audioTrack.Quality = item.Quality;
+ }
+
+ if (item.EncodeRateType == AudioEncodeRateType.Compression)
+ {
+ audioTrack.CompressionLevel = item.Compression;
+ }
+
+ if (item.EncodeRateType == AudioEncodeRateType.Bitrate)
+ {
+ audioTrack.Bitrate = item.Bitrate;
+ }
+
audio.AudioList.Add(audioTrack);
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs
index dbd625604..ec04805df 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncodeRateType.cs
@@ -15,6 +15,7 @@ namespace HandBrake.Interop.Model.Encoding
public enum AudioEncodeRateType
{
Bitrate,
- Quality
+ Quality,
+ Compression
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
index 7aa211c8d..5d76a9f5d 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
@@ -37,11 +37,6 @@ namespace HandBrake.Interop.Model.Encoding
public string Encoder { get; set; }
/// <summary>
- /// Will pass through the track if it maches the codec type.
- /// </summary>
- public bool PassthroughIfPossible { get; set; }
-
- /// <summary>
/// Gets or sets the encode rate type (bitrate or quality).
/// </summary>
public AudioEncodeRateType EncodeRateType { get; set; }
@@ -67,12 +62,6 @@ namespace HandBrake.Interop.Model.Encoding
public string Mixdown { get; set; }
/// <summary>
- /// Gets or sets the sample rate. Obsolete. Use SampleRateRaw instead.
- /// </summary>
- [Obsolete("This property is ignored and only exists for backwards compatibility. Use SampleRateRaw instead.")]
- public string SampleRate { get; set; }
-
- /// <summary>
/// Gets or sets the sample rate in Hz.
/// </summary>
public int SampleRateRaw { get; set; }