fix: use native tls roots on ffi (#91)

This commit is contained in:
Théo Monnom
2023-06-19 01:40:51 +02:00
committed by GitHub
parent 142daa9181
commit 983546767a
4 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ description = "LiveKit interface for foreign languages"
repository = "https://github.com/livekit/client-sdk-rust"
[features]
default = ["__rustls-tls"]
default = ["rustls-tls-native-roots"]
native-tls = ["livekit/native-tls"]
native-tls-vendored = ["livekit/native-tls-vendored"]
rustls-tls-native-roots = ["livekit/rustls-tls-native-roots"]
+4 -4
View File
@@ -118,12 +118,12 @@ class AudioDevice : public webrtc::AudioDeviceModule {
private:
mutable webrtc::Mutex mutex_;
webrtc::TaskQueueFactory* task_queue_factory_;
std::vector<int16_t> data_;
std::unique_ptr<rtc::TaskQueue> audio_queue_;
webrtc::RepeatingTaskHandle audio_task_;
std::vector<int16_t> data_;
webrtc::AudioTransport* audio_transport_;
std::atomic<bool> playing_{false};
std::atomic<bool> initialized_{false};
webrtc::TaskQueueFactory* task_queue_factory_;
bool playing_{false};
bool initialized_{false};
};
} // namespace livekit
+2
View File
@@ -150,11 +150,13 @@ bool AudioDevice::RecordingIsInitialized() const {
}
int32_t AudioDevice::StartPlayout() {
webrtc::MutexLock lock(&mutex_);
playing_ = true;
return 0;
}
int32_t AudioDevice::StopPlayout() {
webrtc::MutexLock lock(&mutex_);
playing_ = false;
return 0;
}
+4 -1
View File
@@ -45,9 +45,12 @@ webrtc::DataChannelInit to_native_data_channel_init(DataChannelInit init) {
DataChannel::DataChannel(
std::shared_ptr<RtcRuntime> rtc_runtime,
rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel)
: rtc_runtime_(rtc_runtime), data_channel_(std::move(data_channel)) {}
: rtc_runtime_(rtc_runtime), data_channel_(std::move(data_channel)) {
RTC_LOG(LS_VERBOSE) << "DataChannel::DataChannel()";
}
DataChannel::~DataChannel() {
RTC_LOG(LS_VERBOSE) << "DataChannel::~DataChannel()";
unregister_observer();
}