1 namespace HandBrake.Interop
\r
4 using System.Runtime.InteropServices;
\r
6 internal partial class NativeConstants
\r
8 public const int HB_ACODEC_MASK = 0x00FF00;
\r
9 public const int HB_ACODEC_FAAC = 0x000100;
\r
10 public const int HB_ACODEC_LAME = 0x000200;
\r
11 public const int HB_ACODEC_VORBIS = 0x000400;
\r
12 public const int HB_ACODEC_AC3 = 0x000800;
\r
13 public const int HB_ACODEC_MPGA = 0x001000;
\r
14 public const int HB_ACODEC_LPCM = 0x002000;
\r
15 public const int HB_ACODEC_DCA = 0x004000;
\r
16 public const int HB_ACODEC_FFMPEG = 0x008000;
\r
17 public const int HB_ACODEC_CA_AAC = 0x010000;
\r
19 public const int HB_AMIXDOWN_DCA_FORMAT_MASK = 0x00FFF000;
\r
20 public const int HB_AMIXDOWN_A52_FORMAT_MASK = 0x00000FF0;
\r
21 public const int HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK = 0x0000000F;
\r
22 public const int HB_AMIXDOWN_MONO = 0x01000001;
\r
23 public const int HB_AMIXDOWN_STEREO = 0x02002022;
\r
24 public const int HB_AMIXDOWN_DOLBY = 0x042070A2;
\r
25 public const int HB_AMIXDOWN_DOLBYPLII = 0x084094A2;
\r
26 public const int HB_AMIXDOWN_6CH = 0x10089176;
\r
28 public const int HB_VCODEC_MASK = 0x0000FF;
\r
29 public const int HB_VCODEC_FFMPEG = 0x000001;
\r
30 public const int HB_VCODEC_X264 = 0x000002;
\r
31 public const int HB_VCODEC_THEORA = 0x000004;
\r
33 public const int HB_MUX_MASK = 0xFF0000;
\r
34 public const int HB_MUX_MP4 = 0x010000;
\r
35 public const int HB_MUX_PSP = 0x020000;
\r
36 public const int HB_MUX_AVI = 0x040000;
\r
37 public const int HB_MUX_OGM = 0x080000;
\r
38 public const int HB_MUX_IPOD = 0x100000;
\r
39 public const int HB_MUX_MKV = 0x200000;
\r
41 public const int HBTF_NO_IDR = 1 << 0;
\r
43 public const int HB_STATE_IDLE = 1;
\r
44 public const int HB_STATE_SCANNING = 2;
\r
45 public const int HB_STATE_SCANDONE = 4;
\r
46 public const int HB_STATE_WORKING = 8;
\r
47 public const int HB_STATE_PAUSED = 16;
\r
48 public const int HB_STATE_WORKDONE = 32;
\r
49 public const int HB_STATE_MUXING = 64;
\r
51 public const int HB_ERROR_NONE = 0;
\r
52 public const int HB_ERROR_CANCELED = 1;
\r
53 public const int HB_ERROR_UNKNOWN = 2;
\r
55 public const int AUDIO_F_DOLBY = 1 << 31;
\r
57 public const int HB_FRAME_IDR = 0x01;
\r
58 public const int HB_FRAME_I = 0x02;
\r
59 public const int HB_FRAME_AUDIO = 0x04;
\r
60 public const int HB_FRAME_P = 0x10;
\r
61 public const int HB_FRAME_B = 0x20;
\r
62 public const int HB_FRAME_BREF = 0x40;
\r
63 public const int HB_FRAME_KEY = 0x0F;
\r
64 public const int HB_FRAME_REF = 0xF0;
\r
66 public const int HB_CONFIG_MAX_SIZE = 8192;
\r
68 public const int HB_FILTER_DETELECINE = 1;
\r
69 public const int HB_FILTER_DEINTERLACE = 2;
\r
70 public const int HB_FILTER_DEBLOCK = 3;
\r
71 public const int HB_FILTER_DENOISE = 4;
\r
72 public const int HB_FILTER_DECOMB = 5;
\r
73 public const int HB_FILTER_ROTATE = 6;
\r
76 [StructLayout(LayoutKind.Sequential)]
\r
77 internal struct hb_anamorphic_substruct
\r
86 public int par_width;
\r
89 public int par_height;
\r
92 public int dar_width;
\r
95 public int dar_height;
\r
98 public int keep_display_aspect;
\r
101 [StructLayout(LayoutKind.Sequential)]
\r
102 internal struct hb_job_s
\r
105 public int sequence_id;
\r
108 public IntPtr title;
\r
110 public int feature;
\r
113 public int chapter_start;
\r
116 public int chapter_end;
\r
119 public int chapter_markers;
\r
122 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
126 public int deinterlace;
\r
129 public IntPtr filters;
\r
138 public int keep_ratio;
\r
141 public int grayscale;
\r
143 public hb_anamorphic_substruct anamorphic;
\r
145 public int modulus;
\r
148 public int maxWidth;
\r
151 public int maxHeight;
\r
157 public float vquality;
\r
160 public int vbitrate;
\r
166 public int vrate_base;
\r
178 public int h264_13;
\r
181 public int h264_level;
\r
184 //[MarshalAs(UnmanagedType.LPStr)]
\r
185 //public string x264opts;
\r
187 public IntPtr x264opts;
\r
190 public int areBframes;
\r
193 public int color_matrix;
\r
196 public IntPtr list_audio;
\r
199 public IntPtr list_subtitle;
\r
205 [MarshalAs(UnmanagedType.LPStr)]
\r
206 public string file;
\r
209 public int largeFileSize;
\r
212 public int mp4_optimize;
\r
215 public int ipod_atom;
\r
218 public int indepth_scan;
\r
220 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
221 public hb_subtitle_config_s select_subtitle_config;
\r
226 public int frame_to_start;
\r
228 public long pts_to_start;
\r
231 public int frame_to_stop;
\r
234 public long pts_to_stop;
\r
237 public int start_at_preview;
\r
240 public int seek_points;
\r
242 /// uint32_t->unsigned int
\r
243 public uint frames_to_skip;
\r
245 // Padding for the part of the struct we don't care about marshaling.
\r
246 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24644, ArraySubType = UnmanagedType.U1)]
\r
247 public byte[] padding;
\r
250 [StructLayout(LayoutKind.Sequential)]
\r
251 internal struct hb_list_s
\r
254 public IntPtr items;
\r
257 public int items_alloc;
\r
260 public int items_count;
\r
263 [StructLayout(LayoutKind.Sequential)]
\r
264 internal struct hb_rate_s
\r
267 [MarshalAs(UnmanagedType.LPStr)]
\r
268 public string @string;
\r
274 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
275 internal struct hb_handle_s
\r
283 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
\r
284 public string version;
\r
287 public IntPtr update_thread;
\r
293 public IntPtr main_thread;
\r
299 public IntPtr list_title;
\r
302 public IntPtr scan_thread;
\r
305 public IntPtr jobs;
\r
308 public IntPtr current_job;
\r
311 public int job_count;
\r
314 public int job_count_permanent;
\r
317 public int work_die;
\r
320 public int work_error;
\r
323 public IntPtr work_thread;
\r
326 public int cpu_count;
\r
329 public IntPtr state_lock;
\r
331 /// hb_state_t->hb_state_s
\r
332 public hb_state_s state;
\r
338 public IntPtr pause_lock;
\r
341 public int scanCount;
\r
344 public IntPtr interjob;
\r
347 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
348 internal struct hb_chapter_s
\r
360 public int cell_start;
\r
363 public int cell_end;
\r
366 public int block_start;
\r
369 public int block_end;
\r
372 public int block_count;
\r
378 public int minutes;
\r
381 public int seconds;
\r
383 /// uint64_t->unsigned int
\r
384 public ulong duration;
\r
387 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
388 public string title;
\r
391 internal enum hb_subtitle_s_subtype
\r
398 internal enum hb_subtitle_s_subsource
\r
413 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
414 internal struct hb_subtitle_s
\r
422 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
423 public hb_subtitle_config_s config;
\r
425 /// hb_subtitle_s_subtype
\r
426 public hb_subtitle_s_subtype format;
\r
428 /// hb_subtitle_s_subsource
\r
429 public hb_subtitle_s_subsource source;
\r
432 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
433 public string lang;
\r
436 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
437 public string iso639_2;
\r
439 /// uint8_t->unsigned char
\r
442 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
\r
443 public uint[] palette;
\r
453 public int forced_hits;
\r
456 public IntPtr fifo_in;
\r
459 public IntPtr fifo_raw;
\r
462 public IntPtr fifo_sync;
\r
465 public IntPtr fifo_out;
\r
468 public IntPtr mux_data;
\r
471 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
472 internal struct hb_metadata_s
\r
475 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
476 public string name;
\r
479 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
480 public string artist;
\r
483 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
484 public string composer;
\r
487 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
488 public string release_date;
\r
491 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
492 public string comment;
\r
495 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
496 public string album;
\r
499 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
500 public string genre;
\r
502 /// uint32_t->unsigned int
\r
503 public uint coverart_size;
\r
506 public IntPtr coverart;
\r
509 internal enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
516 internal enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
518 /// HB_MPEG2_PS_DEMUXER -> 0
\r
519 HB_MPEG2_PS_DEMUXER = 0,
\r
521 HB_MPEG2_TS_DEMUXER,
\r
526 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
527 internal struct hb_title_s
\r
529 /// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
530 public Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550 type;
\r
533 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
537 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
538 public string name;
\r
540 //public fixed byte dvd[1024];
\r
542 //public fixed byte name[1024];
\r
554 public int cell_start;
\r
557 public int cell_end;
\r
560 public int block_start;
\r
563 public int block_end;
\r
566 public int block_count;
\r
569 public int angle_count;
\r
575 public int minutes;
\r
578 public int seconds;
\r
580 /// uint64_t->unsigned int
\r
581 public ulong duration;
\r
584 public double aspect;
\r
587 public double container_aspect;
\r
596 public int pixel_aspect_width;
\r
599 public int pixel_aspect_height;
\r
605 public int rate_base;
\r
608 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
611 //public fixed int crop[4];
\r
613 /// Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
614 public Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db demuxer;
\r
617 public int detected_interlacing;
\r
620 public int video_id;
\r
623 public int video_codec;
\r
626 public int video_codec_param;
\r
629 public IntPtr video_codec_name;
\r
632 public int video_bitrate;
\r
635 public IntPtr container_name;
\r
638 public int data_rate;
\r
641 public IntPtr metadata;
\r
644 public IntPtr list_chapter;
\r
647 public IntPtr list_audio;
\r
650 public IntPtr list_subtitle;
\r
655 /// uint32_t->unsigned int
\r
659 [StructLayout(LayoutKind.Sequential)]
\r
660 internal struct hb_state_scanning_s
\r
663 public int title_cur;
\r
666 public int title_count;
\r
669 [StructLayout(LayoutKind.Sequential)]
\r
670 internal struct hb_state_working_s
\r
673 public float progress;
\r
676 public int job_cur;
\r
679 public int job_count;
\r
682 public float rate_cur;
\r
685 public float rate_avg;
\r
691 public int minutes;
\r
694 public int seconds;
\r
697 public int sequence_id;
\r
700 [StructLayout(LayoutKind.Sequential)]
\r
701 internal struct hb_state_workdone_s
\r
707 [StructLayout(LayoutKind.Sequential)]
\r
708 internal struct hb_state_muxing_s
\r
711 public float progress;
\r
714 [StructLayout(LayoutKind.Explicit)]
\r
715 internal struct hb_state_param_u
\r
718 public hb_state_scanning_s scanning;
\r
721 public hb_state_working_s working;
\r
724 public hb_state_workdone_s workdone;
\r
727 public hb_state_muxing_s muxing;
\r
730 [StructLayout(LayoutKind.Sequential)]
\r
731 internal struct hb_state_s
\r
736 public hb_state_param_u param;
\r
739 [StructLayout(LayoutKind.Sequential)]
\r
740 internal struct hb_audio_s
\r
745 /// hb_audio_config_t->hb_audio_config_s
\r
746 public hb_audio_config_s config;
\r
748 // Padding for the part of the struct we don't care about marshaling.
\r
749 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)]
\r
750 public byte[] padding;
\r
752 /// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
\r
753 //public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
\r
756 [StructLayout(LayoutKind.Sequential)]
\r
757 internal struct hb_audio_config_s
\r
759 public hb_audio_config_output_s output;
\r
760 public hb_audio_config_input_s input;
\r
762 /// Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
763 public Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d flags;
\r
765 public hb_audio_config_lang_s lang;
\r
768 [StructLayout(LayoutKind.Sequential)]
\r
769 internal struct hb_audio_config_output_s
\r
774 /// uint32_t->unsigned int
\r
778 public int samplerate;
\r
781 public int bitrate;
\r
784 public int mixdown;
\r
787 public double dynamic_range_compression;
\r
790 [MarshalAs(UnmanagedType.LPStr)]
\r
791 public string name;
\r
794 [StructLayout(LayoutKind.Sequential)]
\r
795 internal struct hb_audio_config_input_s
\r
800 /// uint32_t->unsigned int
\r
803 /// uint32_t->unsigned int
\r
804 public uint codec_param;
\r
806 /// uint32_t->unsigned int
\r
807 public uint version;
\r
809 /// uint32_t->unsigned int
\r
813 public int samplerate;
\r
816 public int bitrate;
\r
819 public int channel_layout;
\r
822 [StructLayout(LayoutKind.Explicit)]
\r
823 internal struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
834 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
835 internal struct hb_audio_config_lang_s
\r
838 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
839 public string description;
\r
842 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
843 public string simple;
\r
846 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
847 public string iso639_2;
\r
849 /// uint8_t->unsigned char
\r
853 [StructLayout(LayoutKind.Sequential)]
\r
854 internal struct hb_mixdown_s
\r
857 [MarshalAs(UnmanagedType.LPStr)]
\r
858 public string human_readable_name;
\r
861 [MarshalAs(UnmanagedType.LPStr)]
\r
862 public string internal_name;
\r
865 [MarshalAs(UnmanagedType.LPStr)]
\r
866 public string short_name;
\r
869 public int amixdown;
\r
872 internal enum hb_subtitle_config_s_subdest
\r
879 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
880 internal struct hb_subtitle_config_s
\r
882 /// hb_subtitle_config_s_subdest
\r
883 public hb_subtitle_config_s_subdest dest;
\r
889 public int default_track;
\r
892 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
\r
893 public string src_filename;
\r
896 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
\r
897 public string src_codeset;
\r
900 public long offset;
\r
903 [StructLayout(LayoutKind.Sequential)]
\r
904 internal struct hb_fifo_s
\r
907 public IntPtr @lock;
\r
909 /// uint32_t->unsigned int
\r
910 public uint capacity;
\r
912 /// uint32_t->unsigned int
\r
915 /// uint32_t->unsigned int
\r
916 public uint buffer_size;
\r
919 public IntPtr first;
\r
922 public IntPtr last;
\r
925 [StructLayout(LayoutKind.Sequential)]
\r
926 internal struct hb_lock_s
\r
930 [StructLayout(LayoutKind.Sequential)]
\r
931 internal struct hb_buffer_s
\r
940 [MarshalAs(UnmanagedType.LPStr)]
\r
941 public string data;
\r
947 public long sequence;
\r
959 public int new_chap;
\r
961 /// uint8_t->unsigned char
\r
962 public byte frametype;
\r
964 /// uint16_t->unsigned int
\r
968 public long renderOffset;
\r
986 public IntPtr next;
\r
989 [StructLayout(LayoutKind.Sequential)]
\r
990 internal struct hb_mux_data_s
\r
992 /// MP4TrackId->uint32_t->unsigned int
\r
995 /// uint8_t->unsigned char
\r
996 public byte subtitle;
\r
999 public int sub_format;
\r
1001 /// uint64_t->unsigned int
\r
1002 public ulong sum_dur;
\r
1005 [StructLayout(LayoutKind.Sequential)]
\r
1006 internal struct hb_interjob_s
\r
1009 public int last_job;
\r
1012 public int frame_count;
\r
1014 /// uint64_t->unsigned int
\r
1015 public ulong total_time;
\r
1018 public int render_dropped;
\r
1024 public int vrate_base;
\r
1026 /// hb_subtitle_t*
\r
1027 public IntPtr select_subtitle;
\r
1030 /// Return Type: void
\r
1032 internal delegate void hb_thread_s_function(IntPtr param0);
\r
1034 [StructLayout(LayoutKind.Sequential)]
\r
1035 internal struct hb_thread_s
\r
1038 [MarshalAs(UnmanagedType.LPStr)]
\r
1039 public string name;
\r
1042 public int priority;
\r
1044 /// hb_thread_s_function
\r
1045 public hb_thread_s_function AnonymousMember1;
\r
1048 public IntPtr arg;
\r
1051 public IntPtr @lock;
\r
1054 public int exited;
\r
1056 /// pthread_t->ptw32_handle_t->Anonymous_55c509b5_bbf2_4788_a684_ac1bd0056655
\r
1057 public ptw32_handle_t thread;
\r
1060 [StructLayout(LayoutKind.Sequential)]
\r
1061 internal struct ptw32_handle_t
\r
1070 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
\r
1071 internal delegate void LoggingCallback(string message);
\r
1073 internal partial class HbLib
\r
1075 [DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]
\r
1076 public static extern void hb_register_logger(LoggingCallback callback);
\r
1078 [DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]
\r
1079 public static extern void hb_register_error_handler(LoggingCallback callback);
\r
1081 /// Return Type: hb_handle_t*
\r
1083 ///update_check: int
\r
1084 [DllImport("hb.dll", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]
\r
1085 public static extern IntPtr hb_init(int verbose, int update_check);
\r
1088 /// Return Type: hb_handle_t*
\r
1090 ///update_check: int
\r
1091 [DllImport("hb.dll", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]
\r
1092 public static extern IntPtr hb_init_dl(int verbose, int update_check);
\r
1095 /// Return Type: char*
\r
1096 ///param0: hb_handle_t*
\r
1097 [DllImport("hb.dll", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]
\r
1098 public static extern IntPtr hb_get_version(ref hb_handle_s param0);
\r
1101 /// Return Type: int
\r
1102 ///param0: hb_handle_t*
\r
1103 [DllImport("hb.dll", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]
\r
1104 public static extern int hb_get_build(ref hb_handle_s param0);
\r
1107 /// Return Type: int
\r
1108 ///h: hb_handle_t*
\r
1109 ///version: char**
\r
1110 [DllImport("hb.dll", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]
\r
1111 public static extern int hb_check_update(ref hb_handle_s h, ref IntPtr version);
\r
1114 /// Return Type: void
\r
1115 ///param0: hb_handle_t*
\r
1117 [DllImport("hb.dll", EntryPoint = "hb_set_cpu_count", CallingConvention = CallingConvention.Cdecl)]
\r
1118 public static extern void hb_set_cpu_count(ref hb_handle_s param0, int param1);
\r
1121 /// Return Type: char*
\r
1123 [DllImport("hb.dll", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]
\r
1124 public static extern IntPtr hb_dvd_name(IntPtr path);
\r
1127 /// Return Type: void
\r
1129 [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]
\r
1130 public static extern void hb_dvd_set_dvdnav(int enable);
\r
1133 /// Return Type: void
\r
1134 ///param0: hb_handle_t*
\r
1136 ///title_index: int
\r
1137 ///preview_count: int
\r
1138 ///store_previews: int
\r
1139 [DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
\r
1140 public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path, int title_index, int preview_count, int store_previews);
\r
1143 /// Return Type: hb_list_t*
\r
1144 ///param0: hb_handle_t*
\r
1145 [DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]
\r
1146 public static extern IntPtr hb_get_titles(IntPtr hbHandle);
\r
1149 /// Return Type: int
\r
1150 ///buf: hb_buffer_t*
\r
1153 ///color_equal: int
\r
1154 ///color_diff: int
\r
1156 ///prog_equal: int
\r
1158 ///prog_threshold: int
\r
1159 [DllImport("hb.dll", EntryPoint = "hb_detect_comb", CallingConvention = CallingConvention.Cdecl)]
\r
1160 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
1162 [DllImport("hb.dll", EntryPoint = "hb_get_preview_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1163 public static extern void hb_get_preview_by_index(IntPtr hbHandle, int title_index, int picture, IntPtr buffer);
\r
1165 /// Return Type: void
\r
1166 ///param0: hb_handle_t*
\r
1167 ///param1: hb_title_t*
\r
1169 ///param3: uint8_t*
\r
1170 [DllImport("hb.dll", EntryPoint = "hb_get_preview", CallingConvention = CallingConvention.Cdecl)]
\r
1171 public static extern void hb_get_preview(IntPtr hbHandle, ref hb_title_s title, int preview, IntPtr buffer);
\r
1174 /// Return Type: void
\r
1175 ///param0: hb_job_t*
\r
1178 [DllImport("hb.dll", EntryPoint = "hb_set_size", CallingConvention = CallingConvention.Cdecl)]
\r
1179 public static extern void hb_set_size(ref hb_job_s param0, double ratio, int pixels);
\r
1181 [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1182 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
1184 /// Return Type: void
\r
1185 ///param0: hb_job_t*
\r
1186 ///output_width: int*
\r
1187 ///output_height: int*
\r
1188 ///output_par_width: int*
\r
1189 ///output_par_height: int*
\r
1190 [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size", CallingConvention = CallingConvention.Cdecl)]
\r
1191 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
1194 /// Return Type: int
\r
1195 ///param0: hb_handle_t*
\r
1196 [DllImport("hb.dll", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]
\r
1197 public static extern int hb_count(IntPtr hbHandle);
\r
1200 /// Return Type: hb_job_t*
\r
1201 ///param0: hb_handle_t*
\r
1203 [DllImport("hb.dll", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]
\r
1204 public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);
\r
1206 [DllImport("hb.dll", EntryPoint = "hb_set_chapter_name", CallingConvention = CallingConvention.Cdecl)]
\r
1207 public static extern void hb_set_chapter_name(IntPtr hbHandle, int title_index, int chapter_index, [In] [MarshalAs(UnmanagedType.LPStr)] string chapter_name);
\r
1209 [DllImport("hb.dll", EntryPoint = "hb_set_job", CallingConvention = CallingConvention.Cdecl)]
\r
1210 public static extern void hb_set_job(IntPtr hbHandle, int title_index, ref hb_job_s job);
\r
1212 /// Return Type: void
\r
1213 ///param0: hb_handle_t*
\r
1214 ///param1: hb_job_t*
\r
1215 [DllImport("hb.dll", EntryPoint = "hb_add", CallingConvention = CallingConvention.Cdecl)]
\r
1216 public static extern void hb_add(IntPtr hbHandle, ref hb_job_s job);
\r
1219 /// Return Type: void
\r
1220 ///param0: hb_handle_t*
\r
1221 ///param1: hb_job_t*
\r
1222 [DllImport("hb.dll", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]
\r
1223 public static extern void hb_rem(IntPtr hbHandle, IntPtr job);
\r
1226 /// Return Type: void
\r
1227 ///param0: hb_handle_t*
\r
1228 [DllImport("hb.dll", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]
\r
1229 public static extern void hb_start(IntPtr hbHandle);
\r
1232 /// Return Type: void
\r
1233 ///param0: hb_handle_t*
\r
1234 [DllImport("hb.dll", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]
\r
1235 public static extern void hb_pause(IntPtr hbHandle);
\r
1238 /// Return Type: void
\r
1239 ///param0: hb_handle_t*
\r
1240 [DllImport("hb.dll", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]
\r
1241 public static extern void hb_resume(IntPtr hbHandle);
\r
1244 /// Return Type: void
\r
1245 ///param0: hb_handle_t*
\r
1246 [DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]
\r
1247 public static extern void hb_stop(IntPtr hbHandle);
\r
1249 [DllImport("hb.dll", EntryPoint = "hb_get_filter_object", CallingConvention = CallingConvention.Cdecl)]
\r
1250 //public static extern IntPtr hb_get_filter_object(int filter_id, [In] [MarshalAs(UnmanagedType.LPStr)] string settings);
\r
1251 public static extern IntPtr hb_get_filter_object(int filter_id, IntPtr settings);
\r
1253 /// Return Type: void
\r
1254 ///param0: hb_handle_t*
\r
1255 ///param1: hb_state_t*
\r
1256 [DllImport("hb.dll", EntryPoint = "hb_get_state", CallingConvention = CallingConvention.Cdecl)]
\r
1257 public static extern void hb_get_state(IntPtr hbHandle, ref hb_state_s state);
\r
1260 /// Return Type: void
\r
1261 ///param0: hb_handle_t*
\r
1262 ///param1: hb_state_t*
\r
1263 [DllImport("hb.dll", EntryPoint = "hb_get_state2", CallingConvention = CallingConvention.Cdecl)]
\r
1264 public static extern void hb_get_state2(ref hb_handle_s param0, ref hb_state_s param1);
\r
1267 /// Return Type: int
\r
1268 ///param0: hb_handle_t*
\r
1269 [DllImport("hb.dll", EntryPoint = "hb_get_scancount", CallingConvention = CallingConvention.Cdecl)]
\r
1270 public static extern int hb_get_scancount(ref hb_handle_s param0);
\r
1273 /// Return Type: void
\r
1274 ///param0: hb_handle_t**
\r
1275 [DllImport("hb.dll", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]
\r
1276 public static extern void hb_close(IntPtr hbHandle);
\r
1278 [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
\r
1279 public static extern void hb_global_close();
\r