fix: datachannel deadlocks & dispose crashes (#87)
- Fix datachannel deadlock on dispose - Fix audio device being disposed on the wrong thread - Allow multiple RtcRuntime to be created (Useful for unit tests where we use multiple PeerConnectionFactory)
This commit is contained in:
@@ -40,6 +40,7 @@ class DataChannel {
|
||||
explicit DataChannel(
|
||||
std::shared_ptr<RtcRuntime> rtc_runtime,
|
||||
rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel);
|
||||
~DataChannel();
|
||||
|
||||
void register_observer(rust::Box<DataChannelObserverWrapper> observer) const;
|
||||
void unregister_observer() const;
|
||||
@@ -64,8 +65,6 @@ class NativeDataChannelObserver : public webrtc::DataChannelObserver {
|
||||
NativeDataChannelObserver(rust::Box<DataChannelObserverWrapper> observer,
|
||||
const DataChannel* dc);
|
||||
|
||||
~NativeDataChannelObserver();
|
||||
|
||||
void OnStateChange() override;
|
||||
void OnMessage(const webrtc::DataBuffer& buffer) override;
|
||||
void OnBufferedAmountChange(uint64_t sent_data_size) override;
|
||||
|
||||
Reference in New Issue
Block a user