Started Room, publisher negotiation, add RTCRuntime dependencies across webrtc instances
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user