summaryrefslogtreecommitdiffstats
path: root/win/C#/HandBrake.ApplicationServices/Model
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-02-05 21:37:49 +0000
committersr55 <[email protected]>2011-02-05 21:37:49 +0000
commitc315f3cf228d84ab67c75c7f8fa7221379e88600 (patch)
treed52ef3b6b3aeb67a3628ef05fb6e318d90537641 /win/C#/HandBrake.ApplicationServices/Model
parent07bbd251a183b251d668ea44de1cc122221c7bd5 (diff)
WinGui:
- Another round of refactoring. Query Parsing and Plist handling code moved to application services utilities namespace. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3781 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Model')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs65
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs53
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs1
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs17
-rw-r--r--win/C#/HandBrake.ApplicationServices/Model/Encoding/VideoEncodeRateMode.cs (renamed from win/C#/HandBrake.ApplicationServices/Model/Encoding/VideoEncodeMode.cs)4
5 files changed, 105 insertions, 35 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs
index a735902c1..8b561f496 100644
--- a/win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/EncodeTask.cs
@@ -19,6 +19,7 @@ namespace HandBrake.ApplicationServices.Model
/// </summary>
public EncodeTask()
{
+ this.Cropping = new Cropping();
}
#region Source
@@ -124,7 +125,7 @@ namespace HandBrake.ApplicationServices.Model
/// <summary>
/// Gets or sets DisplayWidth.
/// </summary>
- public int DisplayWidth { get; set; }
+ public double DisplayWidth { get; set; }
/// <summary>
/// Gets or sets a value indicating whether KeepDisplayAspect.
@@ -205,22 +206,32 @@ namespace HandBrake.ApplicationServices.Model
/// <summary>
/// Gets or sets VideoEncodeRateType.
/// </summary>
- public VideoEncodeMode VideoEncodeRateType { get; set; }
+ public VideoEncodeRateMode VideoEncodeRateType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the VideoEncoder
+ /// </summary>
+ public VideoEncoder VideoEncoder { get; set; }
+
+ /// <summary>
+ /// Gets or sets the Video Encode Mode
+ /// </summary>
+ public FramerateMode FramerateMode { get; set; }
/// <summary>
/// Gets or sets Quality.
/// </summary>
- public double Quality { get; set; }
+ public double? Quality { get; set; }
/// <summary>
/// Gets or sets TargetSize.
/// </summary>
- public int TargetSize { get; set; }
+ public int? TargetSize { get; set; }
/// <summary>
/// Gets or sets VideoBitrate.
/// </summary>
- public int VideoBitrate { get; set; }
+ public int? VideoBitrate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether TwoPass.
@@ -238,11 +249,6 @@ namespace HandBrake.ApplicationServices.Model
/// </summary>
public double? Framerate { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether PeakFramerate.
- /// </summary>
- public bool PeakFramerate { get; set; }
-
#endregion
#region Audio
@@ -281,6 +287,45 @@ namespace HandBrake.ApplicationServices.Model
/// Gets or sets X264Options.
/// </summary>
public string X264Options { get; set; }
+
+ #endregion
+
+ #region Preset Information (TODO This should probably be dropped)
+
+ /// <summary>
+ /// Gets or sets PresetBuildNumber.
+ /// </summary>
+ public int PresetBuildNumber { get; set; }
+
+ /// <summary>
+ /// Gets or sets PresetDescription.
+ /// </summary>
+ public string PresetDescription { get; set; }
+
+ /// <summary>
+ /// Gets or sets PresetName.
+ /// </summary>
+ public string PresetName { get; set; }
+
+ /// <summary>
+ /// Gets or sets Type.
+ /// </summary>
+ public string Type { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether UsesMaxPictureSettings.
+ /// </summary>
+ public bool UsesMaxPictureSettings { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether UsesPictureFilters.
+ /// </summary>
+ public bool UsesPictureFilters { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether UsesPictureSettings.
+ /// </summary>
+ public bool UsesPictureSettings { get; set; }
#endregion
}
}
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs b/win/C#/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs
index 81d665ed4..2ec98aaca 100644
--- a/win/C#/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs
@@ -11,6 +11,36 @@ namespace HandBrake.ApplicationServices.Model.Encoding
public class Cropping
{
/// <summary>
+ /// Initializes a new instance of the <see cref="Cropping"/> class.
+ /// </summary>
+ public Cropping()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Cropping"/> class.
+ /// </summary>
+ /// <param name="top">
+ /// The Top Value
+ /// </param>
+ /// <param name="bottom">
+ /// The Bottom Value
+ /// </param>
+ /// <param name="left">
+ /// The Left Value
+ /// </param>
+ /// <param name="right">
+ /// The Right Value
+ /// </param>
+ public Cropping(int top, int bottom, int left, int right)
+ {
+ this.Top = top;
+ this.Bottom = bottom;
+ this.Left = left;
+ this.Right = right;
+ }
+
+ /// <summary>
/// Gets or sets Top.
/// </summary>
public int Top { get; set; }
@@ -29,28 +59,5 @@ namespace HandBrake.ApplicationServices.Model.Encoding
/// Gets or sets Right.
/// </summary>
public int Right { get; set; }
-
- /// <summary>
- /// Create a cropping object
- /// </summary>
- /// <param name="top">
- /// The top.
- /// </param>
- /// <param name="bottom">
- /// The bottom.
- /// </param>
- /// <param name="left">
- /// The left.
- /// </param>
- /// <param name="right">
- /// The right.
- /// </param>
- /// <returns>
- /// A Cropping object
- /// </returns>
- public static Cropping CreateCroppingObject(int top, int bottom, int left, int right)
- {
- return new Cropping { Top = top, Bottom = bottom, Left = left, Right = right };
- }
}
}
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs b/win/C#/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs
index 154428987..38dadd04e 100644
--- a/win/C#/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs
@@ -14,6 +14,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
Fast,
Slow,
Slower,
+ Slowest,
Custom
}
}
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs b/win/C#/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs
new file mode 100644
index 000000000..508e63ced
--- /dev/null
+++ b/win/C#/HandBrake.ApplicationServices/Model/Encoding/FramerateMode.cs
@@ -0,0 +1,17 @@
+/* VideoEncoderMode.cs $
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Model.Encoding
+{
+ /// <summary>
+ /// The Mode of Video Encoding. CFR, VFR, PFR
+ /// </summary>
+ public enum FramerateMode
+ {
+ CFR = 0,
+ PFR,
+ VFR
+ }
+}
diff --git a/win/C#/HandBrake.ApplicationServices/Model/Encoding/VideoEncodeMode.cs b/win/C#/HandBrake.ApplicationServices/Model/Encoding/VideoEncodeRateMode.cs
index cf42f3ca6..636d7829d 100644
--- a/win/C#/HandBrake.ApplicationServices/Model/Encoding/VideoEncodeMode.cs
+++ b/win/C#/HandBrake.ApplicationServices/Model/Encoding/VideoEncodeRateMode.cs
@@ -1,4 +1,4 @@
-/* VideoEncoderMode.cs $
+/* VideoEncoderRateMode.cs $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
@@ -8,7 +8,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
/// <summary>
/// The Mode of Video Encoding. Bitrate, Filesize or Quality
/// </summary>
- public enum VideoEncodeMode
+ public enum VideoEncodeRateMode
{
TargetSize = 0,
AverageBitrate,