summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-04-12 20:07:08 +0000
committersr55 <[email protected]>2013-04-12 20:07:08 +0000
commitda8a0f3ace2b71ef1cbb911d194dd1f9561017b0 (patch)
treec13e4d1e2826a881100bf36502fe3840760644a9 /win/CS/HandBrake.Interop
parentee69423b2777934d1fc19b41cd428c9e28f1b65f (diff)
WinGui: Fix the x264 preset/tune/profile tooltip so that it now shows the equivalent x264 query. Also added an option to disable libhb features such as this incase this turns out to be problematic.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5397 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs8
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs2
2 files changed, 8 insertions, 2 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
index eb9353aa7..6833dfc36 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
@@ -197,7 +197,8 @@ namespace HandBrake.Interop
throw new ArgumentException("height must be positive.");
}
- return HBFunctions.hb_x264_param_unparse(
+ HBFunctions.hb_init(0, 0);
+ IntPtr ptr = HBFunctions.hb_x264_param_unparse(
preset,
string.Join(",", tunes),
extraOptions,
@@ -205,6 +206,11 @@ namespace HandBrake.Interop
level,
width,
height);
+
+ string x264Settings = Marshal.PtrToStringAnsi(ptr);
+
+
+ return x264Settings;
}
/// <summary>
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
index cd4ca877d..00130a902 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
@@ -338,7 +338,7 @@ namespace HandBrake.Interop.HbLib
public static extern int hb_check_h264_level([In] [MarshalAs(UnmanagedType.LPStr)] string level, int width, int height, int fps_num, int fps_den, int interlaced, int fake_interlaced);
[DllImport("hb.dll", EntryPoint = "hb_x264_param_unparse", CallingConvention = CallingConvention.Cdecl)]
- public static extern string hb_x264_param_unparse(
+ public static extern IntPtr hb_x264_param_unparse(
[In] [MarshalAs(UnmanagedType.LPStr)] string x264_preset,
[In] [MarshalAs(UnmanagedType.LPStr)] string x264_tune,
[In] [MarshalAs(UnmanagedType.LPStr)] string x264_encopts,