From da20ebf3970e311af4fa7a0e0b52a58041ceac3e Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 2 Jul 2021 01:03:44 +0200 Subject: Unified signalling thread. --- src/WebRTCLibPeerConnection.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/WebRTCLibPeerConnection.hpp') diff --git a/src/WebRTCLibPeerConnection.hpp b/src/WebRTCLibPeerConnection.hpp index f6b0528..8c5d9b8 100644 --- a/src/WebRTCLibPeerConnection.hpp +++ b/src/WebRTCLibPeerConnection.hpp @@ -18,8 +18,11 @@ class WebRTCLibPeerConnection : public WebRTCPeerConnectionNative { private: godot_error _create_pc(webrtc::PeerConnectionInterface::RTCConfiguration &config); + static std::unique_ptr signaling_thread; public: static void _register_methods(); + static void initialize_signaling(); + static void deinitialize_signaling(); void _init(); @@ -83,10 +86,9 @@ public: rtc::scoped_refptr ptr_ssdo; rtc::scoped_refptr ptr_csdo; - std::mutex *mutex_signal_queue; + std::mutex *mutex_signal_queue = nullptr; std::queue > signal_queue; - std::unique_ptr signaling_thread; rtc::scoped_refptr pc_factory; rtc::scoped_refptr peer_connection; }; -- cgit v1.2.3