pub enum MediaNotificationContent {
NewIncomingStream {
stream_name: String,
},
StreamDisconnected,
Video {
codec: VideoCodec,
is_sequence_header: bool,
is_keyframe: bool,
data: Bytes,
timestamp: VideoTimestamp,
},
Audio {
codec: AudioCodec,
is_sequence_header: bool,
data: Bytes,
timestamp: Duration,
},
Metadata {
data: HashMap<String, String>,
},
}
Expand description
The detailed information contained within a media notification
Variants§
NewIncomingStream
Announces that this stream has now connected, and steps that receive this notification should prepare for media data to start coming through
StreamDisconnected
Announces that this stream’s source has disconnected and will no longer be sending any
new notifications down. Steps that receive this message can use this to clean up any
information they are tracking about this stream, as no new media will arrive without
a new NewIncomingStream
announcement.
Video
Video content
Audio
Audio content
Metadata
New stream metadata
Implementations§
Source§impl MediaNotificationContent
impl MediaNotificationContent
Sourcepub fn to_rtmp_media_data(&self) -> Option<RtmpEndpointMediaData>
pub fn to_rtmp_media_data(&self) -> Option<RtmpEndpointMediaData>
Creates an RTMP representation of the media data from the specified media content
Trait Implementations§
Source§impl Clone for MediaNotificationContent
impl Clone for MediaNotificationContent
Source§fn clone(&self) -> MediaNotificationContent
fn clone(&self) -> MediaNotificationContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MediaNotificationContent
impl Debug for MediaNotificationContent
Source§impl PartialEq for MediaNotificationContent
impl PartialEq for MediaNotificationContent
impl StructuralPartialEq for MediaNotificationContent
Auto Trait Implementations§
impl !Freeze for MediaNotificationContent
impl RefUnwindSafe for MediaNotificationContent
impl Send for MediaNotificationContent
impl Sync for MediaNotificationContent
impl Unpin for MediaNotificationContent
impl UnwindSafe for MediaNotificationContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.