diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
13 files changed, 29 insertions, 228 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs index 8485480fc..2b6980466 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs @@ -13,10 +13,6 @@ namespace HandBrake.ApplicationServices.Functions using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
- using Decomb = HandBrake.ApplicationServices.Model.Encoding.Decomb;
- using Deinterlace = HandBrake.ApplicationServices.Model.Encoding.Deinterlace;
- using Denoise = HandBrake.ApplicationServices.Model.Encoding.Denoise;
- using Detelecine = HandBrake.ApplicationServices.Model.Encoding.Detelecine;
using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;
using VideoEncoder = HandBrake.ApplicationServices.Model.Encoding.VideoEncoder;
@@ -103,74 +99,10 @@ namespace HandBrake.ApplicationServices.Functions profile.CustomDenoise = work.CustomDenoise;
profile.CustomDetelecine = work.CustomDetelecine;
profile.Deblock = work.Deblock;
- switch (work.Decomb)
- {
- case Decomb.Default:
- profile.Decomb = Interop.Model.Encoding.Decomb.Default;
- break;
- case Decomb.Custom:
- profile.Decomb = Interop.Model.Encoding.Decomb.Custom;
- break;
- case Decomb.Off:
- profile.Decomb = Interop.Model.Encoding.Decomb.Off;
- break;
- }
-
- switch (work.Deinterlace)
- {
- case Deinterlace.Fast:
- profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Fast;
- break;
- case Deinterlace.Slow:
- profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Slow;
- break;
- case Deinterlace.Slower:
- profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Slower;
- break;
- case Deinterlace.Slowest:
- profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Slower;
- break;
- case Deinterlace.Custom:
- profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Custom;
- break;
- case Deinterlace.Off:
- profile.Deinterlace = Interop.Model.Encoding.Deinterlace.Off;
- break;
- }
-
-
- switch (work.Denoise)
- {
- case Denoise.Off:
- profile.Denoise = Interop.Model.Encoding.Denoise.Off;
- break;
- case Denoise.Custom:
- profile.Denoise = Interop.Model.Encoding.Denoise.Custom;
- break;
- case Denoise.Strong:
- profile.Denoise = Interop.Model.Encoding.Denoise.Strong;
- break;
- case Denoise.Medium:
- profile.Denoise = Interop.Model.Encoding.Denoise.Medium;
- break;
- case Denoise.Weak:
- profile.Denoise = Interop.Model.Encoding.Denoise.Weak;
- break;
- }
-
- switch (work.Detelecine)
- {
- case Detelecine.Default:
- profile.Detelecine = Interop.Model.Encoding.Detelecine.Default;
- break;
- case Detelecine.Custom:
- profile.Detelecine = Interop.Model.Encoding.Detelecine.Custom;
- break;
- case Detelecine.Off:
- profile.Detelecine = Interop.Model.Encoding.Detelecine.Off;
- break;
- }
-
+ profile.Decomb = work.Decomb;
+ profile.Deinterlace = work.Deinterlace;
+ profile.Denoise = work.Denoise;
+ profile.Detelecine = work.Detelecine;
profile.DisplayWidth = work.DisplayWidth.HasValue
? int.Parse(Math.Round(work.DisplayWidth.Value, 0).ToString())
: 0;
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index c84e3d40b..4b27081e5 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -103,12 +103,7 @@ <Compile Include="Model\Encoding\FramerateMode.cs" />
<Compile Include="Model\Encoding\Mixdown.cs" />
<Compile Include="Model\Encoding\PointToPointMode.cs" />
- <Compile Include="Model\Encoding\Cropping.cs" />
<Compile Include="Model\EncodeTask.cs" />
- <Compile Include="Model\Encoding\Decomb.cs" />
- <Compile Include="Model\Encoding\Deinterlace.cs" />
- <Compile Include="Model\Encoding\Denoise.cs" />
- <Compile Include="Model\Encoding\Detelecine.cs" />
<Compile Include="Model\Encoding\OutputFormat.cs" />
<Compile Include="Model\Encoding\SubtitleTrack.cs" />
<Compile Include="Model\Encoding\VideoEncoder.cs" />
@@ -184,6 +179,7 @@ <ProjectReference Include="..\HandBrake.Interop\HandBrakeInterop\HandBrakeInterop.csproj">
<Project>{F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}</Project>
<Name>HandBrakeInterop</Name>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index 1c1e2ef60..0098ca62b 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -8,6 +8,12 @@ namespace HandBrake.ApplicationServices.Model using System.Collections.Generic;
using HandBrake.ApplicationServices.Model.Encoding;
+ using HandBrake.Interop.Model;
+ using HandBrake.Interop.Model.Encoding;
+
+ using Anamorphic = HandBrake.ApplicationServices.Model.Encoding.Anamorphic;
+ using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;
+ using VideoEncoder = HandBrake.ApplicationServices.Model.Encoding.VideoEncoder;
/// <summary>
/// An Encode Task
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs deleted file mode 100644 index 2ec98aaca..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Cropping.cs +++ /dev/null @@ -1,63 +0,0 @@ -/* Cropping.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>
- /// Cropping T B L R
- /// </summary>
- 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; }
-
- /// <summary>
- /// Gets or sets Bottom.
- /// </summary>
- public int Bottom { get; set; }
-
- /// <summary>
- /// Gets or sets Left.
- /// </summary>
- public int Left { get; set; }
-
- /// <summary>
- /// Gets or sets Right.
- /// </summary>
- public int Right { get; set; }
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Decomb.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/Decomb.cs deleted file mode 100644 index ae8b8a3d4..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Decomb.cs +++ /dev/null @@ -1,17 +0,0 @@ -/* Decomb.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>
- /// Decomb Mode
- /// </summary>
- public enum Decomb
- {
- Off = 0,
- Default,
- Custom
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs deleted file mode 100644 index 38dadd04e..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Deinterlace.cs +++ /dev/null @@ -1,20 +0,0 @@ -/* Deinterlace.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 Deinterlace Filter
- /// </summary>
- public enum Deinterlace
- {
- Off = 0,
- Fast,
- Slow,
- Slower,
- Slowest,
- Custom
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Denoise.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/Denoise.cs deleted file mode 100644 index fc81e9f20..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Denoise.cs +++ /dev/null @@ -1,19 +0,0 @@ -/* Denoise.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 Denose Filters
- /// </summary>
- public enum Denoise
- {
- Off = 0,
- Weak,
- Medium,
- Strong,
- Custom
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Detelecine.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/Detelecine.cs deleted file mode 100644 index 09c948dbd..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Detelecine.cs +++ /dev/null @@ -1,17 +0,0 @@ -/* Detelecine.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>
- /// Detelecine Filter
- /// </summary>
- public enum Detelecine
- {
- Off = 0,
- Default,
- Custom
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs index 18dd02f51..9b7146512 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs @@ -7,13 +7,15 @@ namespace HandBrake.ApplicationServices.Parsing {
using System;
using System.Collections.Generic;
- using System.Drawing;
using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
+ using HandBrake.Interop.Model;
+
+ using Size = System.Drawing.Size;
/// <summary>
/// An object that represents a single Title of a DVD
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 2ee0c172e..854a561bd 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -15,9 +15,9 @@ namespace HandBrake.ApplicationServices.Services using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop;
+ using HandBrake.Interop.Model;
using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio;
- using Cropping = HandBrake.ApplicationServices.Model.Encoding.Cropping;
using ScanProgressEventArgs = HandBrake.Interop.ScanProgressEventArgs;
using Size = System.Drawing.Size;
@@ -283,12 +283,7 @@ namespace HandBrake.ApplicationServices.Services AspectRatio = title.AspectRatio,
AngleCount = title.AngleCount,
ParVal = new Size(title.ParVal.Width, title.ParVal.Height),
- AutoCropDimensions =
- new Cropping(
- title.AutoCropDimensions.Top,
- title.AutoCropDimensions.Bottom,
- title.AutoCropDimensions.Left,
- title.AutoCropDimensions.Right),
+ AutoCropDimensions = title.AutoCropDimensions,
Fps = title.Framerate
};
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index 7e17614f2..91d474ab1 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -15,6 +15,9 @@ namespace HandBrake.ApplicationServices.Utilities using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
+ using HandBrake.Interop.Model.Encoding;
+
+ using Anamorphic = HandBrake.ApplicationServices.Model.Encoding.Anamorphic;
/// <summary>
/// Plist Preset Converter
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 87496dfbc..7631da7de 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -7,15 +7,18 @@ namespace HandBrake.ApplicationServices.Utilities {
using System;
using System.Collections.Generic;
- using System.Data;
using System.Globalization;
using System.IO;
- using System.Linq;
- using System.Windows.Forms;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
+ using HandBrake.Interop.Model.Encoding;
+
+ using Anamorphic = HandBrake.ApplicationServices.Model.Encoding.Anamorphic;
+ using AudioEncoder = HandBrake.ApplicationServices.Model.Encoding.AudioEncoder;
+ using Mixdown = HandBrake.ApplicationServices.Model.Encoding.Mixdown;
+ using VideoEncoder = HandBrake.ApplicationServices.Model.Encoding.VideoEncoder;
/*
* TODO:
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs index ce558107e..8b6394453 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs @@ -6,7 +6,6 @@ namespace HandBrake.ApplicationServices.Utilities
{
using System;
- using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
@@ -14,6 +13,10 @@ namespace HandBrake.ApplicationServices.Utilities using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
+ using HandBrake.Interop.Model;
+ using HandBrake.Interop.Model.Encoding;
+
+ using Anamorphic = HandBrake.ApplicationServices.Model.Encoding.Anamorphic;
/// <summary>
/// Parse a CLI Query
@@ -234,9 +237,6 @@ namespace HandBrake.ApplicationServices.Utilities case "slower":
parsed.Deinterlace = Deinterlace.Slower;
break;
- case "slowest":
- parsed.Deinterlace = Deinterlace.Slowest;
- break;
default:
parsed.Deinterlace = Deinterlace.Custom;
parsed.CustomDeinterlace = deinterlace.ToString().Replace("--deinterlace=", string.Empty).Replace("\"", string.Empty).ToLower();
|