diff options
author | randomengy <[email protected]> | 2012-11-21 08:28:09 +0000 |
---|---|---|
committer | randomengy <[email protected]> | 2012-11-21 08:28:09 +0000 |
commit | 8612b1b6ab0a60a9b9cca384ca62f8a12d3cbb5b (patch) | |
tree | c868d25085153b896465a47d36ab4783593c30ba /win/CS/HandBrake.Interop/HandBrakeInterop/HbLib | |
parent | b1a9af3d8f002d2e43fc7cbaf968137c0fe36dfb (diff) |
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
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HbLib')
5 files changed, 50 insertions, 35 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs index e5d26e324..f033dc448 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs @@ -103,7 +103,7 @@ namespace HandBrake.Interop.HbLib ///param2: int
///param3: uint8_t*
[DllImport("hb.dll", EntryPoint = "hb_get_preview", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_get_preview(IntPtr hbHandle, ref hb_title_s title, int preview, IntPtr buffer);
+ public static extern void hb_get_preview(IntPtr hbHandle, ref hb_job_s title, int preview, IntPtr buffer);
/// Return Type: void
@@ -296,11 +296,11 @@ namespace HandBrake.Interop.HbLib ///hb_title_set_t * hb_get_title_set( hb_handle_t * );
[DllImport("hb.dll", EntryPoint = "hb_get_title_set", CallingConvention = CallingConvention.Cdecl)]
- public static extern hb_title_set_s hb_get_title_set(IntPtr hbHandle);
+ public static extern IntPtr hb_get_title_set(IntPtr hbHandle);
///hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index );
[DllImport("hb.dll", EntryPoint = "hb_job_init_by_index", CallingConvention = CallingConvention.Cdecl)]
- public static extern hb_job_s hb_job_init_by_index(IntPtr hbHandle, int title_index);
+ public static extern IntPtr hb_job_init_by_index(IntPtr hbHandle, int title_index);
///hb_job_t * hb_job_init( hb_title_t * title );
[DllImport("hb.dll", EntryPoint = "hb_job_init", CallingConvention = CallingConvention.Cdecl)]
@@ -312,7 +312,7 @@ namespace HandBrake.Interop.HbLib ///void hb_job_close( hb_job_t ** job );
[DllImport("hb.dll", EntryPoint = "hb_job_close", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_job_close(ref hb_job_s job);
+ public static extern void hb_job_close(IntPtr job);
///void hb_job_set_advanced_opts( hb_job_t *job, const char *advanced_opts );
[DllImport("hb.dll", EntryPoint = "hb_job_set_advanced_opts", CallingConvention = CallingConvention.Cdecl)]
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs index 36820c0c4..fd464b7c8 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs @@ -98,39 +98,48 @@ namespace HandBrake.Interop.HbLib [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct hb_metadata_s
{
- /// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string name;
- /// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string artist;
- /// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string composer;
- /// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string release_date;
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string comment;
- /// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string album;
- /// char[255]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string album_artist;
+
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string genre;
- /// uint32_t->unsigned int
- public uint coverart_size;
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string description;
+
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string long_description;
/// uint8_t*
- public IntPtr coverart;
+ public IntPtr list_coverart;
}
[StructLayout(LayoutKind.Sequential)]
@@ -398,16 +407,6 @@ namespace HandBrake.Interop.HbLib public uint x;
}
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_title_set_s
- {
- ///hb_list_t *
- public hb_list_s list_title;
-
- // int
- public int feature;
- }
-
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void LoggingCallback(string message);
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs index 616b46013..fa3c63a8c 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs @@ -10,9 +10,9 @@ namespace HandBrake.Interop.HbLib
{
- using System.Runtime.InteropServices;
+ using System.Runtime.InteropServices;
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct hb_chapter_s
{
/// int
@@ -51,8 +51,8 @@ namespace HandBrake.Interop.HbLib /// uint64_t->unsigned int
public ulong duration;
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ /// char *
+ [MarshalAs(UnmanagedType.LPStr)]
public string title;
}
}
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 cb70f83ef..d4c95d904 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs @@ -114,6 +114,8 @@ namespace HandBrake.Interop.HbLib /// int
public int color_matrix;
+ public IntPtr list_chapter;
+
/// hb_list_t*
public IntPtr list_audio;
@@ -123,6 +125,10 @@ namespace HandBrake.Interop.HbLib /// hb_list_t*
public IntPtr list_subtitle;
+ public IntPtr list_attachment;
+
+ public IntPtr metadata;
+
/// int
public int mux;
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 f6d9c0ffd..136c2df74 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs @@ -160,6 +160,16 @@ namespace HandBrake.Interop.HbLib public uint flags;
}
+ [StructLayout(LayoutKind.Sequential)]
+ public struct hb_title_set_s
+ {
+ ///hb_list_t *
+ public IntPtr list_title;
+
+ // int
+ public int feature;
+ }
+
public enum hb_title_type_anon
{
HB_DVD_TYPE,
|