diff options
author | sr55 <[email protected]> | 2018-07-08 18:23:50 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2018-07-08 18:23:50 +0100 |
commit | e3a2f723adc662f1ba5707cdeeea62449c70fd7d (patch) | |
tree | 4441e761ff13613831d0fafb93dc75747d239852 /win/CS/HandBrake.Interop | |
parent | e8c7818b83befe3a3e2fad73c61041b16d8d0055 (diff) |
WinGui: Simplify the Deinterlace / Decomb / Interlace Detection Tab and associated code. Tweak the layout of the deinterlace controls to match the Mac/Linux UI's. Pull Presets from libhb.
Diffstat (limited to 'win/CS/HandBrake.Interop')
4 files changed, 27 insertions, 90 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj index f7e9aa9b6..f279c9123 100644 --- a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj +++ b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj @@ -114,6 +114,8 @@ <Compile Include="Interop\Json\State\TaskState.cs" /> <Compile Include="Interop\Model\Encoding\CombDetect.cs" /> <Compile Include="Interop\Model\Encoding\DeinterlaceFilter.cs" /> + <Compile Include="Interop\Model\Encoding\Denoise.cs" /> + <Compile Include="Interop\Model\Encoding\Detelecine.cs" /> <Compile Include="Interop\Model\Encoding\HBPresetTune.cs" /> <Compile Include="Interop\Model\Encoding\Sharpen.cs" /> <Compile Include="Interop\Model\Preview\RawPreviewData.cs" /> @@ -136,10 +138,6 @@ <Compile Include="Interop\Model\Cropping.cs" /> <Compile Include="Interop\Model\Encoding\Anamorphic.cs" /> <Compile Include="Interop\Model\Encoding\Container.cs" /> - <Compile Include="Interop\Model\Encoding\Decomb.cs" /> - <Compile Include="Interop\Model\Encoding\Deinterlace.cs" /> - <Compile Include="Interop\Model\Encoding\Denoise.cs" /> - <Compile Include="Interop\Model\Encoding\Detelecine.cs" /> <Compile Include="Interop\Model\Encoding\HBAudioEncoder.cs" /> <Compile Include="Interop\Model\Encoding\HBContainer.cs" /> <Compile Include="Interop\Model\Encoding\HBMixdown.cs" /> diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs deleted file mode 100644 index 1fe70b421..000000000 --- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="Decomb.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 Decomb type. -// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.Interop.Interop.Model.Encoding -{ - using HandBrake.Interop.Attributes; - - /// <summary> - /// The decomb. - /// </summary> - public enum Decomb - { - [ShortName("default")] - Default, - - [ShortName("bob")] - Bob, - - [ShortName("custom")] - Custom, - - [ShortName("eedi2")] - EEDI2, - - [ShortName("eedi2bob")] - EEDI2Bob - } -} diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs deleted file mode 100644 index 07c519a35..000000000 --- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="Deinterlace.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 Deinterlace type. -// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.Interop.Interop.Model.Encoding -{ - using HandBrake.Interop.Attributes; - - /// <summary> - /// The deinterlace. - /// </summary> - public enum Deinterlace - { - [ShortName("custom")] - Custom, - - [ShortName("default")] - Default, - - [ShortName("skip-spatial")] - SkipSpatialCheck, - - [ShortName("bob")] - Bob - } -} diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs index 2954128d7..8f62b30ac 100644 --- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs +++ b/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs @@ -3,40 +3,44 @@ // 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 HBPresetTune type. +// An object represetning the key and name of a Filter Preset or Tune option. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.Interop.Interop.Model.Encoding { - /// <summary> - /// The hb preset tune. - /// </summary> public class HBPresetTune { - /// <summary> - /// Initializes a new instance of the <see cref="HBPresetTune"/> class. - /// </summary> - /// <param name="name"> - /// The name. - /// </param> - /// <param name="shortName"> - /// The short Name. - /// </param> + public HBPresetTune() + { + } + public HBPresetTune(string name, string shortName) { this.Name = name; this.ShortName = shortName; } - /// <summary> - /// Gets the name. - /// </summary> - public string Name { get; private set; } + public string Name { get; set; } + + public string ShortName { get; set; } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return this.Equals((HBPresetTune)obj); + } + + public override int GetHashCode() + { + return this.ShortName != null ? this.ShortName.GetHashCode() : 0; + } - /// <summary> - /// Gets the short name. - /// </summary> - public string ShortName { get; private set; } + protected bool Equals(HBPresetTune other) + { + return string.Equals(this.ShortName, other.ShortName); + } } } |