summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs141
1 files changed, 91 insertions, 50 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
index 00130a902..25f595995 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs
@@ -21,6 +21,9 @@ namespace HandBrake.Interop.HbLib
[DllImport("hb.dll", EntryPoint = "hb_register_error_handler", CallingConvention = CallingConvention.Cdecl)]
public static extern void hb_register_error_handler(LoggingCallback callback);
+ [DllImport("hb.dll", EntryPoint = "hb_global_init", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_global_init();
+
/// Return Type: hb_handle_t*
///verbose: int
///update_check: int
@@ -210,81 +213,119 @@ namespace HandBrake.Interop.HbLib
public static extern int hb_srt_add(ref hb_job_s job, ref hb_subtitle_config_s subtitleConfig, string lang);
- [DllImport("hb.dll", EntryPoint = "hb_mixdown_is_supported", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_mixdown_is_supported(int mixdown, uint codec, ulong layout);
- [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_remix_support", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_mixdown_has_remix_support(int mixdown, ulong layout);
+//int hb_video_framerate_get_from_name(const char *name);
+//const char* hb_video_framerate_get_name(int framerate);
+//const char* hb_video_framerate_sanitize_name(const char *name);
- [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_codec_support", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_mixdown_has_codec_support(int mixdown, uint codec);
+ // returns hb_rate_s
+ [DllImport("hb.dll", EntryPoint = "hb_video_framerate_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_video_framerate_get_next(IntPtr last);
+
+
+//int hb_audio_samplerate_get_best(uint32_t codec, int samplerate, int *sr_shift);
+//int hb_audio_samplerate_get_from_name(const char *name);
+//const char* hb_audio_samplerate_get_name(int samplerate);
+
+ // returns hb_rate_s
+ [DllImport("hb.dll", EntryPoint = "hb_audio_samplerate_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_audio_samplerate_get_next(IntPtr last);
+
+
+ [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_best", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_audio_bitrate_get_best(uint codec, int bitrate, int samplerate, int mixdown);
+
+ [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_default", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_audio_bitrate_get_default(uint codec, int samplerate, int mixdown);
- [DllImport("hb.dll", EntryPoint = "hb_get_default_mixdown", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_default_mixdown(uint codec, ulong layout);
+ [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_limits", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_audio_bitrate_get_limits(uint codec, int samplerate, int mixdown, ref int low, ref int high);
- [DllImport("hb.dll", EntryPoint = "hb_get_best_mixdown", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_best_mixdown(uint codec, ulong layout, int mixdown);
+ [DllImport("hb.dll", EntryPoint = "hb_audio_bitrate_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_audio_bitrate_get_next(IntPtr last);
- [DllImport("hb.dll", EntryPoint = "hb_get_best_audio_bitrate", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_best_audio_bitrate(uint codec, int bitrate, int samplerate, int mixdown);
- [DllImport("hb.dll", EntryPoint = "hb_get_default_audio_bitrate", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_default_audio_bitrate(uint codec, int samplerate, int mixdown);
+ [DllImport("hb.dll", EntryPoint = "hb_audio_quality_get_limits", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_audio_quality_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_bitrate_limits", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_audio_bitrate_limits(uint codec, int samplerate, int mixdown, ref int low, ref int high);
+//float hb_audio_quality_get_best(uint32_t codec, float quality);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_quality_limits", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_get_audio_quality_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
+ [DllImport("hb.dll", EntryPoint = "hb_audio_quality_get_default", CallingConvention = CallingConvention.Cdecl)]
+ public static extern float hb_audio_quality_get_default(uint codec);
- [DllImport("hb.dll", EntryPoint = "hb_get_default_audio_quality", CallingConvention = CallingConvention.Cdecl)]
- public static extern float hb_get_default_audio_quality(uint codec);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_compression_limits", CallingConvention = CallingConvention.Cdecl)]
- public static extern void hb_get_audio_compression_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
+ [DllImport("hb.dll", EntryPoint = "hb_audio_compression_get_limits", CallingConvention = CallingConvention.Cdecl)]
+ public static extern void hb_audio_compression_get_limits(uint codec, ref float low, ref float high, ref float granularity, ref int direction);
- [DllImport("hb.dll", EntryPoint = "hb_get_default_audio_compression", CallingConvention = CallingConvention.Cdecl)]
- public static extern float hb_get_default_audio_compression(uint codec);
+//float hb_audio_compression_get_best(uint32_t codec, float compression);
+
+ [DllImport("hb.dll", EntryPoint = "hb_audio_compression_get_default", CallingConvention = CallingConvention.Cdecl)]
+ public static extern float hb_audio_compression_get_default(uint codec);
+
+
+//int hb_audio_dither_get_default();
+//int hb_audio_dither_get_default_method(); // default method, if enabled && supported
+//int hb_audio_dither_is_supported(uint32_t codec);
+//int hb_audio_dither_get_from_name(const char *name);
+//const char* hb_audio_dither_get_description(int method);
+//const hb_dither_t* hb_audio_dither_get_next(const hb_dither_t *last);
+
+ [DllImport("hb.dll", EntryPoint = "hb_mixdown_is_supported", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_mixdown_is_supported(int mixdown, uint codec, ulong layout);
+
+ [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_codec_support", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_mixdown_has_codec_support(int mixdown, uint codec);
+
+ [DllImport("hb.dll", EntryPoint = "hb_mixdown_has_remix_support", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_mixdown_has_remix_support(int mixdown, ulong layout);
+//int hb_mixdown_get_discrete_channel_count(int mixdown);
+//int hb_mixdown_get_low_freq_channel_count(int mixdown);
- [DllImport("hb.dll", EntryPoint = "hb_get_video_rates", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_get_video_rates();
+ [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_best", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_mixdown_get_best(uint codec, ulong layout, int mixdown);
- [DllImport("hb.dll", EntryPoint = "hb_get_video_rates_count", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_video_rates_count();
+ [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_default", CallingConvention = CallingConvention.Cdecl)]
+ public static extern int hb_mixdown_get_default(uint codec, ulong layout);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_rates", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_get_audio_rates();
+//int hb_mixdown_get_from_name(const char *name);
+//const char* hb_mixdown_get_name(int mixdown);
+//const char* hb_mixdown_get_short_name(int mixdown);
+//const char* hb_mixdown_sanitize_name(const char *name);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_rates_count", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_audio_rates_count();
+ [DllImport("hb.dll", EntryPoint = "hb_mixdown_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_mixdown_get_next(IntPtr last);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_rates_default", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_audio_rates_default();
+//int hb_video_encoder_get_default(int muxer);
+//int hb_video_encoder_get_from_name(const char *name);
+//const char* hb_video_encoder_get_name(int encoder);
+//const char* hb_video_encoder_get_short_name(int encoder);
+//const char* hb_video_encoder_sanitize_name(const char *name);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_bitrates", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_get_audio_bitrates();
+ [DllImport("hb.dll", EntryPoint = "hb_video_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_video_encoder_get_next(IntPtr last);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_bitrates_count", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_audio_bitrates_count();
+/*
+ * hb_audio_encoder_get_fallback_for_passthru() will sanitize a passthru codec
+ * to the matching audio encoder (if any is available).
+ *
+ * hb_audio_encoder_get_from_name(), hb_audio_encoder_sanitize_name() will
+ * sanitize legacy encoder names, but won't convert passthru to an encoder.
+ */
+//int hb_audio_encoder_get_fallback_for_passthru(int passthru);
+//int hb_audio_encoder_get_default(int muxer);
+//int hb_audio_encoder_get_from_name(const char *name);
+//const char* hb_audio_encoder_get_name(int encoder);
+//const char* hb_audio_encoder_get_short_name(int encoder);
+//const char* hb_audio_encoder_sanitize_name(const char *name);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_mixdowns", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_get_audio_mixdowns();
+ [DllImport("hb.dll", EntryPoint = "hb_audio_encoder_get_next", CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr hb_audio_encoder_get_next(IntPtr last);
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_mixdowns_count", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_audio_mixdowns_count();
- [DllImport("hb.dll", EntryPoint = "hb_get_video_encoders", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_get_video_encoders();
- [DllImport("hb.dll", EntryPoint = "hb_get_video_encoders_count", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_video_encoders_count();
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_encoders", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr hb_get_audio_encoders();
- [DllImport("hb.dll", EntryPoint = "hb_get_audio_encoders_count", CallingConvention = CallingConvention.Cdecl)]
- public static extern int hb_get_audio_encoders_count();
/// void hb_autopassthru_apply_settings( hb_job_t * job )