pub struct LoggingHandler;Expand description
A simple handler that accepts all connections and logs events
Trait Implementations§
Source§impl RtmpHandler for LoggingHandler
impl RtmpHandler for LoggingHandler
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_metadata(
&self,
ctx: &StreamContext,
metadata: &HashMap<String, AmfValue>,
)
async fn on_metadata( &self, ctx: &StreamContext, metadata: &HashMap<String, AmfValue>, )
Called when stream metadata is received (@setDataFrame/onMetaData)
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_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
👎Deprecated since 0.3.0: Use on_unpublish instead
Called when the publish stream ends
Source§fn on_unpublish(&self, _ctx: &StreamContext) -> impl Future<Output = ()> + Send
fn on_unpublish(&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 Freeze for LoggingHandler
impl RefUnwindSafe for LoggingHandler
impl Send for LoggingHandler
impl Sync for LoggingHandler
impl Unpin for LoggingHandler
impl UnwindSafe for LoggingHandler
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