summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/Encode
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Encode')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
index 53b162f87..8e21820c2 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
@@ -20,6 +20,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.Model.Audio;
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.Utilities;
@@ -94,6 +95,25 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
this.SetupLimits();
}
+ /// <summary>
+ /// Create a track from a behaviour track.
+ /// </summary>
+ /// <param name="track">The Behavior track</param>
+ public AudioTrack(AudioBehaviourTrack track)
+ {
+ this.drc = track.DRC;
+ this.encoder = track.Encoder;
+ this.gain = track.Gain;
+ this.mixDown = track.MixDown != null ? track.MixDown.ShortName : "dpl2";
+ this.sampleRate = track.SampleRate;
+ this.scannedTrack = new Audio();
+ this.encoderRateType = track.EncoderRateType;
+ this.quality = track.Quality;
+ this.bitrate = track.Bitrate;
+
+ this.SetupLimits();
+ }
+
#region Track Properties
/// <summary>