Files
client-sdk-rust/crates/livekit-webrtc/src/jsep.rs
T
2022-09-18 14:40:50 +02:00

27 lines
627 B
Rust

use cxx::{SharedPtr, UniquePtr};
use libwebrtc_sys::jsep as sys_jsep;
#[derive(Debug)]
pub struct IceCandidate {}
#[derive(Debug)]
pub struct SessionDescription {
cxx_handle: UniquePtr<sys_jsep::ffi::SessionDescription>,
}
impl SessionDescription {
pub(crate) fn new(cxx_handle: UniquePtr<sys_jsep::ffi::SessionDescription>) -> Self {
Self { cxx_handle }
}
pub(crate) fn release(self) -> UniquePtr<sys_jsep::ffi::SessionDescription> {
self.cxx_handle
}
}
impl Clone for SessionDescription {
fn clone(&self) -> Self {
SessionDescription::new(self.cxx_handle.clone())
}
}