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.cs43
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_audio.cs149
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs58
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_error_code.cs7
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_filter_object_s.cs36
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_subtitle.cs79
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs16
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_set_s.cs22
8 files changed, 18 insertions, 392 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
index 1763d0a74..8eafea9f2 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
@@ -89,14 +89,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: void
- ///param0: hb_handle_t*
- ///param1: hb_title_t*
- ///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_job_s title, int preview, IntPtr buffer);
-
/// Return Type: void
///param0: hb_job_t*
@@ -105,15 +97,6 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_set_size", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_set_size(ref hb_job_s param0, double ratio, int pixels);
- /// Return Type: void
- ///param0: hb_job_t*
- ///output_width: int*
- ///output_height: int*
- ///output_par_width: int*
- ///output_par_height: int*
- [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_set_anamorphic_size(ref hb_job_s job, ref int output_width, ref int output_height, ref int output_par_width, ref int output_par_height);
-
[DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size2", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_set_anamorphic_size2(ref hb_geometry_s sourceGeometry, ref hb_geometry_settings_s uiGeometry, ref hb_geometry_s result);
@@ -170,19 +153,6 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_stop(IntPtr hbHandle);
- /// Return Type: void
- ///param0: hb_handle_t*
- ///param1: hb_state_t*
- [DllImport("hb.dll", EntryPoint = "hb_get_state", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_get_state(IntPtr hbHandle, ref hb_state_s state);
-
-
- /// Return Type: void
- ///param0: hb_handle_t*
- ///param1: hb_state_t*
- [DllImport("hb.dll", EntryPoint = "hb_get_state2", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_get_state2(IntPtr hbHandle, ref hb_state_s param1);
-
/// Return Type: int
///param0: hb_handle_t*
@@ -439,10 +409,6 @@ namespace HandBrake.Interop.HbLib
[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);
-
/// hb_filter_object_t * hb_filter_init( int filter_id );
[DllImport("hb.dll", EntryPoint = "hb_filter_init", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr hb_filter_init(int filter_id);
@@ -479,6 +445,9 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_qsv_info_init", CallingConvention = CallingConvention.Cdecl)]
public static extern int hb_qsv_info_init();
+ // hb_image_t* hb_get_preview2(hb_handle_t* h, int title_idx, int picture, hb_geometry_settings_t* geo, int deinterlace);
+ [DllImport("hb.dll", EntryPoint = "hb_get_preview2", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_get_preview2(IntPtr hbHandle, int title_idx, int preview_idx, ref hb_geometry_settings_s geo, int deinterlace);
/* JSON API */
@@ -496,7 +465,7 @@ namespace HandBrake.Interop.HbLib
// char * hb_job_to_json(const hb_job_t * job);
[DllImport("hb.dll", EntryPoint = "hb_job_to_json", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_job_to_json(IntPtr hb_job_t);
+ public static extern IntPtr hb_job_to_json(ref hb_job_s hb_job_t);
// hb_job_t * hb_json_to_job(hb_handle_t * h, const char * json_job);
[DllImport("hb.dll", EntryPoint = "hb_json_to_job", CallingConvention = CallingConvention.Cdecl)]
@@ -513,5 +482,9 @@ namespace HandBrake.Interop.HbLib
// char * hb_get_state_json(hb_handle_t * h);
[DllImport("hb.dll", EntryPoint = "hb_get_state_json", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr hb_get_state_json(IntPtr hbHandle);
+
+ // char* hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, hb_geometry_settings_t *settings)
+ [DllImport("hb.dll", EntryPoint = "hb_get_preview_params_json", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_get_preview_params_json(int title_idx, int preview_idx, int deinterlace, ref hb_geometry_settings_s settings);
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_audio.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_audio.cs
deleted file mode 100644
index 7814fb27b..000000000
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_audio.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="hb_audio.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>
-// <summary>
-// Defines the hb_audio_s type.
-// </summary>
-// <auto-generated> Disable Stylecop Warnings for this file </auto-generated>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop.HbLib
-{
- using System;
- using System.Runtime.InteropServices;
-
- using HandBrake.Interop.Helpers;
-
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_audio_s
- {
- /// int
- public int id;
-
- /// hb_audio_config_t->hb_audio_config_s
- public hb_audio_config_s config;
-
- // Padding for the part of the struct we don't care about marshaling.
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = MarshalingConstants.AudioPaddingBytes, ArraySubType = UnmanagedType.U1)]
- public byte[] padding;
-
- // Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
- // public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_audio_config_s
- {
- public hb_audio_config_output_s output;
- public hb_audio_config_input_s input;
-
- public hb_audio_config_lang_s lang;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_audio_config_output_s
- {
- public int mixdown;
-
- /// int
- public int track;
-
- /// uint32_t->unsigned int
- public uint codec;
-
- /// int
- public int samplerate;
-
- public int samples_per_frame;
-
- /// int
- public int bitrate;
-
- public double quality;
-
- public double compression_level;
-
- /// double
- public double dynamic_range_compression;
-
- public double gain;
-
- public int normalize_mix_level;
-
- public int dither_method;
-
- public IntPtr name;
-
- public int delay;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct hb_audio_config_input_s
- {
- /// int
- public int track;
-
- /* Input audio codec */
- public uint codec;
-
- /* Per-codec config info */
- public uint codec_param;
-
- /* Registration descriptor of source */
- public uint reg_desc;
-
- /* Stream type from source stream */
- public uint stream_type;
-
- /* Substream type for multiplexed streams */
- public uint substream_type;
-
- /* Bitsream version */
- public uint version;
-
- /* Bitstream flags, codec-specific */
- public uint flags;
-
- /* Bitstream mode, codec-specific */
- public uint mode;
-
- /* Input sample rate (Hz) */
- public int samplerate;
-
- /* Number of samples per frame */
- public int samples_per_frame;
-
- /* Input bitrate (bps) */
- public int bitrate;
-
- /* Source matrix encoding mode, set by the audio decoder */
- public int matrix_encoding;
-
- /* Source channel layout, set by the audio decoder */
- public ulong channel_layout;
-
- /* Source channel map, set by the audio decoder */
- // hb_chan_map_t
- public IntPtr channel_map;
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct hb_audio_config_lang_s
- {
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
- public string description;
-
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
- public string simple;
-
- /// char[4]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
- public string iso639_2;
-
- /// uint8_t->unsigned char
- public byte type;
- }
-}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs
deleted file mode 100644
index fa3c63a8c..000000000
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_chapter_s.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="hb_chapter_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>
-// <summary>
-// Defines the hb_chapter_s type.
-// </summary>
-// <auto-generated> Disable Stylecop Warnings for this file </auto-generated>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop.HbLib
-{
- using System.Runtime.InteropServices;
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct hb_chapter_s
- {
- /// int
- public int index;
-
- /// int
- public int pgcn;
-
- /// int
- public int pgn;
-
- /// int
- public int cell_start;
-
- /// int
- public int cell_end;
-
- /// int
- public ulong block_start;
-
- /// int
- public ulong block_end;
-
- /// int
- public ulong block_count;
-
- /// int
- public int hours;
-
- /// int
- public int minutes;
-
- /// int
- public int seconds;
-
- /// uint64_t->unsigned int
- public ulong duration;
-
- /// char *
- [MarshalAs(UnmanagedType.LPStr)]
- public string title;
- }
-}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_error_code.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_error_code.cs
index 86d8f3f08..7c107f41c 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_error_code.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_error_code.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace HandBrake.Interop.HbLib
+namespace HandBrake.Interop.HbLib
{
public enum hb_error_code
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_filter_object_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_filter_object_s.cs
deleted file mode 100644
index 1329b88ec..000000000
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_filter_object_s.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="hb_filter_object_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_filter_object_s
- {
- public int id;
- public int enforce_order;
- public IntPtr name;
- public IntPtr settings;
-
- // Internal stuff we need to marshal
- public IntPtr init;
- public IntPtr work;
- public IntPtr close;
- public IntPtr info;
- public IntPtr fifo_in;
- public IntPtr fifo_out;
- public IntPtr subtitle;
- public IntPtr private_data;
- public IntPtr thread;
- public IntPtr done;
- public int status;
- public int chapter_val;
- public long chapter_time;
- }
-}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_subtitle.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_subtitle.cs
index 2821b2d1c..77c21a190 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_subtitle.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_subtitle.cs
@@ -7,84 +7,7 @@
namespace HandBrake.Interop.HbLib
{
- using System;
- using System.Runtime.InteropServices;
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct hb_subtitle_s
- {
- /// int
- public int id;
-
- /// int
- public int track;
-
- public int out_track;
-
- /// hb_subtitle_config_t->hb_subtitle_config_s
- public hb_subtitle_config_s config;
-
- /// hb_subtitle_s_subtype
- public hb_subtitle_s_subtype format;
-
- /// hb_subtitle_s_subsource
- public hb_subtitle_s_subsource source;
-
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
- public string lang;
-
- /// char[4]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
- public string iso639_2;
-
- /// uint8_t->unsigned char
- public byte type;
-
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
- public uint[] palette;
-
- public byte palette_set;
-
- public int width;
-
- public int height;
-
- public IntPtr extradata;
-
- public int extradata_size;
-
- /// int
- public int hits;
-
- /// int
- public int forced_hits;
-
- public uint codec;
-
- public uint reg_desc;
-
- public uint stream_type;
-
- public uint substream_type;
-
- /// hb_fifo_t*
- public IntPtr fifo_in;
-
- /// hb_fifo_t*
- public IntPtr fifo_raw;
-
- /// hb_fifo_t*
- public IntPtr fifo_sync;
-
- /// hb_fifo_t*
- public IntPtr fifo_out;
-
- /// hb_mux_data_t*
- public IntPtr mux_data;
- }
-
- public enum hb_subtitle_s_subtype
+ public enum hb_subtitle_s_subtype
{
PICTURESUB,
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 3e43ac2a6..2e9d49868 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_s.cs
@@ -16,14 +16,14 @@ namespace HandBrake.Interop.HbLib
/// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
public hb_title_type_anon type;
- public uint reg_desc;
-
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
- public byte[] path;
-
- /// char[1024]
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
+ public uint reg_desc;
+
+ /// char[1024]
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
+ public byte[] path;
+
+ /// char[1024]
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
public string name;
/// int
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_set_s.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_set_s.cs
deleted file mode 100644
index 087e7cde4..000000000
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_title_set_s.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="hb_title_set_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_title_set_s
- {
- ///hb_list_t *
- public IntPtr list_title;
-
- // int
- public int feature;
- }
-}