Started Room, publisher negotiation, add RTCRuntime dependencies across webrtc instances

This commit is contained in:
Théo Monnom
2022-09-29 21:34:30 +02:00
parent 32ac92b171
commit 0d34e5a48e
29 changed files with 707 additions and 185 deletions
+7 -3
View File
@@ -3,17 +3,21 @@ use log::trace;
use livekit_webrtc::peer_connection_factory::PeerConnectionFactory;
use livekit_webrtc::webrtc::RTCRuntime;
/// SAFETY: The order of initialization and deletion is important for LKRuntime.
/// See the C++ constructors & destructor of these fields
pub struct LKRuntime {
pub rtc_runtime: RTCRuntime,
pub pc_factory: PeerConnectionFactory,
pub rtc_runtime: RTCRuntime,
}
impl LKRuntime {
pub fn new() -> Self {
trace!("LKRuntime::new()");
let rtc_runtime = RTCRuntime::new();
Self {
rtc_runtime: RTCRuntime::new(),
pc_factory: PeerConnectionFactory::new(),
pc_factory: PeerConnectionFactory::new(rtc_runtime.clone()),
rtc_runtime,
}
}
}