summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Model/Audio
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-05-26 20:30:10 +0000
committersr55 <[email protected]>2015-05-26 20:30:10 +0000
commit3ca17e6454929d52b65a6e712cb6a99d9e26c2de (patch)
tree52a4d8aafeffb787f6f17881a900687e61f88de7 /win/CS/HandBrakeWPF/Model/Audio
parent6f6f447ca0b5453964d9f6c94cffed4a81e8d184 (diff)
WinGui: Adding new dropdown to the Configure Audio Options. The new "Track Setting Default Behaviour" allows the choice of what settings are used for automatically added tracks.
1. All Preset tracks are cloned for each of the added languages tracks. 2. The first preset track is cloned for each of the added languages tracks. 3. Default 160kbit DPL2 AAC audio track for each of the added languages tracks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7228 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Model/Audio')
-rw-r--r--win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs28
-rw-r--r--win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs28
2 files changed, 55 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
index 6ffd45db1..8e12460b2 100644
--- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
+++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviours.cs
@@ -11,6 +11,7 @@ namespace HandBrakeWPF.Model.Audio
{
using System.ComponentModel;
using System.Linq;
+ using System.Windows.Media.Animation;
using Caliburn.Micro;
@@ -29,12 +30,15 @@ namespace HandBrakeWPF.Model.Audio
/// </summary>
private BindingList<string> selectedLangauges;
+ private AudioTrackDefaultsMode trackDefaultBehaviour;
+
/// <summary>
/// Initializes a new instance of the <see cref="AudioBehaviours"/> class.
/// </summary>
public AudioBehaviours()
{
this.SelectedBehaviour = AudioBehaviourModes.None;
+ this.SelectedTrackDefaultBehaviour = AudioTrackDefaultsMode.FirstTrack;
this.SelectedLangauges = new BindingList<string>();
}
@@ -47,6 +51,7 @@ namespace HandBrakeWPF.Model.Audio
public AudioBehaviours(AudioBehaviours behaviours)
{
this.SelectedBehaviour = behaviours.SelectedBehaviour;
+ this.SelectedTrackDefaultBehaviour = behaviours.SelectedTrackDefaultBehaviour;
this.SelectedLangauges = new BindingList<string>(behaviours.selectedLangauges.ToList());
}
@@ -72,6 +77,26 @@ namespace HandBrakeWPF.Model.Audio
}
/// <summary>
+ /// Gets or sets the track default behaviour.
+ /// </summary>
+ public AudioTrackDefaultsMode SelectedTrackDefaultBehaviour
+ {
+ get
+ {
+ return this.trackDefaultBehaviour;
+ }
+ set
+ {
+ if (value == this.trackDefaultBehaviour)
+ {
+ return;
+ }
+ this.trackDefaultBehaviour = value;
+ this.NotifyOfPropertyChange(() => this.SelectedTrackDefaultBehaviour);
+ }
+ }
+
+ /// <summary>
/// Gets or sets the selected langauges.
/// </summary>
public BindingList<string> SelectedLangauges
@@ -102,7 +127,8 @@ namespace HandBrakeWPF.Model.Audio
AudioBehaviours cloned = new AudioBehaviours
{
SelectedBehaviour = this.selectedBehaviour,
- SelectedLangauges = new BindingList<string>()
+ SelectedLangauges = new BindingList<string>(),
+ SelectedTrackDefaultBehaviour = this.SelectedTrackDefaultBehaviour
};
foreach (var item in this.SelectedLangauges)
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs
new file mode 100644
index 000000000..42f8770cf
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Model/Audio/AudioTrackDefaultsMode.cs
@@ -0,0 +1,28 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioTrackDefaultsMode.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The audio track defaults mode.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Model.Audio
+{
+ using System.ComponentModel.DataAnnotations;
+
+ /// <summary>
+ /// The audio behaviours.
+ /// </summary>
+ public enum AudioTrackDefaultsMode
+ {
+ [Display(Name = "Default")]
+ None = 0,
+
+ [Display(Name = "Use First Track as template")]
+ FirstTrack,
+
+ [Display(Name = "Use All Tracks as templates")]
+ AllTracks,
+ }
+}