2 using System.Collections.Generic;
\r
5 using System.Runtime.InteropServices;
\r
7 namespace HandBrake.Interop
\r
10 public partial class NativeConstants
\r
12 public const int HB_ACODEC_MASK = 0x00FF00;
\r
13 public const int HB_ACODEC_FAAC = 0x000100;
\r
14 public const int HB_ACODEC_LAME = 0x000200;
\r
15 public const int HB_ACODEC_VORBIS = 0x000400;
\r
16 public const int HB_ACODEC_AC3 = 0x000800;
\r
17 public const int HB_ACODEC_MPGA = 0x001000;
\r
18 public const int HB_ACODEC_LPCM = 0x002000;
\r
19 public const int HB_ACODEC_DCA = 0x004000;
\r
20 public const int HB_ACODEC_FFMPEG = 0x008000;
\r
21 public const int HB_ACODEC_CA_AAC = 0x010000;
\r
23 public const int HB_AMIXDOWN_DCA_FORMAT_MASK = 0x00FFF000;
\r
24 public const int HB_AMIXDOWN_A52_FORMAT_MASK = 0x00000FF0;
\r
25 public const int HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK = 0x0000000F;
\r
26 public const int HB_AMIXDOWN_MONO = 0x01000001;
\r
27 public const int HB_AMIXDOWN_STEREO = 0x02002022;
\r
28 public const int HB_AMIXDOWN_DOLBY = 0x042070A2;
\r
29 public const int HB_AMIXDOWN_DOLBYPLII = 0x084094A2;
\r
30 public const int HB_AMIXDOWN_6CH = 0x10089176;
\r
32 public const int HB_VCODEC_MASK = 0x0000FF;
\r
33 public const int HB_VCODEC_FFMPEG = 0x000001;
\r
34 public const int HB_VCODEC_X264 = 0x000002;
\r
35 public const int HB_VCODEC_THEORA = 0x000004;
\r
37 public const int HB_MUX_MASK = 0xFF0000;
\r
38 public const int HB_MUX_MP4 = 0x010000;
\r
39 public const int HB_MUX_PSP = 0x020000;
\r
40 public const int HB_MUX_AVI = 0x040000;
\r
41 public const int HB_MUX_OGM = 0x080000;
\r
42 public const int HB_MUX_IPOD = 0x100000;
\r
43 public const int HB_MUX_MKV = 0x200000;
\r
45 public const int HBTF_NO_IDR = 1 << 0;
\r
47 public const int HB_STATE_IDLE = 1;
\r
48 public const int HB_STATE_SCANNING = 2;
\r
49 public const int HB_STATE_SCANDONE = 4;
\r
50 public const int HB_STATE_WORKING = 8;
\r
51 public const int HB_STATE_PAUSED = 16;
\r
52 public const int HB_STATE_WORKDONE = 32;
\r
53 public const int HB_STATE_MUXING = 64;
\r
55 public const int HB_ERROR_NONE = 0;
\r
56 public const int HB_ERROR_CANCELED = 1;
\r
57 public const int HB_ERROR_UNKNOWN = 2;
\r
59 public const int AUDIO_F_DOLBY = 1 << 31;
\r
61 public const int HB_FRAME_IDR = 0x01;
\r
62 public const int HB_FRAME_I = 0x02;
\r
63 public const int HB_FRAME_AUDIO = 0x04;
\r
64 public const int HB_FRAME_P = 0x10;
\r
65 public const int HB_FRAME_B = 0x20;
\r
66 public const int HB_FRAME_BREF = 0x40;
\r
67 public const int HB_FRAME_KEY = 0x0F;
\r
68 public const int HB_FRAME_REF = 0xF0;
\r
70 public const int HB_CONFIG_MAX_SIZE = 8192;
\r
72 public const int HB_FILTER_DETELECINE = 1;
\r
73 public const int HB_FILTER_DEINTERLACE = 2;
\r
74 public const int HB_FILTER_DEBLOCK = 3;
\r
75 public const int HB_FILTER_DENOISE = 4;
\r
76 public const int HB_FILTER_DECOMB = 5;
\r
77 public const int HB_FILTER_ROTATE = 6;
\r
80 [StructLayout(LayoutKind.Sequential)]
\r
81 public struct hb_anamorphic_substruct
\r
90 public int par_width;
\r
93 public int par_height;
\r
96 public int dar_width;
\r
99 public int dar_height;
\r
102 public int keep_display_aspect;
\r
105 [StructLayout(LayoutKind.Sequential)]
\r
106 public struct hb_job_s
\r
109 public int sequence_id;
\r
112 public IntPtr title;
\r
114 public int feature;
\r
117 public int chapter_start;
\r
120 public int chapter_end;
\r
123 public int chapter_markers;
\r
126 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
130 public int deinterlace;
\r
133 public IntPtr filters;
\r
142 public int keep_ratio;
\r
145 public int grayscale;
\r
147 public hb_anamorphic_substruct anamorphic;
\r
149 public int modulus;
\r
152 public int maxWidth;
\r
155 public int maxHeight;
\r
161 public float vquality;
\r
164 public int vbitrate;
\r
170 public int vrate_base;
\r
182 public int h264_13;
\r
185 public int h264_level;
\r
188 //[MarshalAs(UnmanagedType.LPStr)]
\r
189 //public string x264opts;
\r
191 public IntPtr x264opts;
\r
194 public int areBframes;
\r
197 public int color_matrix;
\r
200 public IntPtr list_audio;
\r
203 public IntPtr list_subtitle;
\r
209 [MarshalAs(UnmanagedType.LPStr)]
\r
210 public string file;
\r
213 public int largeFileSize;
\r
216 public int mp4_optimize;
\r
219 public int ipod_atom;
\r
222 public int indepth_scan;
\r
224 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
225 public hb_subtitle_config_s select_subtitle_config;
\r
230 public int frame_to_start;
\r
232 public long pts_to_start;
\r
235 public int frame_to_stop;
\r
238 public long pts_to_stop;
\r
241 public int start_at_preview;
\r
244 public int seek_points;
\r
246 /// uint32_t->unsigned int
\r
247 public uint frames_to_skip;
\r
249 // Padding for the part of the struct we don't care about marshaling.
\r
250 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24644, ArraySubType = UnmanagedType.U1)]
\r
251 public byte[] padding;
\r
254 [StructLayout(LayoutKind.Sequential)]
\r
255 public struct hb_list_s
\r
258 public IntPtr items;
\r
261 public int items_alloc;
\r
264 public int items_count;
\r
267 [StructLayout(LayoutKind.Sequential)]
\r
268 public struct hb_rate_s
\r
271 [MarshalAs(UnmanagedType.LPStr)]
\r
272 public string @string;
\r
278 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
279 public struct hb_handle_s
\r
287 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
\r
288 public string version;
\r
291 public IntPtr update_thread;
\r
297 public IntPtr main_thread;
\r
303 public IntPtr list_title;
\r
306 public IntPtr scan_thread;
\r
309 public IntPtr jobs;
\r
312 public IntPtr current_job;
\r
315 public int job_count;
\r
318 public int job_count_permanent;
\r
321 public int work_die;
\r
324 public int work_error;
\r
327 public IntPtr work_thread;
\r
330 public int cpu_count;
\r
333 public IntPtr state_lock;
\r
335 /// hb_state_t->hb_state_s
\r
336 public hb_state_s state;
\r
342 public IntPtr pause_lock;
\r
345 public int scanCount;
\r
348 public IntPtr interjob;
\r
351 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
352 public struct hb_chapter_s
\r
364 public int cell_start;
\r
367 public int cell_end;
\r
370 public int block_start;
\r
373 public int block_end;
\r
376 public int block_count;
\r
382 public int minutes;
\r
385 public int seconds;
\r
387 /// uint64_t->unsigned int
\r
388 public ulong duration;
\r
391 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
392 public string title;
\r
395 public enum hb_subtitle_s_subtype
\r
402 public enum hb_subtitle_s_subsource
\r
419 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
420 public struct hb_subtitle_s
\r
428 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
429 public hb_subtitle_config_s config;
\r
431 /// hb_subtitle_s_subtype
\r
432 public hb_subtitle_s_subtype format;
\r
434 /// hb_subtitle_s_subsource
\r
435 public hb_subtitle_s_subsource source;
\r
438 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
439 public string lang;
\r
442 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
443 public string iso639_2;
\r
445 /// uint8_t->unsigned char
\r
448 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
\r
449 public uint[] palette;
\r
459 public int forced_hits;
\r
462 public IntPtr fifo_in;
\r
465 public IntPtr fifo_raw;
\r
468 public IntPtr fifo_sync;
\r
471 public IntPtr fifo_out;
\r
474 public IntPtr mux_data;
\r
477 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
478 public struct hb_metadata_s
\r
481 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
482 public string name;
\r
485 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
486 public string artist;
\r
489 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
490 public string composer;
\r
493 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
494 public string release_date;
\r
497 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
498 public string comment;
\r
501 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
502 public string album;
\r
505 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
506 public string genre;
\r
508 /// uint32_t->unsigned int
\r
509 public uint coverart_size;
\r
512 public IntPtr coverart;
\r
515 public enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
522 public enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
524 /// HB_MPEG2_PS_DEMUXER -> 0
\r
525 HB_MPEG2_PS_DEMUXER = 0,
\r
527 HB_MPEG2_TS_DEMUXER,
\r
532 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
533 public struct hb_title_s
\r
535 /// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
536 public Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550 type;
\r
539 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
543 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
544 public string name;
\r
546 //public fixed byte dvd[1024];
\r
548 //public fixed byte name[1024];
\r
560 public int cell_start;
\r
563 public int cell_end;
\r
566 public int block_start;
\r
569 public int block_end;
\r
572 public int block_count;
\r
575 public int angle_count;
\r
581 public int minutes;
\r
584 public int seconds;
\r
586 /// uint64_t->unsigned int
\r
587 public ulong duration;
\r
590 public double aspect;
\r
593 public double container_aspect;
\r
602 public int pixel_aspect_width;
\r
605 public int pixel_aspect_height;
\r
611 public int rate_base;
\r
614 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
617 //public fixed int crop[4];
\r
619 /// Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
620 public Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db demuxer;
\r
623 public int detected_interlacing;
\r
626 public int video_id;
\r
629 public int video_codec;
\r
632 public int video_codec_param;
\r
635 public IntPtr video_codec_name;
\r
638 public int video_bitrate;
\r
641 public IntPtr container_name;
\r
644 public int data_rate;
\r
647 public IntPtr metadata;
\r
650 public IntPtr list_chapter;
\r
653 public IntPtr list_audio;
\r
656 public IntPtr list_subtitle;
\r
661 /// uint32_t->unsigned int
\r
665 [StructLayout(LayoutKind.Sequential)]
\r
666 public struct hb_state_scanning_s
\r
669 public int title_cur;
\r
672 public int title_count;
\r
675 [StructLayout(LayoutKind.Sequential)]
\r
676 public struct hb_state_working_s
\r
679 public float progress;
\r
682 public int job_cur;
\r
685 public int job_count;
\r
688 public float rate_cur;
\r
691 public float rate_avg;
\r
697 public int minutes;
\r
700 public int seconds;
\r
703 public int sequence_id;
\r
706 [StructLayout(LayoutKind.Sequential)]
\r
707 public struct hb_state_workdone_s
\r
713 [StructLayout(LayoutKind.Sequential)]
\r
714 public struct hb_state_muxing_s
\r
717 public float progress;
\r
720 [StructLayout(LayoutKind.Explicit)]
\r
721 public struct hb_state_param_u
\r
724 public hb_state_scanning_s scanning;
\r
727 public hb_state_working_s working;
\r
730 public hb_state_workdone_s workdone;
\r
733 public hb_state_muxing_s muxing;
\r
736 [StructLayout(LayoutKind.Sequential)]
\r
737 public struct hb_state_s
\r
742 public hb_state_param_u param;
\r
745 [StructLayout(LayoutKind.Sequential)]
\r
746 public struct hb_audio_s
\r
751 /// hb_audio_config_t->hb_audio_config_s
\r
752 public hb_audio_config_s config;
\r
754 // Padding for the part of the struct we don't care about marshaling.
\r
755 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)]
\r
756 public byte[] padding;
\r
758 /// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
\r
759 //public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
\r
762 [StructLayout(LayoutKind.Sequential)]
\r
763 public struct hb_audio_config_s
\r
765 public hb_audio_config_output_s output;
\r
766 public hb_audio_config_input_s input;
\r
768 /// Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
769 public Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d flags;
\r
771 public hb_audio_config_lang_s lang;
\r
774 [StructLayout(LayoutKind.Sequential)]
\r
775 public struct hb_audio_config_output_s
\r
780 /// uint32_t->unsigned int
\r
784 public int samplerate;
\r
787 public int bitrate;
\r
790 public int mixdown;
\r
793 public double dynamic_range_compression;
\r
796 [MarshalAs(UnmanagedType.LPStr)]
\r
797 public string name;
\r
800 [StructLayout(LayoutKind.Sequential)]
\r
801 public struct hb_audio_config_input_s
\r
806 /// uint32_t->unsigned int
\r
809 /// uint32_t->unsigned int
\r
810 public uint codec_param;
\r
812 /// uint32_t->unsigned int
\r
813 public uint version;
\r
815 /// uint32_t->unsigned int
\r
819 public int samplerate;
\r
822 public int bitrate;
\r
825 public int channel_layout;
\r
828 [StructLayout(LayoutKind.Explicit)]
\r
829 public struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
840 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
841 public struct hb_audio_config_lang_s
\r
844 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
845 public string description;
\r
848 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
849 public string simple;
\r
852 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
853 public string iso639_2;
\r
855 /// uint8_t->unsigned char
\r
859 [StructLayout(LayoutKind.Sequential)]
\r
860 public struct hb_mixdown_s
\r
863 [MarshalAs(UnmanagedType.LPStr)]
\r
864 public string human_readable_name;
\r
867 [MarshalAs(UnmanagedType.LPStr)]
\r
868 public string internal_name;
\r
871 [MarshalAs(UnmanagedType.LPStr)]
\r
872 public string short_name;
\r
875 public int amixdown;
\r
878 public enum hb_subtitle_config_s_subdest
\r
885 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
886 public struct hb_subtitle_config_s
\r
888 /// hb_subtitle_config_s_subdest
\r
889 public hb_subtitle_config_s_subdest dest;
\r
895 public int default_track;
\r
898 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
\r
899 public string src_filename;
\r
902 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
\r
903 public string src_codeset;
\r
906 public long offset;
\r
909 [StructLayout(LayoutKind.Sequential)]
\r
910 public struct hb_fifo_s
\r
913 public IntPtr @lock;
\r
915 /// uint32_t->unsigned int
\r
916 public uint capacity;
\r
918 /// uint32_t->unsigned int
\r
921 /// uint32_t->unsigned int
\r
922 public uint buffer_size;
\r
925 public IntPtr first;
\r
928 public IntPtr last;
\r
931 [StructLayout(LayoutKind.Sequential)]
\r
932 public struct hb_lock_s
\r
936 [StructLayout(LayoutKind.Sequential)]
\r
937 public struct hb_buffer_s
\r
946 [MarshalAs(UnmanagedType.LPStr)]
\r
947 public string data;
\r
953 public long sequence;
\r
965 public int new_chap;
\r
967 /// uint8_t->unsigned char
\r
968 public byte frametype;
\r
970 /// uint16_t->unsigned int
\r
974 public long renderOffset;
\r
992 public IntPtr next;
\r
995 [StructLayout(LayoutKind.Sequential)]
\r
996 public struct hb_mux_data_s
\r
998 /// MP4TrackId->uint32_t->unsigned int
\r
1001 /// uint8_t->unsigned char
\r
1002 public byte subtitle;
\r
1005 public int sub_format;
\r
1007 /// uint64_t->unsigned int
\r
1008 public ulong sum_dur;
\r
1011 [StructLayout(LayoutKind.Sequential)]
\r
1012 public struct hb_interjob_s
\r
1015 public int last_job;
\r
1018 public int frame_count;
\r
1020 /// uint64_t->unsigned int
\r
1021 public ulong total_time;
\r
1024 public int render_dropped;
\r
1030 public int vrate_base;
\r
1032 /// hb_subtitle_t*
\r
1033 public IntPtr select_subtitle;
\r
1036 /// Return Type: void
\r
1038 public delegate void hb_thread_s_function(IntPtr param0);
\r
1040 [StructLayout(LayoutKind.Sequential)]
\r
1041 public struct hb_thread_s
\r
1044 [MarshalAs(UnmanagedType.LPStr)]
\r
1045 public string name;
\r
1048 public int priority;
\r
1050 /// hb_thread_s_function
\r
1051 public hb_thread_s_function AnonymousMember1;
\r
1054 public IntPtr arg;
\r
1057 public IntPtr @lock;
\r
1060 public int exited;
\r
1062 /// pthread_t->ptw32_handle_t->Anonymous_55c509b5_bbf2_4788_a684_ac1bd0056655
\r
1063 public ptw32_handle_t thread;
\r
1066 [StructLayout(LayoutKind.Sequential)]
\r
1067 public struct ptw32_handle_t
\r
1076 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
\r
1077 public delegate void LoggingCallback(string message);
\r
1079 public partial class HbLib
\r
1081 [DllImport("hb.dll", EntryPoint = "hb_calc_bitrate", CallingConvention = CallingConvention.Cdecl)]
\r
1082 public static extern int hb_calc_bitrate(ref hb_job_s job, int size);
\r
1084 [DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]
\r
1085 public static extern void hb_register_logger(LoggingCallback callback);
\r
1087 [DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]
\r
1088 public static extern void hb_register_error_handler(LoggingCallback callback);
\r
1090 /// Return Type: hb_handle_t*
\r
1092 ///update_check: int
\r
1093 [DllImport("hb.dll", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]
\r
1094 public static extern IntPtr hb_init(int verbose, int update_check);
\r
1097 /// Return Type: hb_handle_t*
\r
1099 ///update_check: int
\r
1100 [DllImport("hb.dll", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]
\r
1101 public static extern IntPtr hb_init_dl(int verbose, int update_check);
\r
1104 /// Return Type: char*
\r
1105 ///param0: hb_handle_t*
\r
1106 [DllImport("hb.dll", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]
\r
1107 public static extern IntPtr hb_get_version(ref hb_handle_s param0);
\r
1110 /// Return Type: int
\r
1111 ///param0: hb_handle_t*
\r
1112 [DllImport("hb.dll", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]
\r
1113 public static extern int hb_get_build(ref hb_handle_s param0);
\r
1116 /// Return Type: int
\r
1117 ///h: hb_handle_t*
\r
1118 ///version: char**
\r
1119 [DllImport("hb.dll", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]
\r
1120 public static extern int hb_check_update(ref hb_handle_s h, ref IntPtr version);
\r
1123 /// Return Type: void
\r
1124 ///param0: hb_handle_t*
\r
1126 [DllImport("hb.dll", EntryPoint = "hb_set_cpu_count", CallingConvention = CallingConvention.Cdecl)]
\r
1127 public static extern void hb_set_cpu_count(ref hb_handle_s param0, int param1);
\r
1130 /// Return Type: char*
\r
1132 [DllImport("hb.dll", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]
\r
1133 public static extern IntPtr hb_dvd_name(IntPtr path);
\r
1136 /// Return Type: void
\r
1138 [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]
\r
1139 public static extern void hb_dvd_set_dvdnav(int enable);
\r
1142 /// Return Type: void
\r
1143 ///param0: hb_handle_t*
\r
1145 ///title_index: int
\r
1146 ///preview_count: int
\r
1147 ///store_previews: int
\r
1148 [DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
\r
1149 public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path, int title_index, int preview_count, int store_previews);
\r
1152 /// Return Type: hb_list_t*
\r
1153 ///param0: hb_handle_t*
\r
1154 [DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]
\r
1155 public static extern IntPtr hb_get_titles(IntPtr hbHandle);
\r
1158 /// Return Type: int
\r
1159 ///buf: hb_buffer_t*
\r
1162 ///color_equal: int
\r
1163 ///color_diff: int
\r
1165 ///prog_equal: int
\r
1167 ///prog_threshold: int
\r
1168 [DllImport("hb.dll", EntryPoint = "hb_detect_comb", CallingConvention = CallingConvention.Cdecl)]
\r
1169 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
1171 [DllImport("hb.dll", EntryPoint = "hb_get_preview_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1172 public static extern void hb_get_preview_by_index(IntPtr hbHandle, int title_index, int picture, IntPtr buffer);
\r
1174 /// Return Type: void
\r
1175 ///param0: hb_handle_t*
\r
1176 ///param1: hb_title_t*
\r
1178 ///param3: uint8_t*
\r
1179 [DllImport("hb.dll", EntryPoint = "hb_get_preview", CallingConvention = CallingConvention.Cdecl)]
\r
1180 public static extern void hb_get_preview(IntPtr hbHandle, ref hb_title_s title, int preview, IntPtr buffer);
\r
1183 /// Return Type: void
\r
1184 ///param0: hb_job_t*
\r
1187 [DllImport("hb.dll", EntryPoint = "hb_set_size", CallingConvention = CallingConvention.Cdecl)]
\r
1188 public static extern void hb_set_size(ref hb_job_s param0, double ratio, int pixels);
\r
1190 [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1191 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
1193 /// Return Type: void
\r
1194 ///param0: hb_job_t*
\r
1195 ///output_width: int*
\r
1196 ///output_height: int*
\r
1197 ///output_par_width: int*
\r
1198 ///output_par_height: int*
\r
1199 [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size", CallingConvention = CallingConvention.Cdecl)]
\r
1200 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
1203 /// Return Type: int
\r
1204 ///param0: hb_handle_t*
\r
1205 [DllImport("hb.dll", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]
\r
1206 public static extern int hb_count(IntPtr hbHandle);
\r
1209 /// Return Type: hb_job_t*
\r
1210 ///param0: hb_handle_t*
\r
1212 [DllImport("hb.dll", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]
\r
1213 public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);
\r
1215 [DllImport("hb.dll", EntryPoint = "hb_set_chapter_name", CallingConvention = CallingConvention.Cdecl)]
\r
1216 public static extern void hb_set_chapter_name(IntPtr hbHandle, int title_index, int chapter_index, [In] [MarshalAs(UnmanagedType.LPStr)] string chapter_name);
\r
1218 [DllImport("hb.dll", EntryPoint = "hb_set_job", CallingConvention = CallingConvention.Cdecl)]
\r
1219 public static extern void hb_set_job(IntPtr hbHandle, int title_index, ref hb_job_s job);
\r
1221 /// Return Type: void
\r
1222 ///param0: hb_handle_t*
\r
1223 ///param1: hb_job_t*
\r
1224 [DllImport("hb.dll", EntryPoint = "hb_add", CallingConvention = CallingConvention.Cdecl)]
\r
1225 public static extern void hb_add(IntPtr hbHandle, ref hb_job_s job);
\r
1228 /// Return Type: void
\r
1229 ///param0: hb_handle_t*
\r
1230 ///param1: hb_job_t*
\r
1231 [DllImport("hb.dll", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]
\r
1232 public static extern void hb_rem(IntPtr hbHandle, IntPtr job);
\r
1235 /// Return Type: void
\r
1236 ///param0: hb_handle_t*
\r
1237 [DllImport("hb.dll", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]
\r
1238 public static extern void hb_start(IntPtr hbHandle);
\r
1241 /// Return Type: void
\r
1242 ///param0: hb_handle_t*
\r
1243 [DllImport("hb.dll", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]
\r
1244 public static extern void hb_pause(IntPtr hbHandle);
\r
1247 /// Return Type: void
\r
1248 ///param0: hb_handle_t*
\r
1249 [DllImport("hb.dll", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]
\r
1250 public static extern void hb_resume(IntPtr hbHandle);
\r
1253 /// Return Type: void
\r
1254 ///param0: hb_handle_t*
\r
1255 [DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]
\r
1256 public static extern void hb_stop(IntPtr hbHandle);
\r
1258 [DllImport("hb.dll", EntryPoint = "hb_get_filter_object", CallingConvention = CallingConvention.Cdecl)]
\r
1259 //public static extern IntPtr hb_get_filter_object(int filter_id, [In] [MarshalAs(UnmanagedType.LPStr)] string settings);
\r
1260 public static extern IntPtr hb_get_filter_object(int filter_id, IntPtr settings);
\r
1262 /// Return Type: void
\r
1263 ///param0: hb_handle_t*
\r
1264 ///param1: hb_state_t*
\r
1265 [DllImport("hb.dll", EntryPoint = "hb_get_state", CallingConvention = CallingConvention.Cdecl)]
\r
1266 public static extern void hb_get_state(IntPtr hbHandle, ref hb_state_s state);
\r
1269 /// Return Type: void
\r
1270 ///param0: hb_handle_t*
\r
1271 ///param1: hb_state_t*
\r
1272 [DllImport("hb.dll", EntryPoint = "hb_get_state2", CallingConvention = CallingConvention.Cdecl)]
\r
1273 public static extern void hb_get_state2(ref hb_handle_s param0, ref hb_state_s param1);
\r
1276 /// Return Type: int
\r
1277 ///param0: hb_handle_t*
\r
1278 [DllImport("hb.dll", EntryPoint = "hb_get_scancount", CallingConvention = CallingConvention.Cdecl)]
\r
1279 public static extern int hb_get_scancount(ref hb_handle_s param0);
\r
1282 /// Return Type: void
\r
1283 ///param0: hb_handle_t**
\r
1284 [DllImport("hb.dll", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]
\r
1285 public static extern void hb_close(IntPtr hbHandle);
\r
1287 [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
\r
1288 public static extern void hb_global_close();
\r