pub struct ChainedHandler<H1, H2> { /* private fields */ }Expand description
A handler wrapper that chains multiple handlers
Implementations§
Source§impl<H1, H2> ChainedHandler<H1, H2>where
H1: RtmpHandler,
H2: RtmpHandler,
impl<H1, H2> ChainedHandler<H1, H2>where
H1: RtmpHandler,
H2: RtmpHandler,
Trait Implementations§
Source§impl<H1, H2> RtmpHandler for ChainedHandler<H1, H2>where
H1: RtmpHandler,
H2: RtmpHandler,
impl<H1, H2> RtmpHandler for ChainedHandler<H1, H2>where
H1: RtmpHandler,
H2: RtmpHandler,
Source§async fn on_connection(&self, ctx: &SessionContext) -> bool
async fn on_connection(&self, ctx: &SessionContext) -> bool
Called when a new TCP connection is established Read more
Source§async fn on_connect(
&self,
ctx: &SessionContext,
params: &ConnectParams,
) -> AuthResult
async fn on_connect( &self, ctx: &SessionContext, params: &ConnectParams, ) -> AuthResult
Called on RTMP ‘connect’ command Read more
Source§async fn on_publish(
&self,
ctx: &SessionContext,
params: &PublishParams,
) -> AuthResult
async fn on_publish( &self, ctx: &SessionContext, params: &PublishParams, ) -> AuthResult
Called on ‘publish’ command Read more
Source§async fn on_disconnect(&self, ctx: &SessionContext)
async fn on_disconnect(&self, ctx: &SessionContext)
Called when the connection closes
Source§fn on_handshake_complete(
&self,
_ctx: &SessionContext,
) -> impl Future<Output = ()> + Send
fn on_handshake_complete( &self, _ctx: &SessionContext, ) -> impl Future<Output = ()> + Send
Called after successful handshake, before connect command
Source§fn on_fc_publish(
&self,
_ctx: &SessionContext,
_stream_key: &str,
) -> impl Future<Output = AuthResult> + Send
fn on_fc_publish( &self, _ctx: &SessionContext, _stream_key: &str, ) -> impl Future<Output = AuthResult> + Send
Called on FCPublish command (OBS/Twitch compatibility) Read more
Source§fn on_play(
&self,
_ctx: &SessionContext,
_params: &PlayParams,
) -> impl Future<Output = AuthResult> + Send
fn on_play( &self, _ctx: &SessionContext, _params: &PlayParams, ) -> impl Future<Output = AuthResult> + Send
Called on ‘play’ command Read more
Source§fn on_metadata(
&self,
_ctx: &StreamContext,
_metadata: &HashMap<String, AmfValue>,
) -> impl Future<Output = ()> + Send
fn on_metadata( &self, _ctx: &StreamContext, _metadata: &HashMap<String, AmfValue>, ) -> impl Future<Output = ()> + Send
Called when stream metadata is received (@setDataFrame/onMetaData)
Source§fn on_media_tag(
&self,
_ctx: &StreamContext,
_tag: &FlvTag,
) -> impl Future<Output = bool> + Send
fn on_media_tag( &self, _ctx: &StreamContext, _tag: &FlvTag, ) -> impl Future<Output = bool> + Send
Called for each raw FLV tag (when MediaDeliveryMode includes RawFlv) Read more
Source§fn on_video_frame(
&self,
_ctx: &StreamContext,
_frame: &H264Data,
_timestamp: u32,
) -> impl Future<Output = ()> + Send
fn on_video_frame( &self, _ctx: &StreamContext, _frame: &H264Data, _timestamp: u32, ) -> impl Future<Output = ()> + Send
Called for each video frame (when MediaDeliveryMode includes ParsedFrames)
Source§fn on_audio_frame(
&self,
_ctx: &StreamContext,
_frame: &AacData,
_timestamp: u32,
) -> impl Future<Output = ()> + Send
fn on_audio_frame( &self, _ctx: &StreamContext, _frame: &AacData, _timestamp: u32, ) -> impl Future<Output = ()> + Send
Called for each audio frame (when MediaDeliveryMode includes ParsedFrames)
Source§fn on_keyframe(
&self,
_ctx: &StreamContext,
_timestamp: u32,
) -> impl Future<Output = ()> + Send
fn on_keyframe( &self, _ctx: &StreamContext, _timestamp: u32, ) -> impl Future<Output = ()> + Send
Called when a keyframe is received
Source§fn on_publish_stop(
&self,
_ctx: &StreamContext,
) -> impl Future<Output = ()> + Send
fn on_publish_stop( &self, _ctx: &StreamContext, ) -> impl Future<Output = ()> + Send
Called when the publish stream ends
Source§fn on_play_stop(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
fn on_play_stop(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
Called when the play stream ends
Source§fn on_pause(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
fn on_pause(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
Called when a subscriber pauses playback
Source§fn on_unpause(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
fn on_unpause(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
Called when a subscriber resumes playback
Source§fn media_delivery_mode(&self) -> MediaDeliveryMode
fn media_delivery_mode(&self) -> MediaDeliveryMode
Get the media delivery mode for this handler
Source§fn on_stats_update(
&self,
_ctx: &SessionContext,
) -> impl Future<Output = ()> + Send
fn on_stats_update( &self, _ctx: &SessionContext, ) -> impl Future<Output = ()> + Send
Called periodically with stats update
Auto Trait Implementations§
impl<H1, H2> Freeze for ChainedHandler<H1, H2>
impl<H1, H2> RefUnwindSafe for ChainedHandler<H1, H2>where
H1: RefUnwindSafe,
H2: RefUnwindSafe,
impl<H1, H2> Send for ChainedHandler<H1, H2>
impl<H1, H2> Sync for ChainedHandler<H1, H2>
impl<H1, H2> Unpin for ChainedHandler<H1, H2>
impl<H1, H2> UnwindSafe for ChainedHandler<H1, H2>where
H1: UnwindSafe,
H2: UnwindSafe,
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