// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // The Audio View Model // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrakeWPF.ViewModels { using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.Composition; using System.Linq; using Caliburn.Micro; using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services.Interfaces; using HandBrake.Interop.Model.Encoding; using HandBrakeWPF.ViewModels.Interfaces; /// /// The Audio View Model /// [Export(typeof(IAudioViewModel))] public class AudioViewModel : ViewModelBase, IAudioViewModel { /// /// Initializes a new instance of the class. /// /// /// The window manager. /// /// /// The user Setting Service. /// public AudioViewModel(IWindowManager windowManager, IUserSettingService userSettingService) { this.AudioTracks = new ObservableCollection(); this.SampleRates = new ObservableCollection { "Auto", "48", "44.1", "32", "24", "22.05" }; this.AudioBitrates = this.GetAppropiateBitrates(AudioEncoder.ffaac, Mixdown.DolbyProLogicII); this.AudioEncoders = EnumHelper.GetEnumList(); this.AudioMixdowns = EnumHelper.GetEnumList(); } /// /// Gets or sets AudioTracks. /// public ObservableCollection AudioTracks { get; set; } /// /// Gets or sets SourceTracks. /// public IEnumerable