cleanup: webrtc-sys & fix RtcRuntime disposing crashes (#81)

This commit is contained in:
Théo Monnom
2023-06-04 01:02:00 +02:00
committed by GitHub
parent 05ad1c95af
commit 55bda13069
80 changed files with 2209 additions and 1954 deletions
+12 -1
View File
@@ -33,6 +33,16 @@ pub struct RtcConfiguration {
pub ice_transport_type: IceTransportsType,
}
impl Default for RtcConfiguration {
fn default() -> Self {
Self {
ice_servers: vec![],
continual_gathering_policy: ContinualGatheringPolicy::GatherOnce,
ice_transport_type: IceTransportsType::All,
}
}
}
#[derive(Clone, Default)]
pub struct PeerConnectionFactory {
pub(crate) handle: imp_pcf::PeerConnectionFactory,
@@ -64,8 +74,9 @@ impl PeerConnectionFactory {
pub mod native {
use super::PeerConnectionFactory;
use crate::audio_source::native::NativeAudioSource;
use crate::media_stream::{RtcAudioTrack, RtcVideoTrack};
use crate::audio_track::RtcAudioTrack;
use crate::video_source::native::NativeVideoSource;
use crate::video_track::RtcVideoTrack;
pub trait PeerConnectionFactoryExt {
fn create_video_track(&self, label: &str, source: NativeVideoSource) -> RtcVideoTrack;