From de8f3c5586121dcdf2b3b415464d686b9e58e3d2 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 4 Oct 2020 15:41:07 +0100 Subject: HandBrake.Interop: Library cleanup. - Remove HbFunctions provider class and interface. It's not needed. Interop library will direct call libhb though HBFunctions.cs - Remove HbFunctionsDirect. Any consumer of the HandBrake API should be using managed calls rather than having to deal with pointers. - Fix many stylecop warnings and update rulesets around this. --- .../HandBrake.Interop/Interop/Helpers/InteropUtilities.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs') diff --git a/win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs b/win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs index 7ff81d407..25eb8caf2 100644 --- a/win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs +++ b/win/CS/HandBrake.Interop/Interop/Helpers/InteropUtilities.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // @@ -16,23 +16,12 @@ namespace HandBrake.Interop.Interop.Helpers using System.Text; using HandBrake.Interop.Interop.HbLib; - using HandBrake.Interop.Interop.HbLib.Wrappers.Interfaces; - using HandBrake.Interop.Interop.Providers; - using HandBrake.Interop.Interop.Providers.Interfaces; /// /// Helper utilities for native interop. /// internal static class InteropUtilities { - private static IHbFunctions hbFunctions; - - static InteropUtilities() - { - IHbFunctionsProvider hbFunctionsProvider = new HbFunctionsProvider(); - hbFunctions = hbFunctionsProvider.GetHbFunctionsWrapper(); - } - /// /// Reads the given native structure pointer. /// @@ -273,7 +262,7 @@ namespace HandBrake.Interop.Interop.Helpers // Assign the new pointer to the job pointer and tell HB to clean the job up. Marshal.WriteIntPtr(nativeJobPtrPtr, nativeJobPtr); - hbFunctions.hb_job_close(nativeJobPtrPtr); + HBFunctions.hb_job_close(nativeJobPtrPtr); // Free the pointer we used. Marshal.FreeHGlobal(nativeJobPtrPtr); -- cgit v1.2.3