1 diff --git a/win/C#/interop/HbLib.cs b/win/C#/interop/HbLib.cs
5 +++ b/win/C#/interop/HbLib.cs
8 +using System.Collections.Generic;
\r
11 +using System.Runtime.InteropServices;
\r
13 +namespace HandBrake.Interop
\r
16 + public partial class NativeConstants
\r
18 + public const int HB_ACODEC_MASK = 0x00FF00;
\r
19 + public const int HB_ACODEC_FAAC = 0x000100;
\r
20 + public const int HB_ACODEC_LAME = 0x000200;
\r
21 + public const int HB_ACODEC_VORBIS = 0x000400;
\r
22 + public const int HB_ACODEC_AC3 = 0x000800;
\r
23 + public const int HB_ACODEC_MPGA = 0x001000;
\r
24 + public const int HB_ACODEC_LPCM = 0x002000;
\r
25 + public const int HB_ACODEC_DCA = 0x004000;
\r
26 + public const int HB_ACODEC_FFMPEG = 0x008000;
\r
27 + public const int HB_ACODEC_CA_AAC = 0x010000;
\r
29 + public const int HB_AMIXDOWN_DCA_FORMAT_MASK = 0x00FFF000;
\r
30 + public const int HB_AMIXDOWN_A52_FORMAT_MASK = 0x00000FF0;
\r
31 + public const int HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK = 0x0000000F;
\r
32 + public const int HB_AMIXDOWN_MONO = 0x01000001;
\r
33 + public const int HB_AMIXDOWN_STEREO = 0x02002022;
\r
34 + public const int HB_AMIXDOWN_DOLBY = 0x042070A2;
\r
35 + public const int HB_AMIXDOWN_DOLBYPLII = 0x084094A2;
\r
36 + public const int HB_AMIXDOWN_6CH = 0x10089176;
\r
38 + public const int HB_VCODEC_MASK = 0x0000FF;
\r
39 + public const int HB_VCODEC_FFMPEG = 0x000001;
\r
40 + public const int HB_VCODEC_X264 = 0x000002;
\r
41 + public const int HB_VCODEC_THEORA = 0x000004;
\r
43 + public const int HB_MUX_MASK = 0xFF0000;
\r
44 + public const int HB_MUX_MP4 = 0x010000;
\r
45 + public const int HB_MUX_PSP = 0x020000;
\r
46 + public const int HB_MUX_AVI = 0x040000;
\r
47 + public const int HB_MUX_OGM = 0x080000;
\r
48 + public const int HB_MUX_IPOD = 0x100000;
\r
49 + public const int HB_MUX_MKV = 0x200000;
\r
51 + public const int HBTF_NO_IDR = 1 << 0;
\r
53 + public const int HB_STATE_IDLE = 1;
\r
54 + public const int HB_STATE_SCANNING = 2;
\r
55 + public const int HB_STATE_SCANDONE = 4;
\r
56 + public const int HB_STATE_WORKING = 8;
\r
57 + public const int HB_STATE_PAUSED = 16;
\r
58 + public const int HB_STATE_WORKDONE = 32;
\r
59 + public const int HB_STATE_MUXING = 64;
\r
61 + public const int HB_ERROR_NONE = 0;
\r
62 + public const int HB_ERROR_CANCELED = 1;
\r
63 + public const int HB_ERROR_UNKNOWN = 2;
\r
65 + public const int AUDIO_F_DOLBY = 1 << 31;
\r
67 + public const int HB_FRAME_IDR = 0x01;
\r
68 + public const int HB_FRAME_I = 0x02;
\r
69 + public const int HB_FRAME_AUDIO = 0x04;
\r
70 + public const int HB_FRAME_P = 0x10;
\r
71 + public const int HB_FRAME_B = 0x20;
\r
72 + public const int HB_FRAME_BREF = 0x40;
\r
73 + public const int HB_FRAME_KEY = 0x0F;
\r
74 + public const int HB_FRAME_REF = 0xF0;
\r
76 + public const int HB_CONFIG_MAX_SIZE = 8192;
\r
78 + public const int HB_FILTER_DETELECINE = 1;
\r
79 + public const int HB_FILTER_DEINTERLACE = 2;
\r
80 + public const int HB_FILTER_DEBLOCK = 3;
\r
81 + public const int HB_FILTER_DENOISE = 4;
\r
82 + public const int HB_FILTER_DECOMB = 5;
\r
83 + public const int HB_FILTER_ROTATE = 6;
\r
86 + [StructLayout(LayoutKind.Sequential)]
\r
87 + public struct hb_anamorphic_substruct
\r
93 + public int itu_par;
\r
96 + public int par_width;
\r
99 + public int par_height;
\r
102 + public int dar_width;
\r
105 + public int dar_height;
\r
108 + public int keep_display_aspect;
\r
111 + [StructLayout(LayoutKind.Sequential)]
\r
112 + public struct hb_job_s
\r
115 + public int sequence_id;
\r
118 + public IntPtr title;
\r
120 + public int feature;
\r
123 + public int chapter_start;
\r
126 + public int chapter_end;
\r
129 + public int chapter_markers;
\r
132 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
133 + public int[] crop;
\r
136 + public int deinterlace;
\r
139 + public IntPtr filters;
\r
142 + public int width;
\r
145 + public int height;
\r
148 + public int keep_ratio;
\r
151 + public int grayscale;
\r
153 + public hb_anamorphic_substruct anamorphic;
\r
155 + public int modulus;
\r
158 + public int maxWidth;
\r
161 + public int maxHeight;
\r
164 + public int vcodec;
\r
167 + public float vquality;
\r
170 + public int vbitrate;
\r
173 + public int vrate;
\r
176 + public int vrate_base;
\r
188 + public int h264_13;
\r
191 + public int h264_level;
\r
194 + //[MarshalAs(UnmanagedType.LPStr)]
\r
195 + //public string x264opts;
\r
197 + public IntPtr x264opts;
\r
200 + public int areBframes;
\r
203 + public int color_matrix;
\r
206 + public IntPtr list_audio;
\r
209 + public IntPtr list_subtitle;
\r
215 + [MarshalAs(UnmanagedType.LPStr)]
\r
216 + public string file;
\r
219 + public int largeFileSize;
\r
222 + public int mp4_optimize;
\r
225 + public int ipod_atom;
\r
228 + public int indepth_scan;
\r
230 + /// hb_subtitle_config_t->hb_subtitle_config_s
\r
231 + public hb_subtitle_config_s select_subtitle_config;
\r
234 + public int angle;
\r
236 + public int frame_to_start;
\r
238 + public long pts_to_start;
\r
241 + public int frame_to_stop;
\r
244 + public long pts_to_stop;
\r
247 + public int start_at_preview;
\r
250 + public int seek_points;
\r
252 + /// uint32_t->unsigned int
\r
253 + public uint frames_to_skip;
\r
255 + // Padding for the part of the struct we don't care about marshaling.
\r
256 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24644, ArraySubType = UnmanagedType.U1)]
\r
257 + public byte[] padding;
\r
260 + [StructLayout(LayoutKind.Sequential)]
\r
261 + public struct hb_list_s
\r
264 + public IntPtr items;
\r
267 + public int items_alloc;
\r
270 + public int items_count;
\r
273 + [StructLayout(LayoutKind.Sequential)]
\r
274 + public struct hb_rate_s
\r
277 + [MarshalAs(UnmanagedType.LPStr)]
\r
278 + public string @string;
\r
284 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
285 + public struct hb_handle_s
\r
290 + public int build;
\r
293 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
\r
294 + public string version;
\r
297 + public IntPtr update_thread;
\r
303 + public IntPtr main_thread;
\r
309 + public IntPtr list_title;
\r
312 + public IntPtr scan_thread;
\r
315 + public IntPtr jobs;
\r
318 + public IntPtr current_job;
\r
321 + public int job_count;
\r
324 + public int job_count_permanent;
\r
327 + public int work_die;
\r
330 + public int work_error;
\r
333 + public IntPtr work_thread;
\r
336 + public int cpu_count;
\r
339 + public IntPtr state_lock;
\r
341 + /// hb_state_t->hb_state_s
\r
342 + public hb_state_s state;
\r
345 + public int paused;
\r
348 + public IntPtr pause_lock;
\r
351 + public int scanCount;
\r
353 + /// hb_interjob_t*
\r
354 + public IntPtr interjob;
\r
357 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
358 + public struct hb_chapter_s
\r
361 + public int index;
\r
370 + public int cell_start;
\r
373 + public int cell_end;
\r
376 + public int block_start;
\r
379 + public int block_end;
\r
382 + public int block_count;
\r
385 + public int hours;
\r
388 + public int minutes;
\r
391 + public int seconds;
\r
393 + /// uint64_t->unsigned int
\r
394 + public ulong duration;
\r
397 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
398 + public string title;
\r
401 + public enum hb_subtitle_s_subtype
\r
408 + public enum hb_subtitle_s_subsource
\r
425 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
426 + public struct hb_subtitle_s
\r
432 + public int track;
\r
434 + /// hb_subtitle_config_t->hb_subtitle_config_s
\r
435 + public hb_subtitle_config_s config;
\r
437 + /// hb_subtitle_s_subtype
\r
438 + public hb_subtitle_s_subtype format;
\r
440 + /// hb_subtitle_s_subsource
\r
441 + public hb_subtitle_s_subsource source;
\r
444 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
445 + public string lang;
\r
448 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
449 + public string iso639_2;
\r
451 + /// uint8_t->unsigned char
\r
452 + public byte type;
\r
454 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
\r
455 + public uint[] palette;
\r
457 + public int width;
\r
459 + public int height;
\r
465 + public int forced_hits;
\r
468 + public IntPtr fifo_in;
\r
471 + public IntPtr fifo_raw;
\r
474 + public IntPtr fifo_sync;
\r
477 + public IntPtr fifo_out;
\r
479 + /// hb_mux_data_t*
\r
480 + public IntPtr mux_data;
\r
483 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
484 + public struct hb_metadata_s
\r
487 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
488 + public string name;
\r
491 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
492 + public string artist;
\r
495 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
496 + public string composer;
\r
499 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
500 + public string release_date;
\r
503 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
504 + public string comment;
\r
507 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
508 + public string album;
\r
511 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
512 + public string genre;
\r
514 + /// uint32_t->unsigned int
\r
515 + public uint coverart_size;
\r
518 + public IntPtr coverart;
\r
521 + public enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
528 + public enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
530 + /// HB_MPEG2_PS_DEMUXER -> 0
\r
531 + HB_MPEG2_PS_DEMUXER = 0,
\r
533 + HB_MPEG2_TS_DEMUXER,
\r
538 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
539 + public struct hb_title_s
\r
541 + /// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
542 + public Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550 type;
\r
545 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
546 + public string dvd;
\r
549 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
550 + public string name;
\r
552 + //public fixed byte dvd[1024];
\r
554 + //public fixed byte name[1024];
\r
557 + public int index;
\r
566 + public int cell_start;
\r
569 + public int cell_end;
\r
572 + public int block_start;
\r
575 + public int block_end;
\r
578 + public int block_count;
\r
581 + public int angle_count;
\r
584 + public int hours;
\r
587 + public int minutes;
\r
590 + public int seconds;
\r
592 + /// uint64_t->unsigned int
\r
593 + public ulong duration;
\r
596 + public double aspect;
\r
599 + public double container_aspect;
\r
602 + public int width;
\r
605 + public int height;
\r
608 + public int pixel_aspect_width;
\r
611 + public int pixel_aspect_height;
\r
617 + public int rate_base;
\r
620 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
621 + public int[] crop;
\r
623 + //public fixed int crop[4];
\r
625 + /// Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
626 + public Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db demuxer;
\r
629 + public int detected_interlacing;
\r
632 + public int video_id;
\r
635 + public int video_codec;
\r
638 + public int video_codec_param;
\r
641 + public IntPtr video_codec_name;
\r
644 + public int video_bitrate;
\r
647 + public IntPtr container_name;
\r
650 + public int data_rate;
\r
652 + /// hb_metadata_t*
\r
653 + public IntPtr metadata;
\r
656 + public IntPtr list_chapter;
\r
659 + public IntPtr list_audio;
\r
662 + public IntPtr list_subtitle;
\r
665 + public IntPtr job;
\r
667 + /// uint32_t->unsigned int
\r
668 + public uint flags;
\r
671 + [StructLayout(LayoutKind.Sequential)]
\r
672 + public struct hb_state_scanning_s
\r
675 + public int title_cur;
\r
678 + public int title_count;
\r
681 + [StructLayout(LayoutKind.Sequential)]
\r
682 + public struct hb_state_working_s
\r
685 + public float progress;
\r
688 + public int job_cur;
\r
691 + public int job_count;
\r
694 + public float rate_cur;
\r
697 + public float rate_avg;
\r
700 + public int hours;
\r
703 + public int minutes;
\r
706 + public int seconds;
\r
709 + public int sequence_id;
\r
712 + [StructLayout(LayoutKind.Sequential)]
\r
713 + public struct hb_state_workdone_s
\r
716 + public int error;
\r
719 + [StructLayout(LayoutKind.Sequential)]
\r
720 + public struct hb_state_muxing_s
\r
723 + public float progress;
\r
726 + [StructLayout(LayoutKind.Explicit)]
\r
727 + public struct hb_state_param_u
\r
730 + public hb_state_scanning_s scanning;
\r
733 + public hb_state_working_s working;
\r
736 + public hb_state_workdone_s workdone;
\r
739 + public hb_state_muxing_s muxing;
\r
742 + [StructLayout(LayoutKind.Sequential)]
\r
743 + public struct hb_state_s
\r
747 + public int state;
\r
748 + public hb_state_param_u param;
\r
751 + [StructLayout(LayoutKind.Sequential)]
\r
752 + public struct hb_audio_s
\r
757 + /// hb_audio_config_t->hb_audio_config_s
\r
758 + public hb_audio_config_s config;
\r
760 + // Padding for the part of the struct we don't care about marshaling.
\r
761 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)]
\r
762 + public byte[] padding;
\r
764 + /// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
\r
765 + //public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
\r
768 + [StructLayout(LayoutKind.Sequential)]
\r
769 + public struct hb_audio_config_s
\r
771 + public hb_audio_config_output_s output;
\r
772 + public hb_audio_config_input_s input;
\r
774 + /// Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
775 + public Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d flags;
\r
777 + public hb_audio_config_lang_s lang;
\r
780 + [StructLayout(LayoutKind.Sequential)]
\r
781 + public struct hb_audio_config_output_s
\r
784 + public int track;
\r
786 + /// uint32_t->unsigned int
\r
787 + public uint codec;
\r
790 + public int samplerate;
\r
793 + public int bitrate;
\r
796 + public int mixdown;
\r
799 + public double dynamic_range_compression;
\r
802 + [MarshalAs(UnmanagedType.LPStr)]
\r
803 + public string name;
\r
806 + [StructLayout(LayoutKind.Sequential)]
\r
807 + public struct hb_audio_config_input_s
\r
810 + public int track;
\r
812 + /// uint32_t->unsigned int
\r
813 + public uint codec;
\r
815 + /// uint32_t->unsigned int
\r
816 + public uint codec_param;
\r
818 + /// uint32_t->unsigned int
\r
819 + public uint version;
\r
821 + /// uint32_t->unsigned int
\r
822 + public uint mode;
\r
825 + public int samplerate;
\r
828 + public int bitrate;
\r
831 + public int channel_layout;
\r
834 + [StructLayout(LayoutKind.Explicit)]
\r
835 + public struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
846 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
847 + public struct hb_audio_config_lang_s
\r
850 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
851 + public string description;
\r
854 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
855 + public string simple;
\r
858 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
859 + public string iso639_2;
\r
861 + /// uint8_t->unsigned char
\r
862 + public byte type;
\r
865 + [StructLayout(LayoutKind.Sequential)]
\r
866 + public struct hb_mixdown_s
\r
869 + [MarshalAs(UnmanagedType.LPStr)]
\r
870 + public string human_readable_name;
\r
873 + [MarshalAs(UnmanagedType.LPStr)]
\r
874 + public string internal_name;
\r
877 + [MarshalAs(UnmanagedType.LPStr)]
\r
878 + public string short_name;
\r
881 + public int amixdown;
\r
884 + public enum hb_subtitle_config_s_subdest
\r
891 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
892 + public struct hb_subtitle_config_s
\r
894 + /// hb_subtitle_config_s_subdest
\r
895 + public hb_subtitle_config_s_subdest dest;
\r
898 + public int force;
\r
901 + public int default_track;
\r
904 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
\r
905 + public string src_filename;
\r
908 + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
\r
909 + public string src_codeset;
\r
912 + public long offset;
\r
915 + [StructLayout(LayoutKind.Sequential)]
\r
916 + public struct hb_fifo_s
\r
919 + public IntPtr @lock;
\r
921 + /// uint32_t->unsigned int
\r
922 + public uint capacity;
\r
924 + /// uint32_t->unsigned int
\r
925 + public uint size;
\r
927 + /// uint32_t->unsigned int
\r
928 + public uint buffer_size;
\r
931 + public IntPtr first;
\r
934 + public IntPtr last;
\r
937 + [StructLayout(LayoutKind.Sequential)]
\r
938 + public struct hb_lock_s
\r
942 + [StructLayout(LayoutKind.Sequential)]
\r
943 + public struct hb_buffer_s
\r
949 + public int alloc;
\r
952 + [MarshalAs(UnmanagedType.LPStr)]
\r
953 + public string data;
\r
959 + public long sequence;
\r
965 + public long start;
\r
968 + public long stop;
\r
971 + public int new_chap;
\r
973 + /// uint8_t->unsigned char
\r
974 + public byte frametype;
\r
976 + /// uint16_t->unsigned int
\r
977 + public uint flags;
\r
980 + public long renderOffset;
\r
989 + public int width;
\r
992 + public int height;
\r
995 + public IntPtr sub;
\r
998 + public IntPtr next;
\r
1001 + [StructLayout(LayoutKind.Sequential)]
\r
1002 + public struct hb_mux_data_s
\r
1004 + /// MP4TrackId->uint32_t->unsigned int
\r
1005 + public uint track;
\r
1007 + /// uint8_t->unsigned char
\r
1008 + public byte subtitle;
\r
1011 + public int sub_format;
\r
1013 + /// uint64_t->unsigned int
\r
1014 + public ulong sum_dur;
\r
1017 + [StructLayout(LayoutKind.Sequential)]
\r
1018 + public struct hb_interjob_s
\r
1021 + public int last_job;
\r
1024 + public int frame_count;
\r
1026 + /// uint64_t->unsigned int
\r
1027 + public ulong total_time;
\r
1030 + public int render_dropped;
\r
1033 + public int vrate;
\r
1036 + public int vrate_base;
\r
1038 + /// hb_subtitle_t*
\r
1039 + public IntPtr select_subtitle;
\r
1042 + /// Return Type: void
\r
1043 + ///param0: void*
\r
1044 + public delegate void hb_thread_s_function(IntPtr param0);
\r
1046 + [StructLayout(LayoutKind.Sequential)]
\r
1047 + public struct hb_thread_s
\r
1050 + [MarshalAs(UnmanagedType.LPStr)]
\r
1051 + public string name;
\r
1054 + public int priority;
\r
1056 + /// hb_thread_s_function
\r
1057 + public hb_thread_s_function AnonymousMember1;
\r
1060 + public IntPtr arg;
\r
1063 + public IntPtr @lock;
\r
1066 + public int exited;
\r
1068 + /// pthread_t->ptw32_handle_t->Anonymous_55c509b5_bbf2_4788_a684_ac1bd0056655
\r
1069 + public ptw32_handle_t thread;
\r
1072 + [StructLayout(LayoutKind.Sequential)]
\r
1073 + public struct ptw32_handle_t
\r
1076 + public IntPtr p;
\r
1078 + /// unsigned int
\r
1082 + [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
\r
1083 + public delegate void LoggingCallback(string message);
\r
1085 + public partial class HbLib
\r
1087 + [DllImport("hb.dll", EntryPoint = "hb_calc_bitrate", CallingConvention = CallingConvention.Cdecl)]
\r
1088 + public static extern int hb_calc_bitrate(ref hb_job_s job, int size);
\r
1090 + [DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]
\r
1091 + public static extern void hb_register_logger(LoggingCallback callback);
\r
1093 + [DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]
\r
1094 + public static extern void hb_register_error_handler(LoggingCallback callback);
\r
1096 + /// Return Type: hb_handle_t*
\r
1098 + ///update_check: int
\r
1099 + [DllImport("hb.dll", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]
\r
1100 + public static extern IntPtr hb_init(int verbose, int update_check);
\r
1103 + /// Return Type: hb_handle_t*
\r
1105 + ///update_check: int
\r
1106 + [DllImport("hb.dll", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]
\r
1107 + public static extern IntPtr hb_init_dl(int verbose, int update_check);
\r
1110 + /// Return Type: char*
\r
1111 + ///param0: hb_handle_t*
\r
1112 + [DllImport("hb.dll", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]
\r
1113 + public static extern IntPtr hb_get_version(ref hb_handle_s param0);
\r
1116 + /// Return Type: int
\r
1117 + ///param0: hb_handle_t*
\r
1118 + [DllImport("hb.dll", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]
\r
1119 + public static extern int hb_get_build(ref hb_handle_s param0);
\r
1122 + /// Return Type: int
\r
1123 + ///h: hb_handle_t*
\r
1124 + ///version: char**
\r
1125 + [DllImport("hb.dll", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]
\r
1126 + public static extern int hb_check_update(ref hb_handle_s h, ref IntPtr version);
\r
1129 + /// Return Type: void
\r
1130 + ///param0: hb_handle_t*
\r
1132 + [DllImport("hb.dll", EntryPoint = "hb_set_cpu_count", CallingConvention = CallingConvention.Cdecl)]
\r
1133 + public static extern void hb_set_cpu_count(ref hb_handle_s param0, int param1);
\r
1136 + /// Return Type: char*
\r
1138 + [DllImport("hb.dll", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]
\r
1139 + public static extern IntPtr hb_dvd_name(IntPtr path);
\r
1142 + /// Return Type: void
\r
1144 + [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]
\r
1145 + public static extern void hb_dvd_set_dvdnav(int enable);
\r
1148 + /// Return Type: void
\r
1149 + ///param0: hb_handle_t*
\r
1151 + ///title_index: int
\r
1152 + ///preview_count: int
\r
1153 + ///store_previews: int
\r
1154 + [DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
\r
1155 + public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path, int title_index, int preview_count, int store_previews);
\r
1158 + /// Return Type: hb_list_t*
\r
1159 + ///param0: hb_handle_t*
\r
1160 + [DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]
\r
1161 + public static extern IntPtr hb_get_titles(IntPtr hbHandle);
\r
1164 + /// Return Type: int
\r
1165 + ///buf: hb_buffer_t*
\r
1168 + ///color_equal: int
\r
1169 + ///color_diff: int
\r
1170 + ///threshold: int
\r
1171 + ///prog_equal: int
\r
1172 + ///prog_diff: int
\r
1173 + ///prog_threshold: int
\r
1174 + [DllImport("hb.dll", EntryPoint = "hb_detect_comb", CallingConvention = CallingConvention.Cdecl)]
\r
1175 + 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);
\r
1177 + [DllImport("hb.dll", EntryPoint = "hb_get_preview_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1178 + public static extern void hb_get_preview_by_index(IntPtr hbHandle, int title_index, int picture, IntPtr buffer);
\r
1180 + /// Return Type: void
\r
1181 + ///param0: hb_handle_t*
\r
1182 + ///param1: hb_title_t*
\r
1184 + ///param3: uint8_t*
\r
1185 + [DllImport("hb.dll", EntryPoint = "hb_get_preview", CallingConvention = CallingConvention.Cdecl)]
\r
1186 + public static extern void hb_get_preview(IntPtr hbHandle, ref hb_title_s title, int preview, IntPtr buffer);
\r
1189 + /// Return Type: void
\r
1190 + ///param0: hb_job_t*
\r
1191 + ///ratio: double
\r
1193 + [DllImport("hb.dll", EntryPoint = "hb_set_size", CallingConvention = CallingConvention.Cdecl)]
\r
1194 + public static extern void hb_set_size(ref hb_job_s param0, double ratio, int pixels);
\r
1196 + [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1197 + public static extern void hb_set_anamorphic_size_by_index(IntPtr hbHandle, int title_index, ref int output_width, ref int output_height, ref int output_par_width, ref int output_par_height);
\r
1199 + /// Return Type: void
\r
1200 + ///param0: hb_job_t*
\r
1201 + ///output_width: int*
\r
1202 + ///output_height: int*
\r
1203 + ///output_par_width: int*
\r
1204 + ///output_par_height: int*
\r
1205 + [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size", CallingConvention = CallingConvention.Cdecl)]
\r
1206 + 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);
\r
1209 + /// Return Type: int
\r
1210 + ///param0: hb_handle_t*
\r
1211 + [DllImport("hb.dll", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]
\r
1212 + public static extern int hb_count(IntPtr hbHandle);
\r
1215 + /// Return Type: hb_job_t*
\r
1216 + ///param0: hb_handle_t*
\r
1218 + [DllImport("hb.dll", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]
\r
1219 + public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);
\r
1221 + [DllImport("hb.dll", EntryPoint = "hb_set_chapter_name", CallingConvention = CallingConvention.Cdecl)]
\r
1222 + public static extern void hb_set_chapter_name(IntPtr hbHandle, int title_index, int chapter_index, [In] [MarshalAs(UnmanagedType.LPStr)] string chapter_name);
\r
1224 + [DllImport("hb.dll", EntryPoint = "hb_set_job", CallingConvention = CallingConvention.Cdecl)]
\r
1225 + public static extern void hb_set_job(IntPtr hbHandle, int title_index, ref hb_job_s job);
\r
1227 + /// Return Type: void
\r
1228 + ///param0: hb_handle_t*
\r
1229 + ///param1: hb_job_t*
\r
1230 + [DllImport("hb.dll", EntryPoint = "hb_add", CallingConvention = CallingConvention.Cdecl)]
\r
1231 + public static extern void hb_add(IntPtr hbHandle, ref hb_job_s job);
\r
1234 + /// Return Type: void
\r
1235 + ///param0: hb_handle_t*
\r
1236 + ///param1: hb_job_t*
\r
1237 + [DllImport("hb.dll", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]
\r
1238 + public static extern void hb_rem(IntPtr hbHandle, IntPtr job);
\r
1241 + /// Return Type: void
\r
1242 + ///param0: hb_handle_t*
\r
1243 + [DllImport("hb.dll", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]
\r
1244 + public static extern void hb_start(IntPtr hbHandle);
\r
1247 + /// Return Type: void
\r
1248 + ///param0: hb_handle_t*
\r
1249 + [DllImport("hb.dll", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]
\r
1250 + public static extern void hb_pause(IntPtr hbHandle);
\r
1253 + /// Return Type: void
\r
1254 + ///param0: hb_handle_t*
\r
1255 + [DllImport("hb.dll", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]
\r
1256 + public static extern void hb_resume(IntPtr hbHandle);
\r
1259 + /// Return Type: void
\r
1260 + ///param0: hb_handle_t*
\r
1261 + [DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]
\r
1262 + public static extern void hb_stop(IntPtr hbHandle);
\r
1264 + [DllImport("hb.dll", EntryPoint = "hb_get_filter_object", CallingConvention = CallingConvention.Cdecl)]
\r
1265 + //public static extern IntPtr hb_get_filter_object(int filter_id, [In] [MarshalAs(UnmanagedType.LPStr)] string settings);
\r
1266 + public static extern IntPtr hb_get_filter_object(int filter_id, IntPtr settings);
\r
1268 + /// Return Type: void
\r
1269 + ///param0: hb_handle_t*
\r
1270 + ///param1: hb_state_t*
\r
1271 + [DllImport("hb.dll", EntryPoint = "hb_get_state", CallingConvention = CallingConvention.Cdecl)]
\r
1272 + public static extern void hb_get_state(IntPtr hbHandle, ref hb_state_s state);
\r
1275 + /// Return Type: void
\r
1276 + ///param0: hb_handle_t*
\r
1277 + ///param1: hb_state_t*
\r
1278 + [DllImport("hb.dll", EntryPoint = "hb_get_state2", CallingConvention = CallingConvention.Cdecl)]
\r
1279 + public static extern void hb_get_state2(ref hb_handle_s param0, ref hb_state_s param1);
\r
1282 + /// Return Type: int
\r
1283 + ///param0: hb_handle_t*
\r
1284 + [DllImport("hb.dll", EntryPoint = "hb_get_scancount", CallingConvention = CallingConvention.Cdecl)]
\r
1285 + public static extern int hb_get_scancount(ref hb_handle_s param0);
\r
1288 + /// Return Type: void
\r
1289 + ///param0: hb_handle_t**
\r
1290 + [DllImport("hb.dll", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]
\r
1291 + public static extern void hb_close(IntPtr hbHandle);
\r
1293 + [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
\r
1294 + public static extern void hb_global_close();
\r