Skip to content

Commit

Permalink
Update to 30.1.2 and regenerate bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
kostya9 committed Apr 11, 2024
1 parent d1c2200 commit 5477674
Show file tree
Hide file tree
Showing 246 changed files with 130 additions and 89 deletions.
2 changes: 1 addition & 1 deletion NetObsBindings/NetObsBindings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>

<PropertyGroup>
<PackageVersion>30.0.2.0</PackageVersion>
<PackageVersion>30.1.2.0</PackageVersion>

<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<ProjectUrl>https://github.com/kostya9/NetObsBindings</ProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion NetObsBindings/Obs.Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ namespace ObsInterop;

public static partial class Obs
{
public static readonly Version Version = new Version(30, 0, 2);
public static readonly Version Version = new Version(30, 1, 2);
}
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ public static unsafe partial class Obs
[return: NativeTypeName("bool")]
public static extern byte obs_audio_monitoring_available();

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_reset_audio_monitoring();

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_enum_audio_monitoring_devices([NativeTypeName("obs_enum_audio_device_cb")] delegate* unmanaged[Cdecl]<void*, sbyte*, sbyte*, byte> cb, void* data);

Expand Down Expand Up @@ -533,8 +536,12 @@ public static unsafe partial class Obs

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
[Obsolete]
public static extern byte obs_view_get_video_info([NativeTypeName("obs_view_t *")] obs_view* view, [NativeTypeName("struct obs_video_info *")] obs_video_info* ovi);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_view_enum_video_info([NativeTypeName("obs_view_t *")] obs_view* view, [NativeTypeName("bool (*)(void *, struct obs_video_info *)")] delegate* unmanaged[Cdecl]<void*, obs_video_info*, byte> enum_proc, void* param2);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("obs_display_t *")]
public static extern obs_display* obs_display_create([NativeTypeName("const struct gs_init_data *")] gs_init_data* graphics_data, [NativeTypeName("uint32_t")] uint backround_color);
Expand Down Expand Up @@ -1322,6 +1329,9 @@ public static unsafe partial class Obs
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_set_bounds_alignment([NativeTypeName("obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("uint32_t")] uint alignment);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_set_bounds_crop([NativeTypeName("obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("bool")] byte crop);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_set_bounds([NativeTypeName("obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("const struct vec2 *")] System.Numerics.Vector2* bounds);

Expand Down Expand Up @@ -1350,15 +1360,27 @@ public static unsafe partial class Obs
[return: NativeTypeName("uint32_t")]
public static extern uint obs_sceneitem_get_bounds_alignment([NativeTypeName("const obs_sceneitem_t *")] obs_scene_item* item);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte obs_sceneitem_get_bounds_crop([NativeTypeName("const obs_sceneitem_t *")] obs_scene_item* item);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_get_bounds([NativeTypeName("const obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("struct vec2 *")] System.Numerics.Vector2* bounds);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[Obsolete]
public static extern void obs_sceneitem_get_info([NativeTypeName("const obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("struct obs_transform_info *")] obs_transform_info* info);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[Obsolete]
public static extern void obs_sceneitem_set_info([NativeTypeName("obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("const struct obs_transform_info *")] obs_transform_info* info);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_get_info2([NativeTypeName("const obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("struct obs_transform_info *")] obs_transform_info* info);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_set_info2([NativeTypeName("obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("const struct obs_transform_info *")] obs_transform_info* info);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_sceneitem_get_draw_transform([NativeTypeName("const obs_sceneitem_t *")] obs_scene_item* item, [NativeTypeName("struct matrix4 *")] matrix4* transform);

Expand Down Expand Up @@ -1913,6 +1935,24 @@ public static unsafe partial class Obs
[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_add_roi([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("const struct obs_encoder_roi *")] obs_encoder_roi* roi);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte obs_encoder_has_roi([NativeTypeName("const obs_encoder_t *")] obs_encoder* encoder);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_encoder_clear_roi([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_encoder_enum_roi([NativeTypeName("obs_encoder_t *")] obs_encoder* encoder, [NativeTypeName("void (*)(void *, struct obs_encoder_roi *)")] delegate* unmanaged[Cdecl]<void*, obs_encoder_roi*, void> enum_proc, void* param2);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("uint32_t")]
public static extern uint obs_encoder_get_roi_increment([NativeTypeName("const obs_encoder_t *")] obs_encoder* encoder);

[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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public static unsafe partial class ObsAudio
[NativeTypeName("#define MAX_AUDIO_CHANNELS 8")]
public const int MAX_AUDIO_CHANNELS = 8;

[NativeTypeName("#define MAX_DEVICE_INPUT_CHANNELS 64")]
public const int MAX_DEVICE_INPUT_CHANNELS = 64;

[NativeTypeName("#define AUDIO_OUTPUT_FRAMES 1024")]
public const int AUDIO_OUTPUT_FRAMES = 1024;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public static unsafe partial class ObsData
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_data_set_autoselect_obj([NativeTypeName("obs_data_t *")] obs_data* data, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("obs_data_t *")] obs_data* obj);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void obs_data_set_autoselect_array([NativeTypeName("obs_data_t *")] obs_data* data, [NativeTypeName("const char *")] sbyte* name, [NativeTypeName("obs_data_array_t *")] obs_data_array* arr);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("const char *")]
public static extern sbyte* obs_data_get_string([NativeTypeName("obs_data_t *")] obs_data* data, [NativeTypeName("const char *")] sbyte* name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static unsafe partial class ObsDeviceExports

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte device_enum_adapters([NativeTypeName("bool (*)(void *, const char *, uint32_t)")] delegate* unmanaged[Cdecl]<void*, sbyte*, uint, byte> callback, void* param1);
public static extern byte device_enum_adapters([NativeTypeName("gs_device_t *")] gs_device* device, [NativeTypeName("bool (*)(void *, const char *, uint32_t)")] delegate* unmanaged[Cdecl]<void*, sbyte*, uint, byte> callback, void* param2);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("const char *")]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ public static unsafe partial class ObsEncoder

[NativeTypeName("#define OBS_ENCODER_CAP_INTERNAL (1 << 3)")]
public const int OBS_ENCODER_CAP_INTERNAL = (1 << 3);

[NativeTypeName("#define OBS_ENCODER_CAP_ROI (1 << 4)")]
public const int OBS_ENCODER_CAP_ROI = (1 << 4);
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ public static unsafe partial class ObsGraphics
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int gs_get_device_type();

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("uint32_t")]
public static extern uint gs_get_adapter_count();

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void gs_enum_adapters([NativeTypeName("bool (*)(void *, const char *, uint32_t)")] delegate* unmanaged[Cdecl]<void*, sbyte*, uint, byte> callback, void* param1);

Expand Down Expand Up @@ -812,6 +816,14 @@ public static unsafe partial class ObsGraphics
[return: NativeTypeName("bool")]
public static extern byte gs_p010_available();

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte gs_texture_create_nv12([NativeTypeName("gs_texture_t **")] gs_texture** tex_y, [NativeTypeName("gs_texture_t **")] gs_texture** tex_uv, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height, [NativeTypeName("uint32_t")] uint flags);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte gs_texture_create_p010([NativeTypeName("gs_texture_t **")] gs_texture** tex_y, [NativeTypeName("gs_texture_t **")] gs_texture** tex_uv, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height, [NativeTypeName("uint32_t")] uint flags);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte gs_is_monitor_hdr(void* monitor);
Expand Down Expand Up @@ -862,10 +874,6 @@ public static unsafe partial class ObsGraphics
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern float gs_duplicator_get_sdr_white_level([NativeTypeName("gs_duplicator_t *")] gs_duplicator* duplicator);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[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();
Expand Down Expand Up @@ -902,14 +910,6 @@ public static unsafe partial class ObsGraphics
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int gs_texture_release_sync([NativeTypeName("gs_texture_t *")] gs_texture* tex, [NativeTypeName("uint64_t")] ulong key);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte gs_texture_create_nv12([NativeTypeName("gs_texture_t **")] gs_texture** tex_y, [NativeTypeName("gs_texture_t **")] gs_texture** tex_uv, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height, [NativeTypeName("uint32_t")] uint flags);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern byte gs_texture_create_p010([NativeTypeName("gs_texture_t **")] gs_texture** tex_y, [NativeTypeName("gs_texture_t **")] gs_texture** tex_uv, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height, [NativeTypeName("uint32_t")] uint flags);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("gs_stagesurf_t *")]
public static extern gs_stage_surface* gs_stagesurface_create_nv12([NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ namespace ObsInterop;

public static unsafe partial class ObsVideoFrame
{
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?video_frame_init@@YAXPEAUvideo_frame@@W4video_format@@II@Z", ExactSpelling = true)]
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void video_frame_init([NativeTypeName("struct video_frame *")] video_frame* frame, [NativeTypeName("enum video_format")] video_format format, [NativeTypeName("uint32_t")] uint width, [NativeTypeName("uint32_t")] uint height);

[DllImport("obs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?video_frame_copy@@YAXPEAUvideo_frame@@PEBU1@W4video_format@@I@Z", ExactSpelling = true)]
[DllImport("obs", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void video_frame_copy([NativeTypeName("struct video_frame *")] video_frame* dst, [NativeTypeName("const struct video_frame *")] video_frame* src, [NativeTypeName("enum video_format")] video_format format, [NativeTypeName("uint32_t")] uint height);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions NetObsBindings/ObsInterop/Generated/encoder_texture.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace ObsInterop;

public partial struct encoder_texture
{
[NativeTypeName("uint32_t")]
public uint handle;

[NativeTypeName("struct gs_texture *[4]")]
public _tex_e__FixedBuffer tex;

public unsafe partial struct _tex_e__FixedBuffer
{
public gs_texture* e0;
public gs_texture* e1;
public gs_texture* e2;
public gs_texture* e3;

public ref gs_texture* this[int index]
{
get
{
fixed (gs_texture** pThis = &e0)
{
return ref pThis[index];
}
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ public unsafe partial struct obs_encoder_info

[NativeTypeName("bool (*)(void *, uint32_t, int64_t, uint64_t, uint64_t *, struct encoder_packet *, bool *)")]
public delegate* unmanaged[Cdecl]<void*, uint, long, ulong, ulong*, encoder_packet*, bool*, byte> encode_texture;

[NativeTypeName("bool (*)(void *, struct encoder_texture *, int64_t, uint64_t, uint64_t *, struct encoder_packet *, bool *)")]
public delegate* unmanaged[Cdecl]<void*, encoder_texture*, long, ulong, ulong*, encoder_packet*, bool*, byte> encode_texture2;
}
18 changes: 18 additions & 0 deletions NetObsBindings/ObsInterop/Generated/obs_encoder_roi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace ObsInterop;

public partial struct obs_encoder_roi
{
[NativeTypeName("uint32_t")]
public uint top;

[NativeTypeName("uint32_t")]
public uint bottom;

[NativeTypeName("uint32_t")]
public uint left;

[NativeTypeName("uint32_t")]
public uint right;

public float priority;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ public partial struct obs_transform_info

[NativeTypeName("struct vec2")]
public System.Numerics.Vector2 bounds;

[NativeTypeName("bool")]
public byte crop_to_bounds;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 0 additions & 22 deletions NetObsBindings/ObsInterop/NativeInheritanceAttribute.cs

This file was deleted.

16 changes: 0 additions & 16 deletions NetObsBindings/ObsInterop/SetsLastSystemErrorAttribute.cs

This file was deleted.

22 changes: 0 additions & 22 deletions NetObsBindings/ObsInterop/VtblIndexAttribute.cs

This file was deleted.

5 changes: 0 additions & 5 deletions NetObsBindings/ObsInterop/quat.cs

This file was deleted.

Loading

0 comments on commit 5477674

Please sign in to comment.