diff options
author | sr55 <[email protected]> | 2015-06-20 15:10:14 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-06-20 15:10:14 +0000 |
commit | 9192276e8bfde8ac2ce798edf677be141ad5e9b5 (patch) | |
tree | 011560f3b9441bc6b0c6089c67bb1d5270514954 /win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs | |
parent | 726ce9731952489d69c312daf6a5ec0744f0061d (diff) |
WinGui: Fetch Audio Bitrates, Bitrate Defaults, Samplerates from LibHB
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7305 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index 75adf94be..be7c2bb0e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -16,6 +16,7 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
+ using HandBrake.ApplicationServices.Interop;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Services.Encode.Model.Models;
@@ -72,7 +73,13 @@ namespace HandBrakeWPF.ViewModels public AudioViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
{
this.Task = new EncodeTask();
- this.SampleRates = new ObservableCollection<string> { "Auto", "48", "44.1", "32", "24", "22.05", "16", "12", "11.025", "8" };
+
+ this.SampleRates = new ObservableCollection<string> { "Auto" };
+ foreach (var item in HandBrakeEncoderHelpers.AudioSampleRates)
+ {
+ this.SampleRates.Add(item.Name);
+ }
+
this.AudioEncoders = EnumHelper<AudioEncoder>.GetEnumList();
this.AudioMixdowns = EnumHelper<Mixdown>.GetEnumList();
this.SourceTracks = new List<Audio>();
@@ -148,7 +155,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Gets or sets SampleRates.
/// </summary>
- public IEnumerable<string> SampleRates { get; set; }
+ public IList<string> SampleRates { get; set; }
/// <summary>
/// Gets or sets SourceTracks.
|