diff options
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs')
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs index 8bd8125ee..9bfceb278 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs @@ -11,7 +11,7 @@ namespace HandBrake.Interop {
using System;
using System.Collections.Generic;
-
+ using System.Runtime.InteropServices;
using HandBrake.Interop.HbLib;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
@@ -131,6 +131,18 @@ namespace HandBrake.Interop }
/// <summary>
+ /// Gets the standard x264 option name given the starting point.
+ /// </summary>
+ /// <returns>The standard x264 option name.</returns>
+ public static string SanitizeX264OptName(string name)
+ {
+ IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);
+ string sanitizedName = Marshal.PtrToStringAnsi(HBFunctions.hb_x264_encopt_name(namePtr));
+ Marshal.FreeHGlobal(namePtr);
+ return sanitizedName;
+ }
+
+ /// <summary>
/// Gets the total number of seconds on the given encode job.
/// </summary>
/// <param name="job">The encode job to query.</param>
|