pub struct RtmpStreamSender { /* private fields */ }Expand description
Handle for feeding raw, pre-packaged RTMP chunk bytes to a stream published
via EmbedRtmpServer::<Running>::create_stream_sender. Wraps the internal
channel so callers do not depend on the channel implementation.
Cloneable and multi-producer: every clone feeds the same stream, so several producers can push chunks to one stream concurrently.
Implementations§
Source§impl RtmpStreamSender
impl RtmpStreamSender
Sourcepub fn send(&self, chunk: Vec<u8>) -> Result<()>
pub fn send(&self, chunk: Vec<u8>) -> Result<()>
Sends one already-RTMP-chunk-packaged byte buffer to the stream.
The underlying channel is bounded, so this blocks while the stream’s
queue is full (the server applying backpressure) and returns once space
frees up. Returns
Error::RtmpStreamClosed if the
stream has been torn down — its receiver was dropped because the server
stopped or the stream was removed.
Trait Implementations§
Source§impl Clone for RtmpStreamSender
impl Clone for RtmpStreamSender
Source§fn clone(&self) -> RtmpStreamSender
fn clone(&self) -> RtmpStreamSender
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 moreAuto Trait Implementations§
impl Freeze for RtmpStreamSender
impl RefUnwindSafe for RtmpStreamSender
impl Send for RtmpStreamSender
impl Sync for RtmpStreamSender
impl Unpin for RtmpStreamSender
impl UnsafeUnpin for RtmpStreamSender
impl UnwindSafe for RtmpStreamSender
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