private bool fastDecode;\r
private bool displayTuneControls;\r
private bool displayLevelControl;\r
-\r
#endregion\r
\r
#region Constructors and Destructors\r
}\r
}\r
\r
+ /// <summary>\r
+ /// The Video Bitrate.\r
+ /// </summary>\r
+ public int? VideoBitrate\r
+ {\r
+ get\r
+ {\r
+ return this.Task.VideoBitrate;\r
+ }\r
+ set\r
+ {\r
+ if (value == this.Task.VideoBitrate)\r
+ {\r
+ return;\r
+ }\r
+ this.Task.VideoBitrate = value;\r
+ this.NotifyOfPropertyChange(() => this.VideoBitrate);\r
+ }\r
+ }\r
+\r
/// <summary>\r
/// Gets DisplayRF.\r
/// </summary>\r
{\r
get\r
{\r
- return this.fastDecode;\r
+ return this.Task.VideoTunes.Contains(VideoTune.FastDecode);\r
}\r
set\r
{\r
return;\r
}\r
this.fastDecode = value;\r
- this.NotifyOfPropertyChange(() => this.FastDecode);\r
- this.NotifyOfPropertyChange(() => FullOptionsTooltip);\r
- ResetAdvancedTab();\r
\r
// Update the encode task\r
if (value && !this.Task.VideoTunes.Contains(VideoTune.FastDecode))\r
else\r
{\r
this.Task.VideoTunes.Remove(VideoTune.FastDecode);\r
- } \r
+ }\r
+\r
+ this.NotifyOfPropertyChange(() => this.FastDecode);\r
+ this.NotifyOfPropertyChange(() => this.FullOptionsTooltip);\r
+ this.ResetAdvancedTab();\r
}\r
}\r
\r
{\r
this.Task.VideoPreset = value;\r
this.NotifyOfPropertyChange(() => this.VideoPreset);\r
- this.NotifyOfPropertyChange(() => FullOptionsTooltip);\r
- ResetAdvancedTab();\r
+ this.NotifyOfPropertyChange(() => this.FullOptionsTooltip);\r
+ this.ResetAdvancedTab();\r
}\r
}\r
\r
{\r
get\r
{\r
- return this.videoTune;\r
+ VideoTune tune = this.Task.VideoTunes.FirstOrDefault(t => !Equals(t, VideoTune.FastDecode))\r
+ ?? VideoTune.None;\r
+ return tune;\r
}\r
set\r
{\r
return;\r
}\r
this.videoTune = value;\r
- this.NotifyOfPropertyChange(() => this.VideoTune);\r
- this.NotifyOfPropertyChange(() => FullOptionsTooltip);\r
- ResetAdvancedTab();\r
\r
// Update the encode task.\r
+ bool hasFastDecode = this.Task.VideoTunes.Contains(VideoTune.FastDecode);\r
this.Task.VideoTunes.Clear();\r
if (value != null && !Equals(value, VideoTune.None))\r
{\r
this.Task.VideoTunes.Add(value);\r
}\r
\r
- if (this.FastDecode)\r
+ if (hasFastDecode)\r
{\r
this.Task.VideoTunes.Add(VideoTune.FastDecode);\r
}\r
+\r
+ this.NotifyOfPropertyChange(() => this.VideoTune);\r
+ this.NotifyOfPropertyChange(() => this.FullOptionsTooltip);\r
+ this.ResetAdvancedTab();\r
}\r
}\r
\r
{\r
this.Task.VideoProfile = value;\r
this.NotifyOfPropertyChange(() => this.VideoProfile);\r
- this.NotifyOfPropertyChange(() => FullOptionsTooltip);\r
- ResetAdvancedTab();\r
+ this.NotifyOfPropertyChange(() => this.FullOptionsTooltip);\r
+ this.ResetAdvancedTab();\r
}\r
}\r
\r
{\r
this.Task.VideoLevel = value;\r
this.NotifyOfPropertyChange(() => this.VideoLevel);\r
- this.NotifyOfPropertyChange(() => FullOptionsTooltip);\r
- ResetAdvancedTab();\r
+ this.NotifyOfPropertyChange(() => this.FullOptionsTooltip);\r
+ this.ResetAdvancedTab();\r
}\r
}\r
\r
this.Task = task;\r
this.SetRF(task.Quality);\r
\r
+ this.ShowPeakFramerate = this.IsPeakFramerate;\r
+\r
this.NotifyOfPropertyChange(() => this.IsConstantFramerate);\r
this.NotifyOfPropertyChange(() => this.IsConstantQuantity);\r
this.NotifyOfPropertyChange(() => this.IsPeakFramerate);\r
this.NotifyOfPropertyChange(() => this.RF);\r
this.NotifyOfPropertyChange(() => this.DisplayRF);\r
this.NotifyOfPropertyChange(() => this.IsLossless);\r
- this.NotifyOfPropertyChange(() => this.Task.VideoBitrate);\r
+ this.NotifyOfPropertyChange(() => this.VideoBitrate);\r
this.NotifyOfPropertyChange(() => this.Task.Quality);\r
this.NotifyOfPropertyChange(() => this.Task.TwoPass);\r
this.NotifyOfPropertyChange(() => this.Task.TurboFirstPass);\r
-\r
this.NotifyOfPropertyChange(() => this.VideoTune);\r
this.NotifyOfPropertyChange(() => this.VideoProfile);\r
- this.NotifyOfPropertyChange(() => this.VideoProfile);\r
+ this.NotifyOfPropertyChange(() => this.VideoPreset);\r
this.NotifyOfPropertyChange(() => this.VideoLevel);\r
this.NotifyOfPropertyChange(() => this.FastDecode);\r
this.NotifyOfPropertyChange(() => this.ExtraArguments);\r
+\r
+ HBVideoEncoder encoder = HandBrakeEncoderHelpers.VideoEncoders.FirstOrDefault(s => s.ShortName == EnumHelper<VideoEncoder>.GetShortName(this.SelectedVideoEncoder));\r
+ if (encoder != null && this.VideoPreset != null)\r
+ {\r
+ int index = encoder.Presets.IndexOf(this.VideoPreset.ShortName);\r
+ this.VideoPresetValue = index;\r
+ } \r
}\r
\r
/// <summary>\r