From ec43f875e5bd0e52c6571efd5e1c8ae412e9b2f2 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Wed, 21 Jul 2021 08:17:08 -0500 Subject: [PATCH] Add get_buffered_amount() to WebRTCDataChannel --- api.json | 13 +++++++++++++ net/godot_webrtc.h | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/api.json b/api.json index 8f08d51..ef2dbab 100644 --- a/api.json +++ b/api.json @@ -187025,6 +187025,19 @@ "arguments": [ ] }, + { + "name": "get_buffered_amount", + "return_type": "int", + "is_editor": false, + "is_noscript": false, + "is_const": true, + "is_reverse": false, + "is_virtual": false, + "has_varargs": false, + "is_from_script": false, + "arguments": [ + ] + }, { "name": "get_id", "return_type": "int", diff --git a/net/godot_webrtc.h b/net/godot_webrtc.h index 25aa72d..df4cf87 100644 --- a/net/godot_webrtc.h +++ b/net/godot_webrtc.h @@ -38,7 +38,7 @@ extern "C" { #endif #define GODOT_NET_WEBRTC_API_MAJOR 3 -#define GODOT_NET_WEBRTC_API_MINOR 2 +#define GODOT_NET_WEBRTC_API_MINOR 4 /* Library Interface (used to set default GDNative WebRTC implementation */ typedef struct { @@ -108,6 +108,13 @@ typedef struct { void *next; /* For extension? */ } godot_net_webrtc_data_channel; +/* Extensions to WebRTCDataChannel */ +typedef struct { + int (*get_buffered_amount)(const void *); + + void *next; /* For extension? */ +} godot_net_webrtc_data_channel_ext; + /* Set the default GDNative library */ godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *); /* Binds a WebRTCPeerConnectionGDNative to the provided interface */