pub struct OpenIpcAdaptiveLink { /* private fields */ }Expand description
Browser/WASM adaptive-link feedback sender.
The app records RX quality and FEC counters, then calls tick() or
tickAndSend() to produce/send encrypted WFB feedback packets.
Implementations§
Source§impl OpenIpcAdaptiveLink
impl OpenIpcAdaptiveLink
Sourcepub fn new(
link_id: u32,
keypair: &[u8],
epoch: u64,
fec_k: usize,
fec_n: usize,
) -> Result<OpenIpcAdaptiveLink, JsValue>
pub fn new( link_id: u32, keypair: &[u8], epoch: u64, fec_k: usize, fec_n: usize, ) -> Result<OpenIpcAdaptiveLink, JsValue>
Create a new adaptive-link sender for a link id and WFB TX keypair.
Sourcepub fn set_rx_descriptor_kind(&mut self, kind: &str) -> Result<(), JsValue>
pub fn set_rx_descriptor_kind(&mut self, kind: &str) -> Result<(), JsValue>
Select the Realtek USB RX descriptor layout for future RSSI/SNR sampling.
Sourcepub fn record_rx(
&mut self,
now_ms: f64,
rssi0: u8,
rssi1: u8,
snr0: i8,
snr1: i8,
)
pub fn record_rx( &mut self, now_ms: f64, rssi0: u8, rssi1: u8, snr0: i8, snr1: i8, )
Record one pair of RSSI/SNR samples for link-quality estimation.
Sourcepub fn record_rx_transfer(
&mut self,
transfer: &[u8],
now_ms: f64,
) -> Result<(), JsValue>
pub fn record_rx_transfer( &mut self, transfer: &[u8], now_ms: f64, ) -> Result<(), JsValue>
Parse one RX transfer and record RSSI/SNR for matching video frames.
Sourcepub fn record_receiver_counters(
&mut self,
receiver: &OpenIpcReceiver,
now_ms: f64,
)
pub fn record_receiver_counters( &mut self, receiver: &OpenIpcReceiver, now_ms: f64, )
Record FEC counter deltas from an OpenIpcReceiver.
Sourcepub fn record_fec(&mut self, now_ms: f64, total: u32, recovered: u32, lost: u32)
pub fn record_fec(&mut self, now_ms: f64, total: u32, recovered: u32, lost: u32)
Record explicit FEC totals for the current time window.
Sourcepub fn request_keyframe(&mut self)
pub fn request_keyframe(&mut self)
Force keyframe-request messages in upcoming feedback packets.
Sourcepub fn set_keyframe_request_messages(&mut self, messages: u32)
pub fn set_keyframe_request_messages(&mut self, messages: u32)
Configure how many feedback packets carry a keyframe request.
Sourcepub fn set_video_start_idle_ms(&mut self, idle_ms: u32)
pub fn set_video_start_idle_ms(&mut self, idle_ms: u32)
Configure how long a quiet video stream is considered idle.
Trait Implementations§
Source§impl From<OpenIpcAdaptiveLink> for JsValue
impl From<OpenIpcAdaptiveLink> for JsValue
Source§fn from(value: OpenIpcAdaptiveLink) -> Self
fn from(value: OpenIpcAdaptiveLink) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for OpenIpcAdaptiveLink
impl FromWasmAbi for OpenIpcAdaptiveLink
Source§impl IntoWasmAbi for OpenIpcAdaptiveLink
impl IntoWasmAbi for OpenIpcAdaptiveLink
Source§impl LongRefFromWasmAbi for OpenIpcAdaptiveLink
impl LongRefFromWasmAbi for OpenIpcAdaptiveLink
Source§type Abi = WasmPtr<WasmRefCell<OpenIpcAdaptiveLink>>
type Abi = WasmPtr<WasmRefCell<OpenIpcAdaptiveLink>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<OpenIpcAdaptiveLink>
type Anchor = RcRef<OpenIpcAdaptiveLink>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for OpenIpcAdaptiveLink
impl RefFromWasmAbi for OpenIpcAdaptiveLink
Source§type Abi = WasmPtr<WasmRefCell<OpenIpcAdaptiveLink>>
type Abi = WasmPtr<WasmRefCell<OpenIpcAdaptiveLink>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<OpenIpcAdaptiveLink>
type Anchor = RcRef<OpenIpcAdaptiveLink>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for OpenIpcAdaptiveLink
impl RefMutFromWasmAbi for OpenIpcAdaptiveLink
Source§type Abi = WasmPtr<WasmRefCell<OpenIpcAdaptiveLink>>
type Abi = WasmPtr<WasmRefCell<OpenIpcAdaptiveLink>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<OpenIpcAdaptiveLink>
type Anchor = RcRefMut<OpenIpcAdaptiveLink>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for OpenIpcAdaptiveLink
impl SupportsInstanceProperty for OpenIpcAdaptiveLink
impl SupportsStaticProperty for OpenIpcAdaptiveLink
Source§impl TryFromJsValue for OpenIpcAdaptiveLink
impl TryFromJsValue for OpenIpcAdaptiveLink
Source§impl VectorFromWasmAbi for OpenIpcAdaptiveLink
impl VectorFromWasmAbi for OpenIpcAdaptiveLink
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[OpenIpcAdaptiveLink]>
Source§impl VectorIntoWasmAbi for OpenIpcAdaptiveLink
impl VectorIntoWasmAbi for OpenIpcAdaptiveLink
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[OpenIpcAdaptiveLink]>) -> Self::Abi
Source§impl WasmDescribeVector for OpenIpcAdaptiveLink
impl WasmDescribeVector for OpenIpcAdaptiveLink
Auto Trait Implementations§
impl Freeze for OpenIpcAdaptiveLink
impl RefUnwindSafe for OpenIpcAdaptiveLink
impl Send for OpenIpcAdaptiveLink
impl Sync for OpenIpcAdaptiveLink
impl Unpin for OpenIpcAdaptiveLink
impl UnsafeUnpin for OpenIpcAdaptiveLink
impl UnwindSafe for OpenIpcAdaptiveLink
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.