summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
diff options
context:
space:
mode:
authorrandomengy <[email protected]>2012-09-20 01:32:35 +0000
committerrandomengy <[email protected]>2012-09-20 01:32:35 +0000
commitd20e2f8c79443b3733908c6bd629c29fb2374310 (patch)
treec94f0d60026fdb0e8998074ee0b25a955974ecdc /win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
parentb92edce868ade3318c3b092777bfa5e515720094 (diff)
Interop: Bring up to speed with libhb. Exposes more functions, accommodates channel layout and filter changes and allows setting CFR same as source.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4969 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs14
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>