diff --git a/NetObsBindings/NetObsBindings.csproj b/NetObsBindings/NetObsBindings.csproj index 61fcb2b..41e0dd7 100644 --- a/NetObsBindings/NetObsBindings.csproj +++ b/NetObsBindings/NetObsBindings.csproj @@ -13,7 +13,7 @@ - 0.0.1.38-alpha + 30.0.2.0 LICENSE.md https://github.com/kostya9/NetObsBindings diff --git a/NetObsBindings/Obs.Version.cs b/NetObsBindings/Obs.Version.cs index 649a608..00ddb5a 100644 --- a/NetObsBindings/Obs.Version.cs +++ b/NetObsBindings/Obs.Version.cs @@ -2,5 +2,5 @@ namespace ObsInterop; public static partial class Obs { - public static readonly Version Version = new Version(29, 1, 3); + public static readonly Version Version = new Version(30, 0, 2); } diff --git a/NetObsBindings/ObsInterop/Obs.cs b/NetObsBindings/ObsInterop/Obs.cs index 3cea9d7..c6c865c 100644 --- a/NetObsBindings/ObsInterop/Obs.cs +++ b/NetObsBindings/ObsInterop/Obs.cs @@ -136,6 +136,9 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_add_module_path([NativeTypeName("const char *")] sbyte* bin, [NativeTypeName("const char *")] sbyte* data); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_add_safe_module([NativeTypeName("const char *")] sbyte* name); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_load_all_modules(); @@ -404,6 +407,9 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_add_raw_video_callback([NativeTypeName("const struct video_scale_info *")] video_scale_info* conversion, [NativeTypeName("void (*)(void *, struct video_data *)")] delegate* unmanaged[Cdecl] callback, void* param2); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_add_raw_video_callback2([NativeTypeName("const struct video_scale_info *")] video_scale_info* conversion, [NativeTypeName("uint32_t")] uint frame_rate_divisor, [NativeTypeName("void (*)(void *, struct video_data *)")] delegate* unmanaged[Cdecl] callback, void* param3); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_remove_raw_video_callback([NativeTypeName("void (*)(void *, struct video_data *)")] delegate* unmanaged[Cdecl] callback, void* param1); @@ -704,6 +710,12 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_source_filter_set_order([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("obs_source_t *")] obs_source* filter, [NativeTypeName("enum obs_order_movement")] obs_order_movement movement); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int obs_source_filter_get_index([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("obs_source_t *")] obs_source* filter); + + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_source_filter_set_index([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("obs_source_t *")] obs_source* filter, [NativeTypeName("size_t")] nuint index); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("obs_data_t *")] public static extern obs_data* obs_source_get_settings([NativeTypeName("const obs_source_t *")] obs_source* source); @@ -864,6 +876,12 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_source_set_push_to_talk_delay([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("uint64_t")] ulong delay); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_source_add_audio_pause_callback([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("signal_callback_t")] delegate* unmanaged[Cdecl] callback, void* param2); + + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_source_remove_audio_pause_callback([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("signal_callback_t")] delegate* unmanaged[Cdecl] callback, void* param2); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_source_add_audio_capture_callback([NativeTypeName("obs_source_t *")] obs_source* source, [NativeTypeName("obs_source_audio_capture_t")] delegate* unmanaged[Cdecl] callback, void* param2); @@ -1665,6 +1683,9 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_output_set_video_encoder([NativeTypeName("obs_output_t *")] obs_output* output, [NativeTypeName("obs_encoder_t *")] obs_encoder* encoder); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_output_set_video_encoder2([NativeTypeName("obs_output_t *")] obs_output* output, [NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_output_set_audio_encoder([NativeTypeName("obs_output_t *")] obs_output* output, [NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("size_t")] nuint idx); @@ -1672,6 +1693,10 @@ public static unsafe partial class Obs [return: NativeTypeName("obs_encoder_t *")] public static extern obs_encoder* obs_output_get_video_encoder([NativeTypeName("const obs_output_t *")] obs_output* output); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("obs_encoder_t *")] + public static extern obs_encoder* obs_output_get_video_encoder2([NativeTypeName("const obs_output_t *")] obs_output* output, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("obs_encoder_t *")] public static extern obs_encoder* obs_output_get_audio_encoder([NativeTypeName("const obs_output_t *")] obs_output* output, [NativeTypeName("size_t")] nuint idx); @@ -1699,14 +1724,25 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_output_set_preferred_size([NativeTypeName("obs_output_t *")] obs_output* output, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_output_set_preferred_size2([NativeTypeName("obs_output_t *")] obs_output* output, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("uint32_t")] public static extern uint obs_output_get_width([NativeTypeName("const obs_output_t *")] obs_output* output); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("uint32_t")] + public static extern uint obs_output_get_width2([NativeTypeName("const obs_output_t *")] obs_output* output, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("uint32_t")] public static extern uint obs_output_get_height([NativeTypeName("const obs_output_t *")] obs_output* output); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("uint32_t")] + public static extern uint obs_output_get_height2([NativeTypeName("const obs_output_t *")] obs_output* output, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const char *")] public static extern sbyte* obs_output_get_id([NativeTypeName("const obs_output_t *")] obs_output* output); @@ -1870,6 +1906,13 @@ public static unsafe partial class Obs [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_encoder_set_scaled_size([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_encoder_set_gpu_scale_type([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("enum obs_scale_type")] obs_scale_type gpu_scale_type); + + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte obs_encoder_set_frame_rate_divisor([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("uint32_t")] uint divisor); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern byte obs_encoder_scaling_enabled([NativeTypeName("const obs_encoder_t *")] obs_encoder* encoder); @@ -1882,6 +1925,18 @@ public static unsafe partial class Obs [return: NativeTypeName("uint32_t")] public static extern uint obs_encoder_get_height([NativeTypeName("const obs_encoder_t *")] obs_encoder* encoder); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte obs_encoder_gpu_scaling_enabled([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder); + + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("enum obs_scale_type")] + public static extern obs_scale_type obs_encoder_get_scale_type([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder); + + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("uint32_t")] + public static extern uint obs_encoder_get_frame_rate_divisor([NativeTypeName("const obs_encoder_t *")] obs_encoder* encoder); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("uint32_t")] public static extern uint obs_encoder_get_sample_rate([NativeTypeName("const obs_encoder_t *")] obs_encoder* encoder); diff --git a/NetObsBindings/ObsInterop/ObsEffect.cs b/NetObsBindings/ObsInterop/ObsEffect.cs index 0640848..8e97a97 100644 --- a/NetObsBindings/ObsInterop/ObsEffect.cs +++ b/NetObsBindings/ObsInterop/ObsEffect.cs @@ -6,10 +6,4 @@ public static unsafe partial class ObsEffect { [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void effect_param_parse_property([NativeTypeName("gs_eparam_t *")] gs_effect_param* param0, [NativeTypeName("const char *")] sbyte* property); - - [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void effect_upload_params([NativeTypeName("gs_effect_t *")] gs_effect* effect, [NativeTypeName("bool")] byte changed_only); - - [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void effect_upload_shader_params([NativeTypeName("gs_effect_t *")] gs_effect* effect, [NativeTypeName("gs_shader_t *")] gs_shader* shader, [NativeTypeName("struct darray *")] darray* pass_params, [NativeTypeName("bool")] byte changed_only); } diff --git a/NetObsBindings/ObsInterop/ObsFrontendApi.cs b/NetObsBindings/ObsInterop/ObsFrontendApi.cs index 590b9ad..69ecad7 100644 --- a/NetObsBindings/ObsInterop/ObsFrontendApi.cs +++ b/NetObsBindings/ObsInterop/ObsFrontendApi.cs @@ -1,3 +1,4 @@ +using System; using System.Runtime.InteropServices; namespace ObsInterop; @@ -98,8 +99,20 @@ public static unsafe partial class ObsFrontendApi public static extern void obs_frontend_add_tools_menu_item([NativeTypeName("const char *")] sbyte* name, [NativeTypeName("obs_frontend_cb")] delegate* unmanaged[Cdecl] callback, void* private_data); [DllImport("obs-frontend-api", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [Obsolete] public static extern void* obs_frontend_add_dock(void* dock); + [DllImport("obs-frontend-api", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte obs_frontend_add_dock_by_id([NativeTypeName("const char *")] sbyte* id, [NativeTypeName("const char *")] sbyte* title, void* widget); + + [DllImport("obs-frontend-api", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_frontend_remove_dock([NativeTypeName("const char *")] sbyte* id); + + [DllImport("obs-frontend-api", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte obs_frontend_add_custom_qdock([NativeTypeName("const char *")] sbyte* id, void* dock); + [DllImport("obs-frontend-api", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_frontend_add_event_callback([NativeTypeName("obs_frontend_event_cb")] delegate* unmanaged[Cdecl] callback, void* private_data); diff --git a/NetObsBindings/ObsInterop/ObsGraphics.cs b/NetObsBindings/ObsInterop/ObsGraphics.cs index f87bcfd..e96e9d8 100644 --- a/NetObsBindings/ObsInterop/ObsGraphics.cs +++ b/NetObsBindings/ObsInterop/ObsGraphics.cs @@ -866,6 +866,10 @@ public static unsafe partial class ObsGraphics [return: NativeTypeName("uint32_t")] public static extern uint gs_get_adapter_count(); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte gs_can_adapter_fast_clear(); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("gs_texture_t *")] public static extern gs_texture* gs_texture_create_gdi([NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height); diff --git a/NetObsBindings/ObsInterop/ObsOutput.cs b/NetObsBindings/ObsInterop/ObsOutput.cs index aa55b82..14d4f26 100644 --- a/NetObsBindings/ObsInterop/ObsOutput.cs +++ b/NetObsBindings/ObsInterop/ObsOutput.cs @@ -28,6 +28,18 @@ public static unsafe partial class ObsOutput [NativeTypeName("#define OBS_OUTPUT_CAN_PAUSE (1 << 5)")] public const int OBS_OUTPUT_CAN_PAUSE = (1 << 5); + [NativeTypeName("#define OBS_OUTPUT_MULTI_TRACK_AUDIO OBS_OUTPUT_MULTI_TRACK")] + public const int OBS_OUTPUT_MULTI_TRACK_AUDIO = (1 << 4); + + [NativeTypeName("#define OBS_OUTPUT_MULTI_TRACK_VIDEO (1 << 6)")] + public const int OBS_OUTPUT_MULTI_TRACK_VIDEO = (1 << 6); + + [NativeTypeName("#define OBS_OUTPUT_MULTI_TRACK_AV (OBS_OUTPUT_MULTI_TRACK_AUDIO | OBS_OUTPUT_MULTI_TRACK_VIDEO)")] + public const int OBS_OUTPUT_MULTI_TRACK_AV = ((1 << 4) | (1 << 6)); + [NativeTypeName("#define MAX_OUTPUT_AUDIO_ENCODERS 6")] public const int MAX_OUTPUT_AUDIO_ENCODERS = 6; + + [NativeTypeName("#define MAX_OUTPUT_VIDEO_ENCODERS 6")] + public const int MAX_OUTPUT_VIDEO_ENCODERS = 6; } diff --git a/NetObsBindings/ObsInterop/ObsProperties.cs b/NetObsBindings/ObsInterop/ObsProperties.cs index 959e6db..4661819 100644 --- a/NetObsBindings/ObsInterop/ObsProperties.cs +++ b/NetObsBindings/ObsInterop/ObsProperties.cs @@ -277,6 +277,10 @@ public static unsafe partial class ObsProperties [return: NativeTypeName("size_t")] public static extern nuint obs_property_list_add_float([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("const char *")] sbyte* name, double val); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("size_t")] + public static extern nuint obs_property_list_add_bool([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("bool")] byte val); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_property_list_insert_string([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("size_t")] nuint idx, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("const char *")] sbyte* val); @@ -286,6 +290,9 @@ public static unsafe partial class ObsProperties [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_property_list_insert_float([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("size_t")] nuint idx, [NativeTypeName("const char *")] sbyte* name, double val); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void obs_property_list_insert_bool([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("size_t")] nuint idx, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("bool")] byte val); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void obs_property_list_item_disable([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("size_t")] nuint idx, [NativeTypeName("bool")] byte disabled); @@ -315,6 +322,10 @@ public static unsafe partial class ObsProperties [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern double obs_property_list_item_float([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte obs_property_list_item_bool([NativeTypeName("obs_property_t *")] obs_property* p, [NativeTypeName("size_t")] nuint idx); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("enum obs_editable_list_type")] public static extern obs_editable_list_type obs_property_editable_list_type([NativeTypeName("obs_property_t *")] obs_property* p); diff --git a/NetObsBindings/ObsInterop/ObsVideo.cs b/NetObsBindings/ObsInterop/ObsVideo.cs index 7b40c2c..dc82304 100644 --- a/NetObsBindings/ObsInterop/ObsVideo.cs +++ b/NetObsBindings/ObsInterop/ObsVideo.cs @@ -26,6 +26,10 @@ public static unsafe partial class ObsVideo [return: NativeTypeName("bool")] public static extern byte video_output_connect([NativeTypeName("video_t *")] video_output* video, [NativeTypeName("const struct video_scale_info *")] video_scale_info* conversion, [NativeTypeName("void (*)(void *, struct video_data *)")] delegate* unmanaged[Cdecl] callback, void* param3); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern byte video_output_connect2([NativeTypeName("video_t *")] video_output* video, [NativeTypeName("const struct video_scale_info *")] video_scale_info* conversion, [NativeTypeName("uint32_t")] uint frame_rate_divisor, [NativeTypeName("void (*)(void *, struct video_data *)")] delegate* unmanaged[Cdecl] callback, void* param4); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void video_output_disconnect([NativeTypeName("video_t *")] video_output* video, [NativeTypeName("void (*)(void *, struct video_data *)")] delegate* unmanaged[Cdecl] callback, void* param2); @@ -90,6 +94,13 @@ public static unsafe partial class ObsVideo [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void video_output_inc_texture_skipped_frames([NativeTypeName("video_t *")] video_output* video); + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("video_t *")] + public static extern video_output* video_output_create_with_frame_rate_divisor([NativeTypeName("video_t *")] video_output* video, [NativeTypeName("uint32_t")] uint divisor); + + [DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void video_output_free_frame_rate_divisor([NativeTypeName("video_t *")] video_output* video); + [NativeTypeName("#define VIDEO_OUTPUT_SUCCESS 0")] public const int VIDEO_OUTPUT_SUCCESS = 0; diff --git a/NetObsBindings/ObsInterop/gs_effect.cs b/NetObsBindings/ObsInterop/gs_effect.cs index 268ba08..d36f88f 100644 --- a/NetObsBindings/ObsInterop/gs_effect.cs +++ b/NetObsBindings/ObsInterop/gs_effect.cs @@ -17,10 +17,9 @@ public unsafe partial struct gs_effect [NativeTypeName("char *")] public sbyte* effect_dir; - [NativeTypeName("__AnonymousRecord_effect_L155_C2")] - public _params_e__Union @params; + public gs_effect_param_array_t @params; - [NativeTypeName("__AnonymousRecord_effect_L156_C2")] + [NativeTypeName("__AnonymousRecord_effect_L159_C2")] public _techniques_e__Union techniques; [NativeTypeName("struct gs_effect_technique *")] @@ -50,57 +49,6 @@ public unsafe partial struct gs_effect [NativeTypeName("bool")] public byte looping; - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _params_e__Union - { - [FieldOffset(0)] - [NativeTypeName("struct darray")] - public darray da; - - [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L155_C2")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref gs_effect_param* array - { - get - { - return ref Anonymous.array; - } - } - - [UnscopedRef] - public ref nuint num - { - get - { - return ref Anonymous.num; - } - } - - [UnscopedRef] - public ref nuint capacity - { - get - { - return ref Anonymous.capacity; - } - } - - public unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("struct gs_effect_param *")] - public gs_effect_param* array; - - [NativeTypeName("size_t")] - public nuint num; - - [NativeTypeName("size_t")] - public nuint capacity; - } - } - [StructLayout(LayoutKind.Explicit)] public unsafe partial struct _techniques_e__Union { @@ -109,7 +57,7 @@ public unsafe partial struct _techniques_e__Union public darray da; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L156_C2")] + [NativeTypeName("__AnonymousRecord_effect_L159_C2")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/NetObsBindings/ObsInterop/gs_effect_param.cs b/NetObsBindings/ObsInterop/gs_effect_param.cs index 4397c85..841cf36 100644 --- a/NetObsBindings/ObsInterop/gs_effect_param.cs +++ b/NetObsBindings/ObsInterop/gs_effect_param.cs @@ -17,10 +17,10 @@ public unsafe partial struct gs_effect_param [NativeTypeName("bool")] public byte changed; - [NativeTypeName("__AnonymousRecord_effect_L57_C2")] + [NativeTypeName("__AnonymousRecord_effect_L60_C2")] public _cur_val_e__Union cur_val; - [NativeTypeName("__AnonymousRecord_effect_L58_C2")] + [NativeTypeName("__AnonymousRecord_effect_L61_C2")] public _default_val_e__Union default_val; [NativeTypeName("gs_effect_t *")] @@ -29,8 +29,7 @@ public unsafe partial struct gs_effect_param [NativeTypeName("gs_samplerstate_t *")] public gs_sampler_state* next_sampler; - [NativeTypeName("__AnonymousRecord_effect_L65_C2")] - public _annotations_e__Union annotations; + public gs_effect_param_array_t annotations; [StructLayout(LayoutKind.Explicit)] public unsafe partial struct _cur_val_e__Union @@ -40,7 +39,7 @@ public unsafe partial struct _cur_val_e__Union public darray da; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L57_C2")] + [NativeTypeName("__AnonymousRecord_effect_L60_C2")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -91,7 +90,7 @@ public unsafe partial struct _default_val_e__Union public darray da; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L58_C2")] + [NativeTypeName("__AnonymousRecord_effect_L61_C2")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] @@ -133,55 +132,4 @@ public unsafe partial struct _Anonymous_e__Struct public nuint capacity; } } - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _annotations_e__Union - { - [FieldOffset(0)] - [NativeTypeName("struct darray")] - public darray da; - - [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L65_C2")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref gs_effect_param* array - { - get - { - return ref Anonymous.array; - } - } - - [UnscopedRef] - public ref nuint num - { - get - { - return ref Anonymous.num; - } - } - - [UnscopedRef] - public ref nuint capacity - { - get - { - return ref Anonymous.capacity; - } - } - - public unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("struct gs_effect_param *")] - public gs_effect_param* array; - - [NativeTypeName("size_t")] - public nuint num; - - [NativeTypeName("size_t")] - public nuint capacity; - } - } } diff --git a/NetObsBindings/ObsInterop/gs_effect_param_array_t.cs b/NetObsBindings/ObsInterop/gs_effect_param_array_t.cs new file mode 100644 index 0000000..b23ed84 --- /dev/null +++ b/NetObsBindings/ObsInterop/gs_effect_param_array_t.cs @@ -0,0 +1,55 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace ObsInterop; + +[StructLayout(LayoutKind.Explicit)] +public unsafe partial struct gs_effect_param_array_t +{ + [FieldOffset(0)] + [NativeTypeName("struct darray")] + public darray da; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_effect_L27_C9")] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref gs_effect_param* array + { + get + { + return ref Anonymous.array; + } + } + + [UnscopedRef] + public ref nuint num + { + get + { + return ref Anonymous.num; + } + } + + [UnscopedRef] + public ref nuint capacity + { + get + { + return ref Anonymous.capacity; + } + } + + public unsafe partial struct _Anonymous_e__Struct + { + [NativeTypeName("struct gs_effect_param *")] + public gs_effect_param* array; + + [NativeTypeName("size_t")] + public nuint num; + + [NativeTypeName("size_t")] + public nuint capacity; + } +} diff --git a/NetObsBindings/ObsInterop/gs_effect_pass.cs b/NetObsBindings/ObsInterop/gs_effect_pass.cs index 4885a2a..37142e6 100644 --- a/NetObsBindings/ObsInterop/gs_effect_pass.cs +++ b/NetObsBindings/ObsInterop/gs_effect_pass.cs @@ -1,6 +1,3 @@ -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - namespace ObsInterop; public unsafe partial struct gs_effect_pass @@ -17,111 +14,7 @@ public unsafe partial struct gs_effect_pass [NativeTypeName("gs_shader_t *")] public gs_shader* pixelshader; - [NativeTypeName("__AnonymousRecord_effect_L104_C2")] - public _vertshader_params_e__Union vertshader_params; - - [NativeTypeName("__AnonymousRecord_effect_L105_C2")] - public _pixelshader_params_e__Union pixelshader_params; - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _vertshader_params_e__Union - { - [FieldOffset(0)] - [NativeTypeName("struct darray")] - public darray da; - - [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L104_C2")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref pass_shaderparam* array - { - get - { - return ref Anonymous.array; - } - } - - [UnscopedRef] - public ref nuint num - { - get - { - return ref Anonymous.num; - } - } - - [UnscopedRef] - public ref nuint capacity - { - get - { - return ref Anonymous.capacity; - } - } - - public unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("struct pass_shaderparam *")] - public pass_shaderparam* array; - - [NativeTypeName("size_t")] - public nuint num; - - [NativeTypeName("size_t")] - public nuint capacity; - } - } - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _pixelshader_params_e__Union - { - [FieldOffset(0)] - [NativeTypeName("struct darray")] - public darray da; - - [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L105_C2")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref pass_shaderparam* array - { - get - { - return ref Anonymous.array; - } - } - - [UnscopedRef] - public ref nuint num - { - get - { - return ref Anonymous.num; - } - } - - [UnscopedRef] - public ref nuint capacity - { - get - { - return ref Anonymous.capacity; - } - } - - public unsafe partial struct _Anonymous_e__Struct - { - [NativeTypeName("struct pass_shaderparam *")] - public pass_shaderparam* array; - - [NativeTypeName("size_t")] - public nuint num; + public pass_shaderparam_array_t vertshader_params; - [NativeTypeName("size_t")] - public nuint capacity; - } - } + public pass_shaderparam_array_t pixelshader_params; } diff --git a/NetObsBindings/ObsInterop/gs_effect_technique.cs b/NetObsBindings/ObsInterop/gs_effect_technique.cs index 1f9c710..0864f72 100644 --- a/NetObsBindings/ObsInterop/gs_effect_technique.cs +++ b/NetObsBindings/ObsInterop/gs_effect_technique.cs @@ -14,7 +14,7 @@ public unsafe partial struct gs_effect_technique [NativeTypeName("struct gs_effect *")] public gs_effect* effect; - [NativeTypeName("__AnonymousRecord_effect_L130_C2")] + [NativeTypeName("__AnonymousRecord_effect_L133_C2")] public _passes_e__Union passes; [StructLayout(LayoutKind.Explicit)] @@ -25,7 +25,7 @@ public unsafe partial struct _passes_e__Union public darray da; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_effect_L130_C2")] + [NativeTypeName("__AnonymousRecord_effect_L133_C2")] public _Anonymous_e__Struct Anonymous; [UnscopedRef] diff --git a/NetObsBindings/ObsInterop/obs_combo_format.cs b/NetObsBindings/ObsInterop/obs_combo_format.cs index b5b023b..2e969f6 100644 --- a/NetObsBindings/ObsInterop/obs_combo_format.cs +++ b/NetObsBindings/ObsInterop/obs_combo_format.cs @@ -6,4 +6,5 @@ public enum obs_combo_format OBS_COMBO_FORMAT_INT, OBS_COMBO_FORMAT_FLOAT, OBS_COMBO_FORMAT_STRING, + OBS_COMBO_FORMAT_BOOL, } diff --git a/NetObsBindings/ObsInterop/obs_combo_type.cs b/NetObsBindings/ObsInterop/obs_combo_type.cs index 277f020..b8b42d5 100644 --- a/NetObsBindings/ObsInterop/obs_combo_type.cs +++ b/NetObsBindings/ObsInterop/obs_combo_type.cs @@ -5,4 +5,5 @@ public enum obs_combo_type OBS_COMBO_TYPE_INVALID, OBS_COMBO_TYPE_EDITABLE, OBS_COMBO_TYPE_LIST, + OBS_COMBO_TYPE_RADIO, } diff --git a/NetObsBindings/ObsInterop/obs_service_connect_info.cs b/NetObsBindings/ObsInterop/obs_service_connect_info.cs index 10c2b19..ee8d760 100644 --- a/NetObsBindings/ObsInterop/obs_service_connect_info.cs +++ b/NetObsBindings/ObsInterop/obs_service_connect_info.cs @@ -8,4 +8,5 @@ public enum obs_service_connect_info OBS_SERVICE_CONNECT_INFO_USERNAME = 4, OBS_SERVICE_CONNECT_INFO_PASSWORD = 6, OBS_SERVICE_CONNECT_INFO_ENCRYPT_PASSPHRASE = 8, + OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN = 10, } diff --git a/NetObsBindings/ObsInterop/obs_source_info.cs b/NetObsBindings/ObsInterop/obs_source_info.cs index 11630dc..493fb32 100644 --- a/NetObsBindings/ObsInterop/obs_source_info.cs +++ b/NetObsBindings/ObsInterop/obs_source_info.cs @@ -153,4 +153,7 @@ public unsafe partial struct obs_source_info [NativeTypeName("enum gs_color_space (*)(void *, size_t, const enum gs_color_space *)")] public delegate* unmanaged[Cdecl] video_get_color_space; + + [NativeTypeName("void (*)(void *, obs_source_t *)")] + public delegate* unmanaged[Cdecl] filter_add; } diff --git a/NetObsBindings/ObsInterop/pass_shaderparam_array_t.cs b/NetObsBindings/ObsInterop/pass_shaderparam_array_t.cs new file mode 100644 index 0000000..997b989 --- /dev/null +++ b/NetObsBindings/ObsInterop/pass_shaderparam_array_t.cs @@ -0,0 +1,55 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace ObsInterop; + +[StructLayout(LayoutKind.Explicit)] +public unsafe partial struct pass_shaderparam_array_t +{ + [FieldOffset(0)] + [NativeTypeName("struct darray")] + public darray da; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_effect_L28_C9")] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref pass_shaderparam* array + { + get + { + return ref Anonymous.array; + } + } + + [UnscopedRef] + public ref nuint num + { + get + { + return ref Anonymous.num; + } + } + + [UnscopedRef] + public ref nuint capacity + { + get + { + return ref Anonymous.capacity; + } + } + + public unsafe partial struct _Anonymous_e__Struct + { + [NativeTypeName("struct pass_shaderparam *")] + public pass_shaderparam* array; + + [NativeTypeName("size_t")] + public nuint num; + + [NativeTypeName("size_t")] + public nuint capacity; + } +} diff --git a/NetObsBindings/ObsInterop/video_format.cs b/NetObsBindings/ObsInterop/video_format.cs index 832877f..db4b7b6 100644 --- a/NetObsBindings/ObsInterop/video_format.cs +++ b/NetObsBindings/ObsInterop/video_format.cs @@ -27,4 +27,5 @@ public enum video_format VIDEO_FORMAT_P216, VIDEO_FORMAT_P416, VIDEO_FORMAT_V210, + VIDEO_FORMAT_R10L, } diff --git a/init_obs.ps1 b/init_obs.ps1 index 8636fb2..c8ad309 100644 --- a/init_obs.ps1 +++ b/init_obs.ps1 @@ -1,5 +1,5 @@ $BeforeLocation = Get-Location -$GitTag = "release/29.1" +$GitTag = "release/30.0" try { $ObsFolder = './obs-studio' diff --git a/replace_version.ps1 b/replace_version.ps1 index 1849ba1..7833776 100644 --- a/replace_version.ps1 +++ b/replace_version.ps1 @@ -11,4 +11,4 @@ public static partial class Obs } "@ -Out-File -FilePath NetObsBindings/Obs.Version.cs -InputObject $obsVersionFile \ No newline at end of file +Out-File -FilePath NetObsBindings/Obs.Version.cs -InputObject $obsVersionFile