summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-03-24 21:31:49 +0000
committersr55 <[email protected]>2012-03-24 21:31:49 +0000
commit654057c737c7b51f236bdc6f5100f24f3fc4f8be (patch)
treec3c42ba0c649bab1a3a393b7fcbb460b3352e5e6 /win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
parent71be55c4db11cd6e2f8ba2f2df25e030fa089644 (diff)
WinGui: (WPF) Port the Advanced Panel for x264 from VidCoder.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4536 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs129
1 files changed, 129 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index 358ebcbf5..7f7520dc4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -22,6 +22,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
+ using HandBrake.Interop.Model.Encoding.x264;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -38,6 +39,11 @@ namespace HandBrakeWPF.ViewModels
private IUserSettingService userSettingService;
/// <summary>
+ /// Backing field used to display / hide the x264 options
+ /// </summary>
+ private bool displayX264Options;
+
+ /// <summary>
/// The quality max.
/// </summary>
private int qualityMax;
@@ -78,6 +84,10 @@ namespace HandBrakeWPF.ViewModels
this.QualityMax = 51;
this.IsConstantQuantity = true;
this.VideoEncoders = EnumHelper<VideoEncoder>.GetEnumList();
+
+ //X264Presets = EnumHelper<x264Preset>.GetEnumList();
+ //X264Profiles = EnumHelper<x264Profile>.GetEnumList();
+ //X264Tunes = EnumHelper<x264Tune>.GetEnumList();
}
#endregion
@@ -432,8 +442,127 @@ namespace HandBrakeWPF.ViewModels
this.Task.VideoBitrate = preset.Task.VideoBitrate;
this.NotifyOfPropertyChange(() => this.Task);
+
+ //if (preset != null && preset.Task != null)
+ //{
+ // this.Query = preset.Task.AdvancedEncoderOptions;
+ // this.SetEncoder(preset.Task.VideoEncoder);
+
+ // this.X264Preset = preset.Task.x264Preset;
+ // this.X264Profile = preset.Task.x264Profile;
+ // this.X264Tune = preset.Task.X264Tune;
+ //}
+
}
+ /// <summary>
+ /// Set the currently selected encoder.
+ /// </summary>
+ /// <param name="encoder">
+ /// The Video Encoder.
+ /// </param>
+ public void SetEncoder(VideoEncoder encoder)
+ {
+ //this.DisplayX264Options = encoder == VideoEncoder.X264;
+ }
+
+ #endregion
+
+ #region Advanced
+ ///// <summary>
+ ///// Gets or sets State.
+ ///// </summary>
+ //public string Query
+ //{
+ // get
+ // {
+ // return this.Task.AdvancedEncoderOptions;
+ // }
+ // set
+ // {
+ // this.Task.AdvancedEncoderOptions = value;
+ // this.NotifyOfPropertyChange(() => this.Query);
+ // }
+ //}
+
+ ///// <summary>
+ ///// Gets or sets X264Preset.
+ ///// </summary>
+ //public x264Preset X264Preset
+ //{
+ // get
+ // {
+ // return this.Task.x264Preset;
+ // }
+ // set
+ // {
+ // this.Task.x264Preset = value;
+ // this.NotifyOfPropertyChange(() => this.X264Preset);
+ // }
+ //}
+
+ ///// <summary>
+ ///// Gets or sets X264Profile.
+ ///// </summary>
+ //public x264Profile X264Profile
+ //{
+ // get
+ // {
+ // return this.Task.x264Profile;
+ // }
+ // set
+ // {
+ // this.Task.x264Profile = value;
+ // this.NotifyOfPropertyChange(() => this.X264Profile);
+ // }
+ //}
+
+ ///// <summary>
+ ///// Gets or sets X264Tune.
+ ///// </summary>
+ //public x264Tune X264Tune
+ //{
+ // get
+ // {
+ // return this.Task.X264Tune;
+ // }
+ // set
+ // {
+ // this.Task.X264Tune = value;
+ // this.NotifyOfPropertyChange(() => this.X264Tune);
+ // }
+ //}
+
+ ///// <summary>
+ ///// Gets or sets X264Presets.
+ ///// </summary>
+ //public IEnumerable<x264Preset> X264Presets { get; set; }
+
+ ///// <summary>
+ ///// Gets or sets X264Profiles.
+ ///// </summary>
+ //public IEnumerable<x264Profile> X264Profiles { get; set; }
+
+ ///// <summary>
+ ///// Gets or sets X264Tunes.
+ ///// </summary>
+ //public IEnumerable<x264Tune> X264Tunes { get; set; }
+
+ ///// <summary>
+ ///// Gets or sets a value indicating whether DisplayX264Options.
+ ///// </summary>
+ //public bool DisplayX264Options
+ //{
+ // get
+ // {
+ // return this.displayX264Options;
+ // }
+ // set
+ // {
+ // this.displayX264Options = value;
+ // this.NotifyOfPropertyChange(() => this.DisplayX264Options);
+ // }
+ //}
#endregion
}
} \ No newline at end of file