diff options
author | randomengy <[email protected]> | 2013-10-13 19:15:54 +0000 |
---|---|---|
committer | randomengy <[email protected]> | 2013-10-13 19:15:54 +0000 |
commit | 603adfcb52ac7a2520c5d3f4830a801829671c13 (patch) | |
tree | d5eefd9bd005f5557a674dfc2886089eb00caef9 /win/CS/HandBrake.Interop/HandBrakeInterop/HbLib | |
parent | 2936b7b1d62261a03f39368e78eeee1576d41c2c (diff) |
Interop: Input/output paths are now encoded to UTF-8. Removed references to hb_list_s, using the list functions to create and modify them. Added support for specifying the scaling method, QSV preset and DXVA decoding.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5836 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HbLib')
4 files changed, 48 insertions, 28 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs index 6c3f70357..9fc20ede6 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs @@ -79,7 +79,7 @@ namespace HandBrake.Interop.HbLib ///preview_count: int
///store_previews: int
[DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path, int title_index, int preview_count, int store_previews, ulong min_duration);
+ public static extern void hb_scan(IntPtr hbHandle, IntPtr path, int title_index, int preview_count, int store_previews, ulong min_duration);
[DllImport("hb.dll", EntryPoint = "hb_scan_stop", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_scan_stop(IntPtr hbHandle);
@@ -195,6 +195,35 @@ namespace HandBrake.Interop.HbLib [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_global_close();
+ //hb_list_t * hb_list_init();
+ [DllImport("hb.dll", EntryPoint = "hb_list_init", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_list_init();
+
+ //int hb_list_count( const hb_list_t * );
+ [DllImport("hb.dll", EntryPoint = "hb_list_count", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_list_count(IntPtr listPtr);
+
+ //void hb_list_add( hb_list_t *, void * );
+ [DllImport("hb.dll", EntryPoint = "hb_list_add", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_list_add(IntPtr listPtr, IntPtr item);
+
+ //void hb_list_insert( hb_list_t * l, int pos, void * p );
+ [DllImport("hb.dll", EntryPoint = "hb_list_insert", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_list_insert(IntPtr listPtr, int pos, IntPtr item);
+
+ //void hb_list_rem( hb_list_t *, void * );
+ [DllImport("hb.dll", EntryPoint = "hb_list_rem", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_list_rem(IntPtr listPtr, IntPtr item);
+
+ //void * hb_list_item( const hb_list_t *, int );
+ [DllImport("hb.dll", EntryPoint = "hb_list_item", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_list_item(IntPtr listPtr, int itemIndex);
+
+ //void hb_list_close( hb_list_t ** );
+ [DllImport("hb.dll", EntryPoint = "hb_list_close", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_list_close(IntPtr listPtrPtr);
+
+
[DllImport("hb.dll", EntryPoint = "hb_subtitle_add", CallingConvention = CallingConvention.Cdecl)]
public static extern int hb_subtitle_add(ref hb_job_s job, ref hb_subtitle_config_s subtitleConfig, int track);
@@ -203,6 +232,7 @@ namespace HandBrake.Interop.HbLib +
//int hb_video_framerate_get_from_name(const char *name);
//const char* hb_video_framerate_get_name(int framerate);
//const char* hb_video_framerate_sanitize_name(const char *name);
@@ -404,6 +434,9 @@ namespace HandBrake.Interop.HbLib int height);
+ [DllImport("hb.dll", EntryPoint = "hb_get_opencl_env", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_get_opencl_env();
+
[DllImport("hb.dll", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]
public static extern int hb_qsv_available();
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs index 7d0a76c68..78433c06f 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs @@ -129,8 +129,8 @@ namespace HandBrake.Interop.HbLib public int mux;
/// char*
- [MarshalAs(UnmanagedType.LPStr)]
- public string file;
+ /// UTF-8 encoded
+ public IntPtr file;
/// int
public int largeFileSize;
@@ -169,6 +169,14 @@ namespace HandBrake.Interop.HbLib /// uint32_t->unsigned int
public uint frames_to_skip;
+ public int use_opencl;
+
+ public int use_hwd;
+
+ public int use_decomb;
+
+ public int use_detelecine;
+
public qsv_s qsv;
// Padding for the part of the struct we don't care about marshaling.
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_list_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_list_s.cs deleted file mode 100644 index c7eb2d4ea..000000000 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_list_s.cs +++ /dev/null @@ -1,25 +0,0 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="hb_list_s.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <auto-generated>Disable Stylecop Warnings for this file</auto-generated>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop.HbLib
-{
- using System;
- using System.Runtime.InteropServices;
-
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_list_s
- {
- /// void**
- public IntPtr items;
-
- /// int
- public int items_alloc;
-
- /// int
- public int items_count;
- }
-}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs index c20107aa5..d9a845081 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs @@ -158,6 +158,10 @@ namespace HandBrake.Interop.HbLib /// uint32_t->unsigned int
public uint flags;
+
+ public int opencl_support;
+
+ public int hwd_support;
}
public enum hb_title_type_anon
|