summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs')
-rw-r--r--win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs20
1 files changed, 5 insertions, 15 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs b/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs
index 38a5ee3d6..c16cf9a59 100644
--- a/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs
+++ b/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs
@@ -1,5 +1,5 @@
// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="HandBrakePresetService.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="HandBrakePresetService.cs" company="HandBrake Project (https://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>
@@ -14,12 +14,10 @@ namespace HandBrake.Interop.Interop
using System.IO;
using System.Runtime.InteropServices;
- using HandBrake.Interop.Interop.HbLib.Wrappers.Interfaces;
+ using HandBrake.Interop.Interop.HbLib;
using HandBrake.Interop.Interop.Helpers;
using HandBrake.Interop.Interop.Json.Presets;
using HandBrake.Interop.Interop.Model;
- using HandBrake.Interop.Interop.Providers;
- using HandBrake.Interop.Interop.Providers.Interfaces;
using Newtonsoft.Json;
@@ -28,14 +26,6 @@ namespace HandBrake.Interop.Interop
/// </summary>
public class HandBrakePresetService
{
- private static IHbFunctions hbFunctions;
-
- static HandBrakePresetService()
- {
- IHbFunctionsProvider hbFunctionsProvider = new HbFunctionsProvider();
- hbFunctions = hbFunctionsProvider.GetHbFunctionsWrapper();
- }
-
/// <summary>
/// The get built in presets.
/// Requires an hb_init to have been invoked.
@@ -45,7 +35,7 @@ namespace HandBrake.Interop.Interop
/// </returns>
public static IList<HBPresetCategory> GetBuiltInPresets()
{
- IntPtr presets = hbFunctions.hb_presets_builtin_get_json();
+ IntPtr presets = HBFunctions.hb_presets_builtin_get_json();
string presetJson = Marshal.PtrToStringAnsi(presets);
IList<HBPresetCategory> presetList = JsonConvert.DeserializeObject<IList<HBPresetCategory>>(presetJson);
@@ -63,7 +53,7 @@ namespace HandBrake.Interop.Interop
/// </returns>
public static PresetTransportContainer GetPresetsFromFile(string filename)
{
- IntPtr presetStringPointer = hbFunctions.hb_presets_read_file_json(InteropUtilities.ToUtf8PtrFromString(filename));
+ IntPtr presetStringPointer = HBFunctions.hb_presets_read_file_json(InteropUtilities.ToUtf8PtrFromString(filename));
string presetJson = Marshal.PtrToStringAnsi(presetStringPointer);
if (!string.IsNullOrEmpty(presetJson))
@@ -106,7 +96,7 @@ namespace HandBrake.Interop.Interop
IntPtr minor = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)));
IntPtr micro = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)));
- hbFunctions.hb_presets_current_version(major, minor, micro);
+ HBFunctions.hb_presets_current_version(major, minor, micro);
int majorVersion = Marshal.ReadInt32(major);
int minorVersion = Marshal.ReadInt32(minor);