pub struct OpenIpcReceiver { /* private fields */ }Expand description
Browser/WASM receiver for OpenIPC RX transfers and RTP packets.
Implementations§
Source§impl OpenIpcReceiver
impl OpenIpcReceiver
Sourcepub fn new() -> Result<OpenIpcReceiver, JsValue>
pub fn new() -> Result<OpenIpcReceiver, JsValue>
Create a plain/FEC-only receiver for the default OpenIPC video channel.
Sourcepub fn with_channel_id(
channel_id: u32,
fec_k: usize,
fec_n: usize,
) -> Result<OpenIpcReceiver, JsValue>
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.
Sourcepub fn with_keypair(
channel_id: u32,
keypair: &[u8],
minimum_epoch: u64,
) -> Result<OpenIpcReceiver, JsValue>
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.
Sourcepub fn with_keypair_only(
channel_id: u32,
keypair: &[u8],
minimum_epoch: u64,
) -> Result<OpenIpcReceiver, JsValue>
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.
Sourcepub fn with_keypair_and_mavlink_channel(
channel_id: u32,
mavlink_channel_id: u32,
keypair: &[u8],
minimum_epoch: u64,
) -> Result<OpenIpcReceiver, JsValue>
pub fn with_keypair_and_mavlink_channel( channel_id: u32, mavlink_channel_id: u32, keypair: &[u8], minimum_epoch: u64, ) -> Result<OpenIpcReceiver, JsValue>
Create an encrypted WFB receiver with an explicit raw telemetry channel.
This is the historical JS name. New applications should call
withKeypairAndTelemetryChannel.
Sourcepub fn with_keypair_and_telemetry_channel(
channel_id: u32,
telemetry_channel_id: u32,
keypair: &[u8],
minimum_epoch: u64,
) -> Result<OpenIpcReceiver, JsValue>
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.
Sourcepub fn push_rtp_packet(&mut self, data: &[u8]) -> Option<Uint8Array>
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.
Sourcepub fn push_rtp_packet_detailed(
&mut self,
data: &[u8],
) -> Result<JsValue, JsValue>
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.
Sourcepub fn push_decrypted_fragment(
&mut self,
data_nonce_hex: &str,
fragment: &[u8],
) -> Result<Array, JsValue>
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.
Sourcepub fn push_decrypted_80211_frame(
&mut self,
frame: &[u8],
fragment: &[u8],
) -> Result<Array, JsValue>
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.
Sourcepub fn push_encrypted_80211_frame(
&mut self,
frame: &[u8],
) -> Result<Array, JsValue>
pub fn push_encrypted_80211_frame( &mut self, frame: &[u8], ) -> Result<Array, JsValue>
Push one encrypted OpenIPC/WFB 802.11 frame.
Sourcepub fn push_rx_transfer(&mut self, transfer: &[u8]) -> Result<Array, JsValue>
pub fn push_rx_transfer(&mut self, transfer: &[u8]) -> Result<Array, JsValue>
Push one Realtek RX USB transfer and return completed Annex-B frames.
Sourcepub fn push_rx_transfer_detailed(
&mut self,
transfer: &[u8],
) -> Result<Array, JsValue>
pub fn push_rx_transfer_detailed( &mut self, transfer: &[u8], ) -> Result<Array, JsValue>
Push one RX transfer and return typed frame objects.
Sourcepub fn push_rx_transfer_detailed_with_options(
&mut self,
transfer: &[u8],
keep_corrupted: bool,
) -> Result<Array, JsValue>
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.
Sourcepub fn push_rx_transfer_profiled(
&mut self,
transfer: &[u8],
) -> Result<Object, JsValue>
pub fn push_rx_transfer_profiled( &mut self, transfer: &[u8], ) -> Result<Object, JsValue>
Push one RX transfer and return frames plus parser/latency counters.
Sourcepub fn push_rx_transfer_profiled_with_options(
&mut self,
transfer: &[u8],
keep_corrupted: bool,
) -> Result<Object, JsValue>
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.
Sourcepub fn push_rx_transfer_profiled_with_route_ids(
&mut self,
transfer: &[u8],
keep_corrupted: bool,
raw_route_ids: &[u32],
) -> Result<Object, JsValue>
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.
Sourcepub 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>
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.
Sourcepub fn add_keyed_route(
&mut self,
route_id: u32,
channel_id: u32,
keypair: &[u8],
minimum_epoch: u64,
) -> Result<(), JsValue>
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.
Sourcepub fn fec_counters(&self) -> String
pub fn fec_counters(&self) -> String
Return cumulative video FEC counters as JSON.
Trait Implementations§
Source§impl From<OpenIpcReceiver> for JsValue
impl From<OpenIpcReceiver> for JsValue
Source§fn from(value: OpenIpcReceiver) -> Self
fn from(value: OpenIpcReceiver) -> Self
Source§impl FromWasmAbi for OpenIpcReceiver
impl FromWasmAbi for OpenIpcReceiver
Source§impl IntoWasmAbi for OpenIpcReceiver
impl IntoWasmAbi for OpenIpcReceiver
Source§impl LongRefFromWasmAbi for OpenIpcReceiver
impl LongRefFromWasmAbi for OpenIpcReceiver
Source§type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>
type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>
RefFromWasmAbi::AbiSource§type Anchor = RcRef<OpenIpcReceiver>
type Anchor = RcRef<OpenIpcReceiver>
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for OpenIpcReceiver
impl OptionFromWasmAbi for OpenIpcReceiver
Source§impl OptionIntoWasmAbi for OpenIpcReceiver
impl OptionIntoWasmAbi for OpenIpcReceiver
Source§impl RefFromWasmAbi for OpenIpcReceiver
impl RefFromWasmAbi for OpenIpcReceiver
Source§type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>
type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>
Self are recovered from.Source§type Anchor = RcRef<OpenIpcReceiver>
type Anchor = RcRef<OpenIpcReceiver>
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 OpenIpcReceiver
impl RefMutFromWasmAbi for OpenIpcReceiver
Source§type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>
type Abi = WasmPtr<WasmRefCell<OpenIpcReceiver>>
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<OpenIpcReceiver>
type Anchor = RcRefMut<OpenIpcReceiver>
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for OpenIpcReceiver
impl SupportsInstanceProperty for OpenIpcReceiver
impl SupportsStaticProperty for OpenIpcReceiver
Source§impl TryFromJsValue for OpenIpcReceiver
impl TryFromJsValue for OpenIpcReceiver
Source§impl VectorFromWasmAbi for OpenIpcReceiver
impl VectorFromWasmAbi for OpenIpcReceiver
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[OpenIpcReceiver]>
Source§impl VectorIntoWasmAbi for OpenIpcReceiver
impl VectorIntoWasmAbi for OpenIpcReceiver
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[OpenIpcReceiver]>) -> Self::Abi
Source§impl WasmDescribeVector for OpenIpcReceiver
impl WasmDescribeVector for OpenIpcReceiver
Auto Trait Implementations§
impl Freeze for OpenIpcReceiver
impl RefUnwindSafe for OpenIpcReceiver
impl Send for OpenIpcReceiver
impl Sync for OpenIpcReceiver
impl Unpin for OpenIpcReceiver
impl UnsafeUnpin for OpenIpcReceiver
impl UnwindSafe for OpenIpcReceiver
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
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
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.