cleanup: webrtc-sys & fix RtcRuntime disposing crashes (#81)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user