summaryrefslogtreecommitdiff
path: root/src/WebRTCLibPeerConnection.hpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-02 01:03:44 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-07-02 15:12:41 +0200
commitda20ebf3970e311af4fa7a0e0b52a58041ceac3e (patch)
tree4264358c3618a6db142d4cef4c0452decc3188d0 /src/WebRTCLibPeerConnection.hpp
parent3711ad23f6c936b494041845254565efed8ca6f8 (diff)
downloadfork-godot-webrtc-native-da20ebf3970e311af4fa7a0e0b52a58041ceac3e.tar.gz
fork-godot-webrtc-native-da20ebf3970e311af4fa7a0e0b52a58041ceac3e.tar.bz2
fork-godot-webrtc-native-da20ebf3970e311af4fa7a0e0b52a58041ceac3e.zip
Unified signalling thread.
Diffstat (limited to 'src/WebRTCLibPeerConnection.hpp')
-rw-r--r--src/WebRTCLibPeerConnection.hpp6
1 files changed, 4 insertions, 2 deletions
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<rtc::Thread> 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<GodotSSDO> ptr_ssdo;
rtc::scoped_refptr<GodotCSDO> ptr_csdo;
- std::mutex *mutex_signal_queue;
+ std::mutex *mutex_signal_queue = nullptr;
std::queue<std::function<void()> > signal_queue;
- std::unique_ptr<rtc::Thread> signaling_thread;
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory;
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection;
};