diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
4 files changed, 23 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs index e43f64c16..a79902099 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs @@ -31,8 +31,6 @@ namespace HandBrakeWPF.ViewModels private AudioBehaviours audioBehaviours; private EncodeTask task; - private AudioEncoder audioEncoderFallback; - #region Constructors and Destructors /// <summary> @@ -299,7 +297,7 @@ namespace HandBrakeWPF.ViewModels } set { - if (value == this.audioEncoderFallback) + if (value == this.Task.AllowedPassthruOptions.AudioEncoderFallback) { return; } @@ -425,6 +423,20 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.AudioEncoderFallback); } + /// <summary> + /// The refresh task. + /// </summary> + public void RefreshTask() + { + this.NotifyOfPropertyChange(() => this.Task); + + if (this.Task.OutputFormat == OutputFormat.Mp4 && + (this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis)) + { + this.AudioEncoderFallback = AudioEncoder.ffaac; + } + } + #endregion } }
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index d15368c00..24be6857a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -28,7 +28,6 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
- using AllowedPassthru = HandBrakeWPF.Services.Encode.Model.Models.AllowedPassthru;
using AudioEncoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder;
using AudioTrack = HandBrakeWPF.Services.Encode.Model.Models.AudioTrack;
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
@@ -248,6 +247,8 @@ namespace HandBrakeWPF.ViewModels track.Encoder = AudioEncoder.ffaac;
}
}
+
+ this.AudioDefaultsViewModel.RefreshTask();
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs index a34bc82f9..e9e31d0ab 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs @@ -33,5 +33,10 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// The task.
/// </param>
void Setup(Preset preset, EncodeTask task);
+
+ /// <summary>
+ /// The refresh task.
+ /// </summary>
+ void RefreshTask();
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index bcccab989..25a00d822 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -1307,7 +1307,7 @@ namespace HandBrakeWPF.ViewModels this.DisplayOptimiseOptions = this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X264_10 || this.SelectedVideoEncoder == VideoEncoder.X265 || this.SelectedVideoEncoder == VideoEncoder.X265_10 || this.SelectedVideoEncoder == VideoEncoder.X265_12
|| this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
this.DisplayNonQSVControls = this.SelectedVideoEncoder != VideoEncoder.QuickSync && this.SelectedVideoEncoder != VideoEncoder.QuickSyncH265;
- this.DisplayTurboFirstPass = selectedEncoder == VideoEncoder.X264 || selectedEncoder == VideoEncoder.X264_10;
+ this.DisplayTurboFirstPass = selectedEncoder == VideoEncoder.X264 || selectedEncoder == VideoEncoder.X264_10 || selectedEncoder == VideoEncoder.X265 || selectedEncoder == VideoEncoder.X265_10 || selectedEncoder == VideoEncoder.X265_12;
this.DisplayTuneControls = SelectedVideoEncoder == VideoEncoder.X264 || SelectedVideoEncoder == VideoEncoder.X264_10 || SelectedVideoEncoder == VideoEncoder.X265 || SelectedVideoEncoder == VideoEncoder.X265_10 || SelectedVideoEncoder == VideoEncoder.X265_12;
this.DisplayLevelControl = SelectedVideoEncoder == VideoEncoder.X264 || SelectedVideoEncoder == VideoEncoder.X264_10 || this.SelectedVideoEncoder == VideoEncoder.QuickSync || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
|