Skip to main content

OpenIpcReceiver

Struct OpenIpcReceiver 

Source
pub struct OpenIpcReceiver { /* private fields */ }
Expand description

Browser/WASM receiver for OpenIPC RX transfers and RTP packets.

Implementations§

Source§

impl OpenIpcReceiver

Source

pub fn new() -> Result<OpenIpcReceiver, JsValue>

Create a plain/FEC-only receiver for the default OpenIPC video channel.

Source

pub fn with_channel_id( channel_id: u32, fec_k: usize, fec_n: usize, ) -> Result<OpenIpcReceiver, JsValue>

Create a plain/FEC-only receiver for a specific channel id.

Source

pub fn with_keypair( channel_id: u32, keypair: &[u8], minimum_epoch: u64, ) -> Result<OpenIpcReceiver, JsValue>

Create an encrypted WFB receiver and default telemetry downlink tap.

Source

pub fn with_keypair_only( channel_id: u32, keypair: &[u8], minimum_epoch: u64, ) -> Result<OpenIpcReceiver, JsValue>

Create an encrypted WFB receiver with only the video route.

Create an encrypted WFB receiver with an explicit raw telemetry channel.

This is the historical JS name. New applications should call withKeypairAndTelemetryChannel.

Source

pub fn with_keypair_and_telemetry_channel( channel_id: u32, telemetry_channel_id: u32, keypair: &[u8], minimum_epoch: u64, ) -> Result<OpenIpcReceiver, JsValue>

Create an encrypted WFB receiver with an explicit raw telemetry channel.

Source

pub fn push_rtp_packet(&mut self, data: &[u8]) -> Option<Uint8Array>

Push one raw RTP packet and return Annex-B bytes when a frame completes.

Source

pub fn push_rtp_packet_detailed( &mut self, data: &[u8], ) -> Result<JsValue, JsValue>

Push one RTP packet and return a typed frame object when one completes.

Source

pub fn push_decrypted_fragment( &mut self, data_nonce_hex: &str, fragment: &[u8], ) -> Result<Array, JsValue>

Push an already-decrypted WFB fragment into the video runtime.

Source

pub fn push_decrypted_80211_frame( &mut self, frame: &[u8], fragment: &[u8], ) -> Result<Array, JsValue>

Push an 802.11 frame with a caller-supplied decrypted WFB fragment.

Source

pub fn push_encrypted_80211_frame( &mut self, frame: &[u8], ) -> Result<Array, JsValue>

Push one encrypted OpenIPC/WFB 802.11 frame.

Source

pub fn push_rx_transfer(&mut self, transfer: &[u8]) -> Result<Array, JsValue>

Push one Realtek RX USB transfer and return completed Annex-B frames.

Source

pub fn push_rx_transfer_detailed( &mut self, transfer: &[u8], ) -> Result<Array, JsValue>

Push one RX transfer and return typed frame objects.

Source

pub fn push_rx_transfer_detailed_with_options( &mut self, transfer: &[u8], keep_corrupted: bool, ) -> Result<Array, JsValue>

Push one RX transfer with control over CRC/ICV-marked packets.

Source

pub fn push_rx_transfer_profiled( &mut self, transfer: &[u8], ) -> Result<Object, JsValue>

Push one RX transfer and return frames plus parser/latency counters.

Source

pub fn push_rx_transfer_profiled_with_options( &mut self, transfer: &[u8], keep_corrupted: bool, ) -> Result<Object, JsValue>

Push one RX transfer with profiling and bad-FCS handling options.

Source

pub fn push_rx_transfer_profiled_with_route_ids( &mut self, transfer: &[u8], keep_corrupted: bool, raw_route_ids: &[u32], ) -> Result<Object, JsValue>

Push one RX transfer and copy raw payloads for caller-selected route IDs.

Source

pub fn push_rx_transfer_profiled_with_route_ids_and_rtp_taps( &mut self, transfer: &[u8], keep_corrupted: bool, raw_route_ids: &[u32], rtp_tap_route_ids: &[u32], rtp_tap_payload_types: &[u8], ) -> Result<Object, JsValue>

Push one RX transfer and copy raw payloads plus filtered RTP payload taps.

Source

pub fn add_keyed_route( &mut self, route_id: u32, channel_id: u32, keypair: &[u8], minimum_epoch: u64, ) -> Result<(), JsValue>

Add an encrypted raw-payload route to the receiver.

Source

pub fn fec_counters(&self) -> String

Return cumulative video FEC counters as JSON.

Trait Implementations§

Source§

impl From<OpenIpcReceiver> for JsValue

Source§

fn from(value: OpenIpcReceiver) -> Self

Converts to this type from the input type.
Source§

impl FromWasmAbi for OpenIpcReceiver

Source§

type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>

The Wasm ABI type that this converts from when coming back out from the ABI boundary.
Source§

unsafe fn from_abi(js: Self::Abi) -> Self

Recover a Self from Self::Abi. Read more
Source§

impl IntoWasmAbi for OpenIpcReceiver

Source§

type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>

The Wasm ABI type that this converts into when crossing the ABI boundary.
Source§

fn into_abi(self) -> Self::Abi

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.
Source§

impl LongRefFromWasmAbi for OpenIpcReceiver

Source§

type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>

Same as RefFromWasmAbi::Abi
Source§

type Anchor = RcRef<OpenIpcReceiver>

Same as RefFromWasmAbi::Anchor
Source§

unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

Same as RefFromWasmAbi::ref_from_abi
Source§

impl OptionFromWasmAbi for OpenIpcReceiver

Source§

fn is_none(abi: &Self::Abi) -> bool

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi.
Source§

impl OptionIntoWasmAbi for OpenIpcReceiver

Source§

fn none() -> Self::Abi

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more
Source§

impl RefFromWasmAbi for OpenIpcReceiver

Source§

type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>

The Wasm ABI type references to Self are recovered from.
Source§

type Anchor = RcRef<OpenIpcReceiver>

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§

unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

Recover a Self::Anchor from Self::Abi. Read more
Source§

impl RefMutFromWasmAbi for OpenIpcReceiver

Source§

type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>

Same as RefFromWasmAbi::Abi
Source§

type Anchor = RcRefMut<OpenIpcReceiver>

Same as RefFromWasmAbi::Anchor
Source§

unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor

Same as RefFromWasmAbi::ref_from_abi
Source§

impl SupportsConstructor for OpenIpcReceiver

Source§

impl SupportsInstanceProperty for OpenIpcReceiver

Source§

impl SupportsStaticProperty for OpenIpcReceiver

Source§

impl TryFromJsValue for OpenIpcReceiver

Source§

fn try_from_js_value(value: JsValue) -> Result<Self, JsValue>

Performs the conversion.
Source§

fn try_from_js_value_ref(value: &JsValue) -> Option<Self>

Performs the conversion.
Source§

impl VectorFromWasmAbi for OpenIpcReceiver

Source§

impl VectorIntoWasmAbi for OpenIpcReceiver

Source§

impl WasmDescribe for OpenIpcReceiver

Source§

impl WasmDescribeVector for OpenIpcReceiver

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ReturnWasmAbi for T
where T: IntoWasmAbi,

Source§

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi
Source§

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.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more