1 // --------------------------------------------------------------------------------------------------------------------
\r
2 // <copyright file="HbLib.cs" company="HandBrake Project (http://handbrake.fr)">
\r
3 // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
\r
6 // Defines the NativeConstants type.
\r
8 // --------------------------------------------------------------------------------------------------------------------
\r
10 namespace HandBrake.Interop
\r
13 using System.Runtime.InteropServices;
\r
15 internal partial class NativeConstants
\r
17 public const int HB_ACODEC_MASK = 0x00FF00;
\r
18 public const int HB_ACODEC_FAAC = 0x000100;
\r
19 public const int HB_ACODEC_LAME = 0x000200;
\r
20 public const int HB_ACODEC_VORBIS = 0x000400;
\r
21 public const int HB_ACODEC_AC3 = 0x000800;
\r
22 public const int HB_ACODEC_MPGA = 0x001000;
\r
23 public const int HB_ACODEC_LPCM = 0x002000;
\r
24 public const int HB_ACODEC_DCA = 0x004000;
\r
25 public const int HB_ACODEC_FFMPEG = 0x008000;
\r
26 public const int HB_ACODEC_CA_AAC = 0x010000;
\r
28 public const int HB_AMIXDOWN_DCA_FORMAT_MASK = 0x00FFF000;
\r
29 public const int HB_AMIXDOWN_A52_FORMAT_MASK = 0x00000FF0;
\r
30 public const int HB_AMIXDOWN_DISCRETE_CHANNEL_COUNT_MASK = 0x0000000F;
\r
31 public const int HB_AMIXDOWN_MONO = 0x01000001;
\r
32 public const int HB_AMIXDOWN_STEREO = 0x02002022;
\r
33 public const int HB_AMIXDOWN_DOLBY = 0x042070A2;
\r
34 public const int HB_AMIXDOWN_DOLBYPLII = 0x084094A2;
\r
35 public const int HB_AMIXDOWN_6CH = 0x10089176;
\r
37 public const int HB_VCODEC_MASK = 0x0000FF;
\r
38 public const int HB_VCODEC_FFMPEG = 0x000001;
\r
39 public const int HB_VCODEC_X264 = 0x000002;
\r
40 public const int HB_VCODEC_THEORA = 0x000004;
\r
42 public const int HB_MUX_MASK = 0xFF0000;
\r
43 public const int HB_MUX_MP4 = 0x010000;
\r
44 public const int HB_MUX_PSP = 0x020000;
\r
45 public const int HB_MUX_AVI = 0x040000;
\r
46 public const int HB_MUX_OGM = 0x080000;
\r
47 public const int HB_MUX_IPOD = 0x100000;
\r
48 public const int HB_MUX_MKV = 0x200000;
\r
50 public const int HBTF_NO_IDR = 1 << 0;
\r
52 public const int HB_STATE_IDLE = 1;
\r
53 public const int HB_STATE_SCANNING = 2;
\r
54 public const int HB_STATE_SCANDONE = 4;
\r
55 public const int HB_STATE_WORKING = 8;
\r
56 public const int HB_STATE_PAUSED = 16;
\r
57 public const int HB_STATE_WORKDONE = 32;
\r
58 public const int HB_STATE_MUXING = 64;
\r
60 public const int HB_ERROR_NONE = 0;
\r
61 public const int HB_ERROR_CANCELED = 1;
\r
62 public const int HB_ERROR_UNKNOWN = 2;
\r
64 public const int AUDIO_F_DOLBY = 1 << 31;
\r
66 public const int HB_FRAME_IDR = 0x01;
\r
67 public const int HB_FRAME_I = 0x02;
\r
68 public const int HB_FRAME_AUDIO = 0x04;
\r
69 public const int HB_FRAME_P = 0x10;
\r
70 public const int HB_FRAME_B = 0x20;
\r
71 public const int HB_FRAME_BREF = 0x40;
\r
72 public const int HB_FRAME_KEY = 0x0F;
\r
73 public const int HB_FRAME_REF = 0xF0;
\r
75 public const int HB_CONFIG_MAX_SIZE = 8192;
\r
77 public const int HB_FILTER_DETELECINE = 1;
\r
78 public const int HB_FILTER_DEINTERLACE = 2;
\r
79 public const int HB_FILTER_DEBLOCK = 3;
\r
80 public const int HB_FILTER_DENOISE = 4;
\r
81 public const int HB_FILTER_DECOMB = 5;
\r
82 public const int HB_FILTER_ROTATE = 6;
\r
85 [StructLayout(LayoutKind.Sequential)]
\r
86 internal struct hb_anamorphic_substruct
\r
95 public int par_width;
\r
98 public int par_height;
\r
101 public int dar_width;
\r
104 public int dar_height;
\r
107 public int keep_display_aspect;
\r
110 [StructLayout(LayoutKind.Sequential)]
\r
111 internal struct hb_job_s
\r
114 public int sequence_id;
\r
117 public IntPtr title;
\r
119 public int feature;
\r
122 public int chapter_start;
\r
125 public int chapter_end;
\r
128 public int chapter_markers;
\r
131 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
135 public int deinterlace;
\r
138 public IntPtr filters;
\r
147 public int keep_ratio;
\r
150 public int grayscale;
\r
152 public hb_anamorphic_substruct anamorphic;
\r
154 public int modulus;
\r
157 public int maxWidth;
\r
160 public int maxHeight;
\r
166 public float vquality;
\r
169 public int vbitrate;
\r
175 public int vrate_base;
\r
187 public int h264_13;
\r
190 public int h264_level;
\r
193 //[MarshalAs(UnmanagedType.LPStr)]
\r
194 //public string x264opts;
\r
196 public IntPtr x264opts;
\r
199 public int areBframes;
\r
202 public int color_matrix;
\r
205 public IntPtr list_audio;
\r
208 public IntPtr list_subtitle;
\r
214 [MarshalAs(UnmanagedType.LPStr)]
\r
215 public string file;
\r
218 public int largeFileSize;
\r
221 public int mp4_optimize;
\r
224 public int ipod_atom;
\r
227 public int indepth_scan;
\r
229 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
230 public hb_subtitle_config_s select_subtitle_config;
\r
235 public int frame_to_start;
\r
237 public long pts_to_start;
\r
240 public int frame_to_stop;
\r
243 public long pts_to_stop;
\r
246 public int start_at_preview;
\r
249 public int seek_points;
\r
251 /// uint32_t->unsigned int
\r
252 public uint frames_to_skip;
\r
254 // Padding for the part of the struct we don't care about marshaling.
\r
255 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24644, ArraySubType = UnmanagedType.U1)]
\r
256 public byte[] padding;
\r
259 [StructLayout(LayoutKind.Sequential)]
\r
260 internal struct hb_list_s
\r
263 public IntPtr items;
\r
266 public int items_alloc;
\r
269 public int items_count;
\r
272 [StructLayout(LayoutKind.Sequential)]
\r
273 internal struct hb_rate_s
\r
276 [MarshalAs(UnmanagedType.LPStr)]
\r
277 public string @string;
\r
283 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
284 internal struct hb_handle_s
\r
292 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
\r
293 public string version;
\r
296 public IntPtr update_thread;
\r
302 public IntPtr main_thread;
\r
308 public IntPtr list_title;
\r
311 public IntPtr scan_thread;
\r
314 public IntPtr jobs;
\r
317 public IntPtr current_job;
\r
320 public int job_count;
\r
323 public int job_count_permanent;
\r
326 public int work_die;
\r
329 public int work_error;
\r
332 public IntPtr work_thread;
\r
335 public int cpu_count;
\r
338 public IntPtr state_lock;
\r
340 /// hb_state_t->hb_state_s
\r
341 public hb_state_s state;
\r
347 public IntPtr pause_lock;
\r
350 public int scanCount;
\r
353 public IntPtr interjob;
\r
356 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
357 internal struct hb_chapter_s
\r
369 public int cell_start;
\r
372 public int cell_end;
\r
375 public int block_start;
\r
378 public int block_end;
\r
381 public int block_count;
\r
387 public int minutes;
\r
390 public int seconds;
\r
392 /// uint64_t->unsigned int
\r
393 public ulong duration;
\r
396 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
397 public string title;
\r
400 internal enum hb_subtitle_s_subtype
\r
407 internal enum hb_subtitle_s_subsource
\r
422 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
423 internal struct hb_subtitle_s
\r
431 /// hb_subtitle_config_t->hb_subtitle_config_s
\r
432 public hb_subtitle_config_s config;
\r
434 /// hb_subtitle_s_subtype
\r
435 public hb_subtitle_s_subtype format;
\r
437 /// hb_subtitle_s_subsource
\r
438 public hb_subtitle_s_subsource source;
\r
441 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
442 public string lang;
\r
445 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
446 public string iso639_2;
\r
448 /// uint8_t->unsigned char
\r
451 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
\r
452 public uint[] palette;
\r
462 public int forced_hits;
\r
465 public IntPtr fifo_in;
\r
468 public IntPtr fifo_raw;
\r
471 public IntPtr fifo_sync;
\r
474 public IntPtr fifo_out;
\r
477 public IntPtr mux_data;
\r
480 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
481 internal struct hb_metadata_s
\r
484 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
485 public string name;
\r
488 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
489 public string artist;
\r
492 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
493 public string composer;
\r
496 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
497 public string release_date;
\r
500 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
501 public string comment;
\r
504 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
505 public string album;
\r
508 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 255)]
\r
509 public string genre;
\r
511 /// uint32_t->unsigned int
\r
512 public uint coverart_size;
\r
515 public IntPtr coverart;
\r
518 internal enum Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
525 internal enum Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
527 /// HB_MPEG2_PS_DEMUXER -> 0
\r
528 HB_MPEG2_PS_DEMUXER = 0,
\r
530 HB_MPEG2_TS_DEMUXER,
\r
535 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
536 internal struct hb_title_s
\r
538 /// Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550
\r
539 public Anonymous_990d28ea_6cf3_4fbc_8143_4df9513e9550 type;
\r
542 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
546 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
547 public string name;
\r
549 //public fixed byte dvd[1024];
\r
551 //public fixed byte name[1024];
\r
563 public int cell_start;
\r
566 public int cell_end;
\r
569 public int block_start;
\r
572 public int block_end;
\r
575 public int block_count;
\r
578 public int angle_count;
\r
584 public int minutes;
\r
587 public int seconds;
\r
589 /// uint64_t->unsigned int
\r
590 public ulong duration;
\r
593 public double aspect;
\r
596 public double container_aspect;
\r
605 public int pixel_aspect_width;
\r
608 public int pixel_aspect_height;
\r
614 public int rate_base;
\r
617 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I4)]
\r
620 //public fixed int crop[4];
\r
622 /// Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db
\r
623 public Anonymous_618ebeca_0ad9_4a71_9a49_18e50ac2e9db demuxer;
\r
626 public int detected_interlacing;
\r
629 public int video_id;
\r
632 public int video_codec;
\r
635 public int video_codec_param;
\r
638 public IntPtr video_codec_name;
\r
641 public int video_bitrate;
\r
644 public IntPtr container_name;
\r
647 public int data_rate;
\r
650 public IntPtr metadata;
\r
653 public IntPtr list_chapter;
\r
656 public IntPtr list_audio;
\r
659 public IntPtr list_subtitle;
\r
664 /// uint32_t->unsigned int
\r
668 [StructLayout(LayoutKind.Sequential)]
\r
669 internal struct hb_state_scanning_s
\r
672 public int title_cur;
\r
675 public int title_count;
\r
678 [StructLayout(LayoutKind.Sequential)]
\r
679 internal struct hb_state_working_s
\r
682 public float progress;
\r
685 public int job_cur;
\r
688 public int job_count;
\r
691 public float rate_cur;
\r
694 public float rate_avg;
\r
700 public int minutes;
\r
703 public int seconds;
\r
706 public int sequence_id;
\r
709 [StructLayout(LayoutKind.Sequential)]
\r
710 internal struct hb_state_workdone_s
\r
716 [StructLayout(LayoutKind.Sequential)]
\r
717 internal struct hb_state_muxing_s
\r
720 public float progress;
\r
723 [StructLayout(LayoutKind.Explicit)]
\r
724 internal struct hb_state_param_u
\r
727 public hb_state_scanning_s scanning;
\r
730 public hb_state_working_s working;
\r
733 public hb_state_workdone_s workdone;
\r
736 public hb_state_muxing_s muxing;
\r
739 [StructLayout(LayoutKind.Sequential)]
\r
740 internal struct hb_state_s
\r
745 public hb_state_param_u param;
\r
748 [StructLayout(LayoutKind.Sequential)]
\r
749 internal struct hb_audio_s
\r
754 /// hb_audio_config_t->hb_audio_config_s
\r
755 public hb_audio_config_s config;
\r
757 // Padding for the part of the struct we don't care about marshaling.
\r
758 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24600, ArraySubType = UnmanagedType.U1)]
\r
759 public byte[] padding;
\r
761 /// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
\r
762 //public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
\r
765 [StructLayout(LayoutKind.Sequential)]
\r
766 internal struct hb_audio_config_s
\r
768 public hb_audio_config_output_s output;
\r
769 public hb_audio_config_input_s input;
\r
771 /// Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
772 public Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d flags;
\r
774 public hb_audio_config_lang_s lang;
\r
777 [StructLayout(LayoutKind.Sequential)]
\r
778 internal struct hb_audio_config_output_s
\r
783 /// uint32_t->unsigned int
\r
787 public int samplerate;
\r
790 public int bitrate;
\r
793 public int mixdown;
\r
796 public double dynamic_range_compression;
\r
799 [MarshalAs(UnmanagedType.LPStr)]
\r
800 public string name;
\r
803 [StructLayout(LayoutKind.Sequential)]
\r
804 internal struct hb_audio_config_input_s
\r
809 /// uint32_t->unsigned int
\r
812 /// uint32_t->unsigned int
\r
813 public uint codec_param;
\r
815 /// uint32_t->unsigned int
\r
816 public uint version;
\r
818 /// uint32_t->unsigned int
\r
822 public int samplerate;
\r
825 public int bitrate;
\r
828 public int channel_layout;
\r
831 [StructLayout(LayoutKind.Explicit)]
\r
832 internal struct Anonymous_a0a59d69_d9a4_4003_a198_f7c51511e31d
\r
843 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
844 internal struct hb_audio_config_lang_s
\r
847 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
848 public string description;
\r
851 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
\r
852 public string simple;
\r
855 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
\r
856 public string iso639_2;
\r
858 /// uint8_t->unsigned char
\r
862 [StructLayout(LayoutKind.Sequential)]
\r
863 internal struct hb_mixdown_s
\r
866 [MarshalAs(UnmanagedType.LPStr)]
\r
867 public string human_readable_name;
\r
870 [MarshalAs(UnmanagedType.LPStr)]
\r
871 public string internal_name;
\r
874 [MarshalAs(UnmanagedType.LPStr)]
\r
875 public string short_name;
\r
878 public int amixdown;
\r
881 internal enum hb_subtitle_config_s_subdest
\r
888 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
\r
889 internal struct hb_subtitle_config_s
\r
891 /// hb_subtitle_config_s_subdest
\r
892 public hb_subtitle_config_s_subdest dest;
\r
898 public int default_track;
\r
901 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
\r
902 public string src_filename;
\r
905 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
\r
906 public string src_codeset;
\r
909 public long offset;
\r
912 [StructLayout(LayoutKind.Sequential)]
\r
913 internal struct hb_fifo_s
\r
916 public IntPtr @lock;
\r
918 /// uint32_t->unsigned int
\r
919 public uint capacity;
\r
921 /// uint32_t->unsigned int
\r
924 /// uint32_t->unsigned int
\r
925 public uint buffer_size;
\r
928 public IntPtr first;
\r
931 public IntPtr last;
\r
934 [StructLayout(LayoutKind.Sequential)]
\r
935 internal struct hb_lock_s
\r
939 [StructLayout(LayoutKind.Sequential)]
\r
940 internal struct hb_buffer_s
\r
949 [MarshalAs(UnmanagedType.LPStr)]
\r
950 public string data;
\r
956 public long sequence;
\r
968 public int new_chap;
\r
970 /// uint8_t->unsigned char
\r
971 public byte frametype;
\r
973 /// uint16_t->unsigned int
\r
977 public long renderOffset;
\r
995 public IntPtr next;
\r
998 [StructLayout(LayoutKind.Sequential)]
\r
999 internal struct hb_mux_data_s
\r
1001 /// MP4TrackId->uint32_t->unsigned int
\r
1002 public uint track;
\r
1004 /// uint8_t->unsigned char
\r
1005 public byte subtitle;
\r
1008 public int sub_format;
\r
1010 /// uint64_t->unsigned int
\r
1011 public ulong sum_dur;
\r
1014 [StructLayout(LayoutKind.Sequential)]
\r
1015 internal struct hb_interjob_s
\r
1018 public int last_job;
\r
1021 public int frame_count;
\r
1023 /// uint64_t->unsigned int
\r
1024 public ulong total_time;
\r
1027 public int render_dropped;
\r
1033 public int vrate_base;
\r
1035 /// hb_subtitle_t*
\r
1036 public IntPtr select_subtitle;
\r
1039 /// Return Type: void
\r
1041 internal delegate void hb_thread_s_function(IntPtr param0);
\r
1043 [StructLayout(LayoutKind.Sequential)]
\r
1044 internal struct hb_thread_s
\r
1047 [MarshalAs(UnmanagedType.LPStr)]
\r
1048 public string name;
\r
1051 public int priority;
\r
1053 /// hb_thread_s_function
\r
1054 public hb_thread_s_function AnonymousMember1;
\r
1057 public IntPtr arg;
\r
1060 public IntPtr @lock;
\r
1063 public int exited;
\r
1065 /// pthread_t->ptw32_handle_t->Anonymous_55c509b5_bbf2_4788_a684_ac1bd0056655
\r
1066 public ptw32_handle_t thread;
\r
1069 [StructLayout(LayoutKind.Sequential)]
\r
1070 internal struct ptw32_handle_t
\r
1079 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
\r
1080 internal delegate void LoggingCallback(string message);
\r
1082 internal partial class HbLib
\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