rtc_config

This commit is contained in:
Théo Monnom
2022-09-25 13:54:56 +02:00
parent e74aac70bb
commit 4067a9add6
26 changed files with 865 additions and 140 deletions
@@ -12,9 +12,27 @@ pub mod ffi {
pub password: String,
}
#[derive(Debug)]
#[repr(i32)]
pub enum ContinualGatheringPolicy {
GatherOnce,
GatherContinually,
}
#[derive(Debug)]
#[repr(i32)]
pub enum IceTransportsType {
None,
Relay,
NoHost,
All,
}
#[derive(Debug, Clone)]
pub struct RTCConfiguration {
pub ice_servers: Vec<ICEServer>,
pub continual_gathering_policy: ContinualGatheringPolicy,
pub ice_transport_type: IceTransportsType,
}
unsafe extern "C++" {
@@ -22,7 +40,7 @@ pub mod ffi {
type PeerConnection = crate::peer_connection::ffi::PeerConnection;
type NativePeerConnectionObserver =
crate::peer_connection::ffi::NativePeerConnectionObserver;
crate::peer_connection::ffi::NativePeerConnectionObserver;
type PeerConnectionFactory;
type NativeRTCConfiguration;
@@ -38,3 +56,6 @@ pub mod ffi {
) -> Result<UniquePtr<PeerConnection>>;
}
}
unsafe impl Send for ffi::PeerConnectionFactory {}
unsafe impl Sync for ffi::PeerConnectionFactory {}