pub struct SrtHandler { /* private fields */ }Available on crate features
ingest and srt only.Expand description
SRT server: one UDP listener that demultiplexes many concurrent SRT
connections by peer address and routes each by its streamid mode —
m=publish callers are ingested (published onto the bus), m=request
callers are served (a stream muxed back to them as MPEG-TS). Each
connection runs as its own task with independent ARQ/encryption state.
Implementations§
Source§impl SrtHandler
impl SrtHandler
Sourcepub fn new(bind: SocketAddr, key: StreamKey) -> Self
pub fn new(bind: SocketAddr, key: StreamKey) -> Self
A listener bound to bind. Publish-only until with_playback is set.
key is the fallback stream key when a m=publish caller omits streamid.
Sourcepub fn with_playback(self, playback: Arc<dyn PlaybackRegistry>) -> Self
pub fn with_playback(self, playback: Arc<dyn PlaybackRegistry>) -> Self
Enable serving m=request (egress) callers from playback.
Sourcepub fn with_gate(self, gate: EgressGate) -> Self
pub fn with_gate(self, gate: EgressGate) -> Self
Gate m=request (egress) callers through gate (per-app toggle + token).
Sourcepub fn with_passphrase(self, passphrase: impl Into<String>) -> Self
Available on crate feature srt-encrypt only.
pub fn with_passphrase(self, passphrase: impl Into<String>) -> Self
srt-encrypt only.Pre-shared passphrase for AES-CTR (both encrypted ingest and egress).
Feature srt-encrypt.
Trait Implementations§
Source§impl Clone for SrtHandler
impl Clone for SrtHandler
Source§fn clone(&self) -> SrtHandler
fn clone(&self) -> SrtHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl InboundProtocol for SrtHandler
impl InboundProtocol for SrtHandler
Auto Trait Implementations§
impl !RefUnwindSafe for SrtHandler
impl !UnwindSafe for SrtHandler
impl Freeze for SrtHandler
impl Send for SrtHandler
impl Sync for SrtHandler
impl Unpin for SrtHandler
impl UnsafeUnpin for SrtHandler
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