diff options
Diffstat (limited to 'modules/webrtc')
-rw-r--r-- | modules/webrtc/doc_classes/WebRTCPeerConnection.xml | 2 | ||||
-rw-r--r-- | modules/webrtc/register_types.cpp | 8 | ||||
-rw-r--r-- | modules/webrtc/webrtc_data_channel.cpp | 2 | ||||
-rw-r--r-- | modules/webrtc/webrtc_data_channel.h | 2 | ||||
-rw-r--r-- | modules/webrtc/webrtc_data_channel_extension.h | 1 | ||||
-rw-r--r-- | modules/webrtc/webrtc_peer_connection_extension.h | 1 |
6 files changed, 3 insertions, 13 deletions
diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml index f8c015dd06..454f8f2ed4 100644 --- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml +++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml @@ -5,7 +5,7 @@ </brief_description> <description> A WebRTC connection between the local computer and a remote peer. Provides an interface to connect, maintain and monitor the connection. - Setting up a WebRTC connection between two peers from now on) may not seem a trivial task, but it can be broken down into 3 main steps: + Setting up a WebRTC connection between two peers may not seem a trivial task, but it can be broken down into 3 main steps: - The peer that wants to initiate the connection ([code]A[/code] from now on) creates an offer and send it to the other peer ([code]B[/code] from now on). - [code]B[/code] receives the offer, generate and answer, and sends it to [code]A[/code]). - [code]A[/code] and [code]B[/code] then generates and exchange ICE candidates with each other. diff --git a/modules/webrtc/register_types.cpp b/modules/webrtc/register_types.cpp index 687c7b711e..28ce36f1e8 100644 --- a/modules/webrtc/register_types.cpp +++ b/modules/webrtc/register_types.cpp @@ -42,11 +42,7 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; } - -#define SET_HINT(NAME, _VAL_, _MAX_) \ - GLOBAL_DEF(PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"), _VAL_); - - SET_HINT(WRTC_IN_BUF, 64, 4096); + GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/webrtc/max_channel_in_buffer_kb", PROPERTY_HINT_RANGE, "2,4096,1,or_greater"), 64); ClassDB::register_custom_instance_class<WebRTCPeerConnection>(); GDREGISTER_CLASS(WebRTCPeerConnectionExtension); @@ -55,8 +51,6 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) { GDREGISTER_CLASS(WebRTCDataChannelExtension); GDREGISTER_CLASS(WebRTCMultiplayerPeer); - -#undef SET_HINT } void uninitialize_webrtc_module(ModuleInitializationLevel p_level) { diff --git a/modules/webrtc/webrtc_data_channel.cpp b/modules/webrtc/webrtc_data_channel.cpp index bebf5c2741..6c0d0bea37 100644 --- a/modules/webrtc/webrtc_data_channel.cpp +++ b/modules/webrtc/webrtc_data_channel.cpp @@ -61,7 +61,7 @@ void WebRTCDataChannel::_bind_methods() { } WebRTCDataChannel::WebRTCDataChannel() { - _in_buffer_shift = nearest_shift((int)GLOBAL_GET(WRTC_IN_BUF) - 1) + 10; + _in_buffer_shift = nearest_shift((int)GLOBAL_GET("network/limits/webrtc/max_channel_in_buffer_kb") - 1) + 10; } WebRTCDataChannel::~WebRTCDataChannel() { diff --git a/modules/webrtc/webrtc_data_channel.h b/modules/webrtc/webrtc_data_channel.h index e884c8425d..f35461a5a0 100644 --- a/modules/webrtc/webrtc_data_channel.h +++ b/modules/webrtc/webrtc_data_channel.h @@ -33,8 +33,6 @@ #include "core/io/packet_peer.h" -#define WRTC_IN_BUF PNAME("network/limits/webrtc/max_channel_in_buffer_kb") - class WebRTCDataChannel : public PacketPeer { GDCLASS(WebRTCDataChannel, PacketPeer); diff --git a/modules/webrtc/webrtc_data_channel_extension.h b/modules/webrtc/webrtc_data_channel_extension.h index 462e089592..b7afbaf13a 100644 --- a/modules/webrtc/webrtc_data_channel_extension.h +++ b/modules/webrtc/webrtc_data_channel_extension.h @@ -35,7 +35,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class WebRTCDataChannelExtension : public WebRTCDataChannel { diff --git a/modules/webrtc/webrtc_peer_connection_extension.h b/modules/webrtc/webrtc_peer_connection_extension.h index f3339f1eb4..05d88e0f65 100644 --- a/modules/webrtc/webrtc_peer_connection_extension.h +++ b/modules/webrtc/webrtc_peer_connection_extension.h @@ -35,7 +35,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class WebRTCPeerConnectionExtension : public WebRTCPeerConnection { |