pub struct XrReportHandle { /* private fields */ }Expand description
The application’s way to give the XR generator what only it knows, while the connection
runs: the call quality figures of each received stream’s VoIP Metrics block (RFC 3611
section 4.7.5). Built with XrReportBuilder::build_with_handle; clones share the state.
use rtci_interceptor::{CallQuality, Registry, Slot, XrReportBuilder, XrReportHandle};
let handle = XrReportHandle::new();
let chain = Registry::new()
.with(Slot::ExtendedReports, XrReportBuilder::new().build_with_handle(&handle))
.build();
// From the application's own call quality model of the stream it plays out:
handle.set_call_quality(
0x1234_5678,
CallQuality { r_factor: Some(88), mos_lq: Some(41), mos_cq: Some(40), ..Default::default() },
);Implementations§
Source§impl XrReportHandle
impl XrReportHandle
Sourcepub fn set_call_quality(&self, ssrc: u32, quality: CallQuality)
pub fn set_call_quality(&self, ssrc: u32, quality: CallQuality)
The call quality figures for the remote stream ssrc, sent in its next VoIP Metrics
blocks until replaced or cleared.
Sourcepub fn clear_call_quality(&self, ssrc: u32)
pub fn clear_call_quality(&self, ssrc: u32)
Forgets the figures for ssrc: its blocks say “unavailable” again.
Sourcepub fn call_quality(&self, ssrc: u32) -> Option<CallQuality>
pub fn call_quality(&self, ssrc: u32) -> Option<CallQuality>
The figures last given for ssrc.
Trait Implementations§
Source§impl Clone for XrReportHandle
impl Clone for XrReportHandle
Source§impl Debug for XrReportHandle
impl Debug for XrReportHandle
Auto Trait Implementations§
impl Forget for XrReportHandle
impl Freeze for XrReportHandlewhere
*const ArcInner<Mutex<HashMap<u32, CallQuality>>> is !null: Freeze,
PhantomData<ArcInner<Mutex<HashMap<u32, CallQuality>>>>: Freeze,
impl Move for XrReportHandle
impl RefUnwindSafe for XrReportHandle
impl Send for XrReportHandle
impl Sync for XrReportHandle
impl Unpin for XrReportHandle
impl UnsafeUnpin for XrReportHandlewhere
*const ArcInner<Mutex<HashMap<u32, CallQuality>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<HashMap<u32, CallQuality>>>>: UnsafeUnpin,
impl UnwindSafe for XrReportHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more