summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HbLib')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs41
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs102
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs8
3 files changed, 54 insertions, 97 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
index 68f7d0177..c1a463037 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
@@ -86,20 +86,6 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr hb_get_titles(IntPtr hbHandle);
-
- /// Return Type: int
- ///buf: hb_buffer_t*
- ///width: int
- ///height: int
- ///color_equal: int
- ///color_diff: int
- ///threshold: int
- ///prog_equal: int
- ///prog_diff: int
- ///prog_threshold: int
- [DllImport("hb.dll", EntryPoint = "hb_detect_comb", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_detect_comb(ref hb_buffer_s buf, int width, int height, int color_equal, int color_diff, int threshold, int prog_equal, int prog_diff, int prog_threshold);
-
/// Return Type: void
///param0: hb_handle_t*
///param1: hb_title_t*
@@ -327,6 +313,19 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_audio_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr hb_audio_encoder_get_next(IntPtr last);
+//int hb_container_get_from_name(const char *name);
+//int hb_container_get_from_extension(const char *extension); // not really a container name
+//const char* hb_container_get_name(int format);
+//const char* hb_container_get_short_name(int format);
+//const char* hb_container_get_default_extension(int format);
+//const char* hb_container_sanitize_name(const char *name);
+
+ [DllImport("hb.dll", EntryPoint = "hb_container_get_from_name", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_container_get_from_name([In] [MarshalAs(UnmanagedType.LPStr)] string name);
+
+ [DllImport("hb.dll", EntryPoint = "hb_container_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_container_get_next(IntPtr last);
+
[DllImport("hb.dll", EntryPoint = "lang_get_next", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr lang_get_next(IntPtr last);
@@ -373,6 +372,10 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_chapter_set_title(IntPtr chapter, [In] [MarshalAs(UnmanagedType.LPStr)] string title);
+ ///void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);
+ [DllImport("hb.dll", EntryPoint = "hb_chapter_set_title", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_chapter_set_title__ptr(IntPtr chapter, IntPtr title);
+
/// void hb_add_filter( hb_job_t * job, hb_filter_object_t * filter, const char * settings );
[DllImport("hb.dll", EntryPoint = "hb_add_filter", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_add_filter(ref hb_job_s job, ref hb_filter_object_s filter, IntPtr settings);
@@ -398,10 +401,10 @@ namespace HandBrake.Interop.HbLib
int height);
- [DllImport("hb.dll", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_qsv_available();
-
- [DllImport("hb.dll", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_qsv_info_init();
+ [DllImport("hb.dll", EntryPoint = "hb_qsv_available", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_qsv_available();
+
+ [DllImport("hb.dll", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_qsv_info_init();
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs
index aef4c5a69..18d73c721 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/Misc.cs
@@ -94,6 +94,15 @@ namespace HandBrake.Interop.HbLib
}
[StructLayout(LayoutKind.Sequential)]
+ public struct qsv_enc_info_s
+ {
+ public int pic_struct;
+ public int align_width;
+ public int align_height;
+ public int is_init_done;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
public struct hb_encoder_s
{
[MarshalAs(UnmanagedType.LPStr)]
@@ -107,6 +116,21 @@ namespace HandBrake.Interop.HbLib
public int muxers;
}
+ [StructLayout(LayoutKind.Sequential)]
+ public struct hb_container_s
+ {
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string name;
+
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string short_name;
+
+ [MarshalAs(UnmanagedType.LPStr)]
+ public string default_extension;
+
+ public int format;
+ }
+
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct hb_metadata_s
{
@@ -266,84 +290,6 @@ namespace HandBrake.Interop.HbLib
{
}
- // Only called by detect_comb at the moment
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_buffer_s
- {
- /// int
- public int size;
-
- /// int
- public int alloc;
-
- /// uint8_t*
- [MarshalAs(UnmanagedType.LPStr)]
- public string data;
-
- /// int
- public int cur;
-
- /// int64_t->int
- public long sequence;
-
- public hb_buffer_type_anon type;
-
- /// int
- public int id;
-
- /// int64_t->int
- public long start;
-
- /// int64_t->int
- public long stop;
-
- public long pcr;
-
- public byte discontinuity;
-
- /// int
- public int new_chap;
-
- /// uint8_t->unsigned char
- public byte frametype;
-
- // Given uint by default, probably should be ushort?
- /// uint16_t->unsigned int
- public uint flags;
-
- /// int64_t->int
- public long renderOffset;
-
- /// int
- public int x;
-
- /// int
- public int y;
-
- /// int
- public int width;
-
- /// int
- public int height;
-
- /// hb_buffer_t*
- public IntPtr sub;
-
- /// hb_buffer_t*
- public IntPtr next;
- }
-
- public enum hb_buffer_type_anon
- {
- AUDIO_BUF,
-
- VIDEO_BUF,
-
- SUBTITLE_BUF,
-
- OTHER_BUF
- }
-
[StructLayout(LayoutKind.Sequential)]
public struct hb_mux_data_s
{
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 44f9e5ba8..a32527132 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_job_s.cs
@@ -169,6 +169,14 @@ namespace HandBrake.Interop.HbLib
/// uint32_t->unsigned int
public uint frames_to_skip;
+ public IntPtr av_qsv_context;
+
+ public int qsv_decode;
+
+ public int qsv_async_depth;
+
+ public qsv_enc_info_s qsv_enc_info;
+
// Padding for the part of the struct we don't care about marshaling.
[MarshalAs(UnmanagedType.ByValArray, SizeConst = MarshalingConstants.JobPaddingBytes, ArraySubType = UnmanagedType.U1)]
public byte[] padding;