pub struct PayloadRouteManager { /* private fields */ }Expand description
Fanout manager for one or more OpenIPC/WFB payload routes.
The manager owns one PayloadPipeline per (channel_id, key_slot) and
lets multiple route IDs share that runtime. This is useful for outputs like
video display plus RTP forwarding, or video plus telemetry.
Implementations§
Source§impl PayloadRouteManager
impl PayloadRouteManager
Sourcepub fn new(frame_layout: FrameLayout) -> Self
pub fn new(frame_layout: FrameLayout) -> Self
Create an empty route manager for frames with the given layout.
Sourcepub const fn frame_layout(&self) -> FrameLayout
pub const fn frame_layout(&self) -> FrameLayout
Return the frame layout used for all registered routes.
Sourcepub fn runtime_count(&self) -> usize
pub fn runtime_count(&self) -> usize
Return the number of distinct WFB runtimes.
Sourcepub fn add_plain_route(
&mut self,
route_id: PayloadRouteId,
channel_id: ChannelId,
key_slot: u64,
fec_k: usize,
fec_n: usize,
) -> Result<PayloadRuntimeKey, PayloadRouteError>
pub fn add_plain_route( &mut self, route_id: PayloadRouteId, channel_id: ChannelId, key_slot: u64, fec_k: usize, fec_n: usize, ) -> Result<PayloadRuntimeKey, PayloadRouteError>
Add a route that receives already-plain WFB fragments.
Routes with the same channel id and key slot share one runtime.
Sourcepub fn add_keyed_route(
&mut self,
route_id: PayloadRouteId,
channel_id: ChannelId,
key_slot: u64,
keypair: WfbKeypair,
minimum_epoch: u64,
) -> Result<PayloadRuntimeKey, PayloadRouteError>
pub fn add_keyed_route( &mut self, route_id: PayloadRouteId, channel_id: ChannelId, key_slot: u64, keypair: WfbKeypair, minimum_epoch: u64, ) -> Result<PayloadRuntimeKey, PayloadRouteError>
Add a route that receives encrypted WFB frames and session packets.
Routes with the same channel id and key slot share one runtime.
Sourcepub fn route_ids(&self, key: PayloadRuntimeKey) -> Option<&[PayloadRouteId]>
pub fn route_ids(&self, key: PayloadRuntimeKey) -> Option<&[PayloadRouteId]>
Return route ids attached to a runtime key.
Sourcepub fn fec_counters(&self, key: PayloadRuntimeKey) -> Option<FecCounters>
pub fn fec_counters(&self, key: PayloadRuntimeKey) -> Option<FecCounters>
Return cumulative FEC counters for a runtime key.
Sourcepub fn accepts_80211_frame(&self, key: PayloadRuntimeKey, frame: &[u8]) -> bool
pub fn accepts_80211_frame(&self, key: PayloadRuntimeKey, frame: &[u8]) -> bool
Return true when an 802.11 frame belongs to the selected runtime.
Sourcepub fn push_80211_frame(
&mut self,
frame: &[u8],
) -> Result<Vec<PayloadRouteEvent>, PayloadRouteError>
pub fn push_80211_frame( &mut self, frame: &[u8], ) -> Result<Vec<PayloadRouteEvent>, PayloadRouteError>
Route one raw 802.11 frame to every matching runtime.
Sourcepub fn push_decrypted_80211_frame(
&mut self,
key: PayloadRuntimeKey,
frame: &[u8],
decrypted_fragment: &[u8],
) -> Result<Vec<PayloadRouteEvent>, PayloadRouteError>
pub fn push_decrypted_80211_frame( &mut self, key: PayloadRuntimeKey, frame: &[u8], decrypted_fragment: &[u8], ) -> Result<Vec<PayloadRouteEvent>, PayloadRouteError>
Route one 802.11 frame with a caller-supplied decrypted fragment.
Sourcepub fn push_decrypted_fragment(
&mut self,
key: PayloadRuntimeKey,
data_nonce: u64,
decrypted_fragment: &[u8],
) -> Result<Vec<PayloadRouteEvent>, PayloadRouteError>
pub fn push_decrypted_fragment( &mut self, key: PayloadRuntimeKey, data_nonce: u64, decrypted_fragment: &[u8], ) -> Result<Vec<PayloadRouteEvent>, PayloadRouteError>
Push a decrypted fragment directly into one runtime.
Trait Implementations§
Source§impl Clone for PayloadRouteManager
impl Clone for PayloadRouteManager
Source§fn clone(&self) -> PayloadRouteManager
fn clone(&self) -> PayloadRouteManager
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more