summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/Model
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-02-23 15:43:16 +0000
committersr55 <[email protected]>2014-02-23 15:43:16 +0000
commit71c53a04fc0d43fee4ee024f854ebc6783234fd2 (patch)
tree38f3ed0d47fb7dc388999dfdb554334827d45337 /win/CS/HandBrake.Interop/HandBrakeInterop/Model
parentb29ad15acd51f7fc869f7bac9d77d7540e143740 (diff)
WinGui: x265 UI patch by Zhang Zhigiang.
This enables support for the x265 encoder from the GUI when paired with a build of HandBrake that has x265 enabled. Thanks git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6062 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Model')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs162
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs6
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Preset.cs49
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Profile.cs31
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Tune.cs28
5 files changed, 204 insertions, 72 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs
index f37766281..c1947745b 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs
@@ -11,20 +11,20 @@ namespace HandBrake.Interop.Model.Encoding
{
using System.Collections.Generic;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Model;
/// <summary>
/// The encoding profile.
/// </summary>
public class EncodingProfile
- {
+ {
/// <summary>
/// Initializes a new instance of the <see cref="EncodingProfile"/> class.
/// </summary>
public EncodingProfile()
- {
- this.Cropping = new Cropping();
- }
+ {
+ this.Cropping = new Cropping();
+ }
#region Destination and Output Settings
@@ -213,6 +213,26 @@ namespace HandBrake.Interop.Model.Encoding
public List<string> X264Tunes { get; set; }
/// <summary>
+ /// Gets or sets the x 265 profile.
+ /// </summary>
+ public string X265Profile { get; set; }
+
+ /// <summary>
+ /// Gets or sets the x 265 preset.
+ /// </summary>
+ public string X265Preset { get; set; }
+
+ /// <summary>
+ /// Gets or sets the x 265 tunes.
+ /// </summary>
+ public List<string> X265Tunes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the x 265 level.
+ /// </summary>
+ public List<string> X265Level { get; set; }
+
+ /// <summary>
/// Gets or sets the qsv preset.
/// </summary>
public string QsvPreset { get; set; }
@@ -282,70 +302,70 @@ namespace HandBrake.Interop.Model.Encoding
#endregion
/// <summary>
- /// The clone.
- /// </summary>
- /// <returns>
- /// The <see cref="EncodingProfile"/>.
- /// </returns>
- public EncodingProfile Clone()
- {
- var profile = new EncodingProfile
- {
- ContainerName = this.ContainerName,
- PreferredExtension = this.PreferredExtension,
- IncludeChapterMarkers = this.IncludeChapterMarkers,
- LargeFile = this.LargeFile,
- Optimize = this.Optimize,
- IPod5GSupport = this.IPod5GSupport,
-
- Width = this.Width,
- Height = this.Height,
- MaxWidth = this.MaxWidth,
- MaxHeight = this.MaxHeight,
- ScaleMethod = this.ScaleMethod,
- CroppingType = this.CroppingType,
- Cropping = this.Cropping.Clone(),
- Anamorphic = this.Anamorphic,
- UseDisplayWidth = this.UseDisplayWidth,
- DisplayWidth = this.DisplayWidth,
- KeepDisplayAspect = this.KeepDisplayAspect,
- PixelAspectX = this.PixelAspectX,
- PixelAspectY = this.PixelAspectY,
- Modulus = this.Modulus,
-
- Deinterlace = this.Deinterlace,
- CustomDeinterlace = this.CustomDeinterlace,
- Decomb = this.Decomb,
- CustomDecomb = this.CustomDecomb,
- Detelecine = this.Detelecine,
- CustomDetelecine = this.CustomDetelecine,
- Denoise = this.Denoise,
- CustomDenoise = this.CustomDenoise,
- Deblock = this.Deblock,
- Grayscale = this.Grayscale,
-
- VideoEncoder = this.VideoEncoder,
- X264Options = this.X264Options,
- X264Profile = this.X264Profile,
- X264Preset = this.X264Preset,
- X264Tunes = this.X264Tunes,
- QsvPreset = this.QsvPreset,
- QsvDecode = this.QsvDecode,
- H264Level = this.H264Level,
- VideoEncodeRateType = this.VideoEncodeRateType,
- Quality = this.Quality,
- TargetSize = this.TargetSize,
- VideoBitrate = this.VideoBitrate,
- TwoPass = this.TwoPass,
- TurboFirstPass = this.TurboFirstPass,
- Framerate = this.Framerate,
- ConstantFramerate = this.ConstantFramerate,
-
- AudioEncodings = new List<AudioEncoding>(this.AudioEncodings),
- AudioEncoderFallback = this.AudioEncoderFallback
- };
-
- return profile;
- }
- }
+ /// The clone.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="EncodingProfile"/>.
+ /// </returns>
+ public EncodingProfile Clone()
+ {
+ var profile = new EncodingProfile
+ {
+ ContainerName = this.ContainerName,
+ PreferredExtension = this.PreferredExtension,
+ IncludeChapterMarkers = this.IncludeChapterMarkers,
+ LargeFile = this.LargeFile,
+ Optimize = this.Optimize,
+ IPod5GSupport = this.IPod5GSupport,
+
+ Width = this.Width,
+ Height = this.Height,
+ MaxWidth = this.MaxWidth,
+ MaxHeight = this.MaxHeight,
+ ScaleMethod = this.ScaleMethod,
+ CroppingType = this.CroppingType,
+ Cropping = this.Cropping.Clone(),
+ Anamorphic = this.Anamorphic,
+ UseDisplayWidth = this.UseDisplayWidth,
+ DisplayWidth = this.DisplayWidth,
+ KeepDisplayAspect = this.KeepDisplayAspect,
+ PixelAspectX = this.PixelAspectX,
+ PixelAspectY = this.PixelAspectY,
+ Modulus = this.Modulus,
+
+ Deinterlace = this.Deinterlace,
+ CustomDeinterlace = this.CustomDeinterlace,
+ Decomb = this.Decomb,
+ CustomDecomb = this.CustomDecomb,
+ Detelecine = this.Detelecine,
+ CustomDetelecine = this.CustomDetelecine,
+ Denoise = this.Denoise,
+ CustomDenoise = this.CustomDenoise,
+ Deblock = this.Deblock,
+ Grayscale = this.Grayscale,
+
+ VideoEncoder = this.VideoEncoder,
+ X264Options = this.X264Options,
+ X264Profile = this.X264Profile,
+ X264Preset = this.X264Preset,
+ X264Tunes = this.X264Tunes,
+ QsvPreset = this.QsvPreset,
+ QsvDecode = this.QsvDecode,
+ H264Level = this.H264Level,
+ VideoEncodeRateType = this.VideoEncodeRateType,
+ Quality = this.Quality,
+ TargetSize = this.TargetSize,
+ VideoBitrate = this.VideoBitrate,
+ TwoPass = this.TwoPass,
+ TurboFirstPass = this.TurboFirstPass,
+ Framerate = this.Framerate,
+ ConstantFramerate = this.ConstantFramerate,
+
+ AudioEncodings = new List<AudioEncoding>(this.AudioEncodings),
+ AudioEncoderFallback = this.AudioEncoderFallback
+ };
+
+ return profile;
+ }
+ }
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs
index b355d5038..7e30009b7 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/VideoEncoder.cs
@@ -35,6 +35,10 @@ namespace HandBrake.Interop.Model.Encoding
[Display(Name = "VP3 (Theora)")]
[ShortName("theora")]
- Theora
+ Theora,
+
+ [Display(Name = "H.265 (x265)")]
+ [ShortName("hvec")]
+ X265
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Preset.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Preset.cs
new file mode 100644
index 000000000..f8ec669d5
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Preset.cs
@@ -0,0 +1,49 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="x265Preset.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the x265Preset type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding.x265
+{
+ using System.ComponentModel.DataAnnotations;
+
+ /// <summary>
+ /// The X265 Preset
+ /// </summary>
+ public enum x265Preset
+ {
+ [Display(Name = "Ultrafast")]
+ Ultrafast,
+
+ [Display(Name = "Super Fast")]
+ Superfast,
+
+ [Display(Name = "Very Fast")]
+ VeryFast,
+
+ [Display(Name = "Faster")]
+ Faster,
+
+ [Display(Name = "Fast")]
+ Fast,
+
+ [Display(Name = "Medium")]
+ Medium,
+
+ [Display(Name = "Slow")]
+ Slow,
+
+ [Display(Name = "Slower")]
+ Slower,
+
+ [Display(Name = "Very Slow")]
+ VerySlow,
+
+ [Display(Name = "Placebo")]
+ Placebo,
+ }
+} \ No newline at end of file
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Profile.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Profile.cs
new file mode 100644
index 000000000..8d3aab3da
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Profile.cs
@@ -0,0 +1,31 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="x265Profile.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The X265 Profile
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding.x265
+{
+ using System.ComponentModel.DataAnnotations;
+
+ /// <summary>
+ /// The X265 Profile
+ /// </summary>
+ public enum x265Profile
+ {
+ [Display(Name = "Auto")]
+ None = 0,
+
+ [Display(Name = "Main")]
+ Main,
+
+ [Display(Name = "Main10")]
+ Main10,
+
+ [Display(Name = "Mainstillpicture")]
+ Mainstillpicture,
+ }
+} \ No newline at end of file
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Tune.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Tune.cs
new file mode 100644
index 000000000..03d762359
--- /dev/null
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/x265/x265Tune.cs
@@ -0,0 +1,28 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="x265Tune.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the x265Tune type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model.Encoding.x265
+{
+ using System.ComponentModel.DataAnnotations;
+
+ /// <summary>
+ /// The X265 Tune MOdel
+ /// </summary>
+ public enum x265Tune
+ {
+ [Display(Name = "None")]
+ None = 0,
+
+ [Display(Name = "PSNR")]
+ Psnr,
+
+ [Display(Name = "SSIM")]
+ Ssim,
+ }
+} \ No newline at end of file