2 using System.Collections.Generic;
\r
5 using System.Runtime.InteropServices;
\r
7 namespace HandBrake.Interop
\r
10 internal 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 internal 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 internal 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 internal 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 internal struct hb_rate_s
\r
271 [MarshalAs(UnmanagedType.LPStr)]
\r
272 public string @string;
\r
278 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
279 internal 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 internal 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 internal enum hb_subtitle_s_subtype
\r
402 internal enum hb_subtitle_s_subsource
\r
417 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
418 internal struct hb_subtitle_s
\r
426 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
427 public hb_subtitle_config_s config;
\r
429 /// hb_subtitle_s_subtype
\r
430 public hb_subtitle_s_subtype format;
\r
432 /// hb_subtitle_s_subsource
\r
433 public hb_subtitle_s_subsource source;
\r
436 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
437 public string lang;
\r
440 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
441 public string iso639_2;
\r
443 /// uint8_t->unsigned char
\r
446 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
\r
447 public uint[] palette;
\r
457 public int forced_hits;
\r
460 public IntPtr fifo_in;
\r
463 public IntPtr fifo_raw;
\r
466 public IntPtr fifo_sync;
\r
469 public IntPtr fifo_out;
\r
472 public IntPtr mux_data;
\r
475 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
476 internal struct hb_metadata_s
\r
479 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
480 public string name;
\r
483 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
484 public string artist;
\r
487 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
488 public string composer;
\r
491 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
492 public string release_date;
\r
495 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
496 public string comment;
\r
499 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
500 public string album;
\r
503 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
504 public string genre;
\r
506 /// uint32_t->unsigned int
\r
507 public uint coverart_size;
\r
510 public IntPtr coverart;
\r
513 internal enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
520 internal enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
522 /// HB_MPEG2_PS_DEMUXER -> 0
\r
523 HB_MPEG2_PS_DEMUXER = 0,
\r
525 HB_MPEG2_TS_DEMUXER,
\r
530 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
531 internal struct hb_title_s
\r
533 /// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
534 public Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550 type;
\r
537 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
541 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
542 public string name;
\r
544 //public fixed byte dvd[1024];
\r
546 //public fixed byte name[1024];
\r
558 public int cell_start;
\r
561 public int cell_end;
\r
564 public int block_start;
\r
567 public int block_end;
\r
570 public int block_count;
\r
573 public int angle_count;
\r
579 public int minutes;
\r
582 public int seconds;
\r
584 /// uint64_t->unsigned int
\r
585 public ulong duration;
\r
588 public double aspect;
\r
591 public double container_aspect;
\r
600 public int pixel_aspect_width;
\r
603 public int pixel_aspect_height;
\r
609 public int rate_base;
\r
612 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
615 //public fixed int crop[4];
\r
617 /// Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
618 public Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db demuxer;
\r
621 public int detected_interlacing;
\r
624 public int video_id;
\r
627 public int video_codec;
\r
630 public int video_codec_param;
\r
633 public IntPtr video_codec_name;
\r
636 public int video_bitrate;
\r
639 public IntPtr container_name;
\r
642 public int data_rate;
\r
645 public IntPtr metadata;
\r
648 public IntPtr list_chapter;
\r
651 public IntPtr list_audio;
\r
654 public IntPtr list_subtitle;
\r
659 /// uint32_t->unsigned int
\r
663 [StructLayout(LayoutKind.Sequential)]
\r
664 internal struct hb_state_scanning_s
\r
667 public int title_cur;
\r
670 public int title_count;
\r
673 [StructLayout(LayoutKind.Sequential)]
\r
674 internal struct hb_state_working_s
\r
677 public float progress;
\r
680 public int job_cur;
\r
683 public int job_count;
\r
686 public float rate_cur;
\r
689 public float rate_avg;
\r
695 public int minutes;
\r
698 public int seconds;
\r
701 public int sequence_id;
\r
704 [StructLayout(LayoutKind.Sequential)]
\r
705 internal struct hb_state_workdone_s
\r
711 [StructLayout(LayoutKind.Sequential)]
\r
712 internal struct hb_state_muxing_s
\r
715 public float progress;
\r
718 [StructLayout(LayoutKind.Explicit)]
\r
719 internal struct hb_state_param_u
\r
722 public hb_state_scanning_s scanning;
\r
725 public hb_state_working_s working;
\r
728 public hb_state_workdone_s workdone;
\r
731 public hb_state_muxing_s muxing;
\r
734 [StructLayout(LayoutKind.Sequential)]
\r
735 internal struct hb_state_s
\r
740 public hb_state_param_u param;
\r
743 [StructLayout(LayoutKind.Sequential)]
\r
744 internal struct hb_audio_s
\r
749 /// hb_audio_config_t->hb_audio_config_s
\r
750 public hb_audio_config_s config;
\r
752 // Padding for the part of the struct we don't care about marshaling.
\r
753 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)]
\r
754 public byte[] padding;
\r
756 /// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
\r
757 //public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
\r
760 [StructLayout(LayoutKind.Sequential)]
\r
761 internal struct hb_audio_config_s
\r
763 public hb_audio_config_output_s output;
\r
764 public hb_audio_config_input_s input;
\r
766 /// Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
767 public Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d flags;
\r
769 public hb_audio_config_lang_s lang;
\r
772 [StructLayout(LayoutKind.Sequential)]
\r
773 internal struct hb_audio_config_output_s
\r
778 /// uint32_t->unsigned int
\r
782 public int samplerate;
\r
785 public int bitrate;
\r
788 public int mixdown;
\r
791 public double dynamic_range_compression;
\r
794 [MarshalAs(UnmanagedType.LPStr)]
\r
795 public string name;
\r
798 [StructLayout(LayoutKind.Sequential)]
\r
799 internal struct hb_audio_config_input_s
\r
804 /// uint32_t->unsigned int
\r
807 /// uint32_t->unsigned int
\r
808 public uint codec_param;
\r
810 /// uint32_t->unsigned int
\r
811 public uint version;
\r
813 /// uint32_t->unsigned int
\r
817 public int samplerate;
\r
820 public int bitrate;
\r
823 public int channel_layout;
\r
826 [StructLayout(LayoutKind.Explicit)]
\r
827 internal struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
838 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
839 internal struct hb_audio_config_lang_s
\r
842 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
843 public string description;
\r
846 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
847 public string simple;
\r
850 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
851 public string iso639_2;
\r
853 /// uint8_t->unsigned char
\r
857 [StructLayout(LayoutKind.Sequential)]
\r
858 internal struct hb_mixdown_s
\r
861 [MarshalAs(UnmanagedType.LPStr)]
\r
862 public string human_readable_name;
\r
865 [MarshalAs(UnmanagedType.LPStr)]
\r
866 public string internal_name;
\r
869 [MarshalAs(UnmanagedType.LPStr)]
\r
870 public string short_name;
\r
873 public int amixdown;
\r
876 internal enum hb_subtitle_config_s_subdest
\r
883 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
884 internal struct hb_subtitle_config_s
\r
886 /// hb_subtitle_config_s_subdest
\r
887 public hb_subtitle_config_s_subdest dest;
\r
893 public int default_track;
\r
896 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
\r
897 public string src_filename;
\r
900 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
\r
901 public string src_codeset;
\r
904 public long offset;
\r
907 [StructLayout(LayoutKind.Sequential)]
\r
908 internal struct hb_fifo_s
\r
911 public IntPtr @lock;
\r
913 /// uint32_t->unsigned int
\r
914 public uint capacity;
\r
916 /// uint32_t->unsigned int
\r
919 /// uint32_t->unsigned int
\r
920 public uint buffer_size;
\r
923 public IntPtr first;
\r
926 public IntPtr last;
\r
929 [StructLayout(LayoutKind.Sequential)]
\r
930 internal struct hb_lock_s
\r
934 [StructLayout(LayoutKind.Sequential)]
\r
935 internal struct hb_buffer_s
\r
944 [MarshalAs(UnmanagedType.LPStr)]
\r
945 public string data;
\r
951 public long sequence;
\r
963 public int new_chap;
\r
965 /// uint8_t->unsigned char
\r
966 public byte frametype;
\r
968 /// uint16_t->unsigned int
\r
972 public long renderOffset;
\r
990 public IntPtr next;
\r
993 [StructLayout(LayoutKind.Sequential)]
\r
994 internal struct hb_mux_data_s
\r
996 /// MP4TrackId->uint32_t->unsigned int
\r
999 /// uint8_t->unsigned char
\r
1000 public byte subtitle;
\r
1003 public int sub_format;
\r
1005 /// uint64_t->unsigned int
\r
1006 public ulong sum_dur;
\r
1009 [StructLayout(LayoutKind.Sequential)]
\r
1010 internal struct hb_interjob_s
\r
1013 public int last_job;
\r
1016 public int frame_count;
\r
1018 /// uint64_t->unsigned int
\r
1019 public ulong total_time;
\r
1022 public int render_dropped;
\r
1028 public int vrate_base;
\r
1030 /// hb_subtitle_t*
\r
1031 public IntPtr select_subtitle;
\r
1034 /// Return Type: void
\r
1036 internal delegate void hb_thread_s_function(IntPtr param0);
\r
1038 [StructLayout(LayoutKind.Sequential)]
\r
1039 internal struct hb_thread_s
\r
1042 [MarshalAs(UnmanagedType.LPStr)]
\r
1043 public string name;
\r
1046 public int priority;
\r
1048 /// hb_thread_s_function
\r
1049 public hb_thread_s_function AnonymousMember1;
\r
1052 public IntPtr arg;
\r
1055 public IntPtr @lock;
\r
1058 public int exited;
\r
1060 /// pthread_t->ptw32_handle_t->Anonymous_55c509b5_bbf2_4788_a684_ac1bd0056655
\r
1061 public ptw32_handle_t thread;
\r
1064 [StructLayout(LayoutKind.Sequential)]
\r
1065 internal struct ptw32_handle_t
\r
1074 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
\r
1075 internal delegate void LoggingCallback(string message);
\r
1077 internal partial class HbLib
\r
1079 [DllImport("hb.dll", EntryPoint = "hb_register_logger", CallingConvention = CallingConvention.Cdecl)]
\r
1080 public static extern void hb_register_logger(LoggingCallback callback);
\r
1082 [DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]
\r
1083 public static extern void hb_register_error_handler(LoggingCallback callback);
\r
1085 /// Return Type: hb_handle_t*
\r
1087 ///update_check: int
\r
1088 [DllImport("hb.dll", EntryPoint = "hb_init", CallingConvention = CallingConvention.Cdecl)]
\r
1089 public static extern IntPtr hb_init(int verbose, int update_check);
\r
1092 /// Return Type: hb_handle_t*
\r
1094 ///update_check: int
\r
1095 [DllImport("hb.dll", EntryPoint = "hb_init_dl", CallingConvention = CallingConvention.Cdecl)]
\r
1096 public static extern IntPtr hb_init_dl(int verbose, int update_check);
\r
1099 /// Return Type: char*
\r
1100 ///param0: hb_handle_t*
\r
1101 [DllImport("hb.dll", EntryPoint = "hb_get_version", CallingConvention = CallingConvention.Cdecl)]
\r
1102 public static extern IntPtr hb_get_version(ref hb_handle_s param0);
\r
1105 /// Return Type: int
\r
1106 ///param0: hb_handle_t*
\r
1107 [DllImport("hb.dll", EntryPoint = "hb_get_build", CallingConvention = CallingConvention.Cdecl)]
\r
1108 public static extern int hb_get_build(ref hb_handle_s param0);
\r
1111 /// Return Type: int
\r
1112 ///h: hb_handle_t*
\r
1113 ///version: char**
\r
1114 [DllImport("hb.dll", EntryPoint = "hb_check_update", CallingConvention = CallingConvention.Cdecl)]
\r
1115 public static extern int hb_check_update(ref hb_handle_s h, ref IntPtr version);
\r
1118 /// Return Type: void
\r
1119 ///param0: hb_handle_t*
\r
1121 [DllImport("hb.dll", EntryPoint = "hb_set_cpu_count", CallingConvention = CallingConvention.Cdecl)]
\r
1122 public static extern void hb_set_cpu_count(ref hb_handle_s param0, int param1);
\r
1125 /// Return Type: char*
\r
1127 [DllImport("hb.dll", EntryPoint = "hb_dvd_name", CallingConvention = CallingConvention.Cdecl)]
\r
1128 public static extern IntPtr hb_dvd_name(IntPtr path);
\r
1131 /// Return Type: void
\r
1133 [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]
\r
1134 public static extern void hb_dvd_set_dvdnav(int enable);
\r
1137 /// Return Type: void
\r
1138 ///param0: hb_handle_t*
\r
1140 ///title_index: int
\r
1141 ///preview_count: int
\r
1142 ///store_previews: int
\r
1143 [DllImport("hb.dll", EntryPoint = "hb_scan", CallingConvention = CallingConvention.Cdecl)]
\r
1144 public static extern void hb_scan(IntPtr hbHandle, [In] [MarshalAs(UnmanagedType.LPStr)] string path, int title_index, int preview_count, int store_previews);
\r
1147 /// Return Type: hb_list_t*
\r
1148 ///param0: hb_handle_t*
\r
1149 [DllImport("hb.dll", EntryPoint = "hb_get_titles", CallingConvention = CallingConvention.Cdecl)]
\r
1150 public static extern IntPtr hb_get_titles(IntPtr hbHandle);
\r
1153 /// Return Type: int
\r
1154 ///buf: hb_buffer_t*
\r
1157 ///color_equal: int
\r
1158 ///color_diff: int
\r
1160 ///prog_equal: int
\r
1162 ///prog_threshold: int
\r
1163 [DllImport("hb.dll", EntryPoint = "hb_detect_comb", CallingConvention = CallingConvention.Cdecl)]
\r
1164 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
1166 [DllImport("hb.dll", EntryPoint = "hb_get_preview_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1167 public static extern void hb_get_preview_by_index(IntPtr hbHandle, int title_index, int picture, IntPtr buffer);
\r
1169 /// Return Type: void
\r
1170 ///param0: hb_handle_t*
\r
1171 ///param1: hb_title_t*
\r
1173 ///param3: uint8_t*
\r
1174 [DllImport("hb.dll", EntryPoint = "hb_get_preview", CallingConvention = CallingConvention.Cdecl)]
\r
1175 public static extern void hb_get_preview(IntPtr hbHandle, ref hb_title_s title, int preview, IntPtr buffer);
\r
1178 /// Return Type: void
\r
1179 ///param0: hb_job_t*
\r
1182 [DllImport("hb.dll", EntryPoint = "hb_set_size", CallingConvention = CallingConvention.Cdecl)]
\r
1183 public static extern void hb_set_size(ref hb_job_s param0, double ratio, int pixels);
\r
1185 [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size_by_index", CallingConvention = CallingConvention.Cdecl)]
\r
1186 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
1188 /// Return Type: void
\r
1189 ///param0: hb_job_t*
\r
1190 ///output_width: int*
\r
1191 ///output_height: int*
\r
1192 ///output_par_width: int*
\r
1193 ///output_par_height: int*
\r
1194 [DllImport("hb.dll", EntryPoint = "hb_set_anamorphic_size", CallingConvention = CallingConvention.Cdecl)]
\r
1195 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
1198 /// Return Type: int
\r
1199 ///param0: hb_handle_t*
\r
1200 [DllImport("hb.dll", EntryPoint = "hb_count", CallingConvention = CallingConvention.Cdecl)]
\r
1201 public static extern int hb_count(IntPtr hbHandle);
\r
1204 /// Return Type: hb_job_t*
\r
1205 ///param0: hb_handle_t*
\r
1207 [DllImport("hb.dll", EntryPoint = "hb_job", CallingConvention = CallingConvention.Cdecl)]
\r
1208 public static extern IntPtr hb_job(IntPtr hbHandle, int jobIndex);
\r
1210 [DllImport("hb.dll", EntryPoint = "hb_set_chapter_name", CallingConvention = CallingConvention.Cdecl)]
\r
1211 public static extern void hb_set_chapter_name(IntPtr hbHandle, int title_index, int chapter_index, [In] [MarshalAs(UnmanagedType.LPStr)] string chapter_name);
\r
1213 [DllImport("hb.dll", EntryPoint = "hb_set_job", CallingConvention = CallingConvention.Cdecl)]
\r
1214 public static extern void hb_set_job(IntPtr hbHandle, int title_index, ref hb_job_s job);
\r
1216 /// Return Type: void
\r
1217 ///param0: hb_handle_t*
\r
1218 ///param1: hb_job_t*
\r
1219 [DllImport("hb.dll", EntryPoint = "hb_add", CallingConvention = CallingConvention.Cdecl)]
\r
1220 public static extern void hb_add(IntPtr hbHandle, ref hb_job_s job);
\r
1223 /// Return Type: void
\r
1224 ///param0: hb_handle_t*
\r
1225 ///param1: hb_job_t*
\r
1226 [DllImport("hb.dll", EntryPoint = "hb_rem", CallingConvention = CallingConvention.Cdecl)]
\r
1227 public static extern void hb_rem(IntPtr hbHandle, IntPtr job);
\r
1230 /// Return Type: void
\r
1231 ///param0: hb_handle_t*
\r
1232 [DllImport("hb.dll", EntryPoint = "hb_start", CallingConvention = CallingConvention.Cdecl)]
\r
1233 public static extern void hb_start(IntPtr hbHandle);
\r
1236 /// Return Type: void
\r
1237 ///param0: hb_handle_t*
\r
1238 [DllImport("hb.dll", EntryPoint = "hb_pause", CallingConvention = CallingConvention.Cdecl)]
\r
1239 public static extern void hb_pause(IntPtr hbHandle);
\r
1242 /// Return Type: void
\r
1243 ///param0: hb_handle_t*
\r
1244 [DllImport("hb.dll", EntryPoint = "hb_resume", CallingConvention = CallingConvention.Cdecl)]
\r
1245 public static extern void hb_resume(IntPtr hbHandle);
\r
1248 /// Return Type: void
\r
1249 ///param0: hb_handle_t*
\r
1250 [DllImport("hb.dll", EntryPoint = "hb_stop", CallingConvention = CallingConvention.Cdecl)]
\r
1251 public static extern void hb_stop(IntPtr hbHandle);
\r
1253 [DllImport("hb.dll", EntryPoint = "hb_get_filter_object", CallingConvention = CallingConvention.Cdecl)]
\r
1254 //public static extern IntPtr hb_get_filter_object(int filter_id, [In] [MarshalAs(UnmanagedType.LPStr)] string settings);
\r
1255 public static extern IntPtr hb_get_filter_object(int filter_id, IntPtr settings);
\r
1257 /// Return Type: void
\r
1258 ///param0: hb_handle_t*
\r
1259 ///param1: hb_state_t*
\r
1260 [DllImport("hb.dll", EntryPoint = "hb_get_state", CallingConvention = CallingConvention.Cdecl)]
\r
1261 public static extern void hb_get_state(IntPtr hbHandle, ref hb_state_s state);
\r
1264 /// Return Type: void
\r
1265 ///param0: hb_handle_t*
\r
1266 ///param1: hb_state_t*
\r
1267 [DllImport("hb.dll", EntryPoint = "hb_get_state2", CallingConvention = CallingConvention.Cdecl)]
\r
1268 public static extern void hb_get_state2(ref hb_handle_s param0, ref hb_state_s param1);
\r
1271 /// Return Type: int
\r
1272 ///param0: hb_handle_t*
\r
1273 [DllImport("hb.dll", EntryPoint = "hb_get_scancount", CallingConvention = CallingConvention.Cdecl)]
\r
1274 public static extern int hb_get_scancount(ref hb_handle_s param0);
\r
1277 /// Return Type: void
\r
1278 ///param0: hb_handle_t**
\r
1279 [DllImport("hb.dll", EntryPoint = "hb_close", CallingConvention = CallingConvention.Cdecl)]
\r
1280 public static extern void hb_close(IntPtr hbHandle);
\r
1282 [DllImport("hb.dll", EntryPoint = "hb_global_close", CallingConvention = CallingConvention.Cdecl)]
\r
1283 public static extern void hb_global_close();
\r