From 8612b1b6ab0a60a9b9cca384ca62f8a12d3cbb5b Mon Sep 17 00:00:00 2001 From: randomengy Date: Wed, 21 Nov 2012 08:28:09 +0000 Subject: Interop: Updated to support removal of title->job. Removed some obsolete properties on EncodingProfile, changed x264 Tunes to be a collection and replaced CustomCropping bool with CroppingType enum. Another fix to make sure Loose/Strict anamorphic get the correct PAR values. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5072 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrakeInterop/InteropUtilities.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs') diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs index 3a7f1c01e..db72feac5 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/InteropUtilities.cs @@ -162,6 +162,23 @@ namespace HandBrake.Interop return returnList; } + /// + /// Closes the given job. + /// + /// The pointer to the job. + public static void CloseJob(IntPtr nativeJobPtr) + { + // Create a point to the job pointer first. + IntPtr nativeJobPtrPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr))); + + // 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); + + // Free the pointer we used. + Marshal.FreeHGlobal(nativeJobPtrPtr); + } + /// /// Frees all the memory locations in the given list. /// -- cgit v1.2.3