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>,
},
MediaPayload {
codec: Arc<String>,
timestamp: Duration,
metadata: MediaPayloadMetadataCollection,
data: Bytes,
is_required_for_decoding: bool,
},
}Expand description
The detailed information contained within a media notification
Variants
NewIncomingStream
Fields
stream_name: StringThe name for the stream that’s being published
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
Fields
codec: VideoCodecis_sequence_header: boolis_keyframe: booldata: Bytestimestamp: VideoTimestampVideo content
Audio
Audio content
Metadata
New stream metadata
MediaPayload
Fields
timestamp: DurationHow long since an unidentified epoch is this payload valid for. It cannot be assumed that this is necessarily the duration from stream begin, but can be used to determine when this payload should be decoded in comparison to payloads that came in before and after it.
metadata: MediaPayloadMetadataCollectionMetadata that’s only specific to this individual payload
data: BytesActual payload bytes
is_required_for_decoding: boolDetermines if this payload is a high priority packet that is required for decoding.
This is meant for sequence headers (for h264 and aac as an example) where later packets
cannot be decoded without it. These high priority packets are rarely re-sent, and
therefore this flag lets us know to cache them when this is true.
Flagging this as true will cause these packets to be cached, potentially until a
StreamDisconnected signal occurs, and therefore this must only be set for rare
high priority packets (i.e. not for key frames in video).
An individual payload as part of this media stream
Trait Implementations
sourceimpl Clone for MediaNotificationContent
impl Clone for MediaNotificationContent
sourcefn clone(&self) -> MediaNotificationContent
fn clone(&self) -> MediaNotificationContent
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for MediaNotificationContent
impl Debug for MediaNotificationContent
sourceimpl PartialEq<MediaNotificationContent> for MediaNotificationContent
impl PartialEq<MediaNotificationContent> for MediaNotificationContent
sourcefn eq(&self, other: &MediaNotificationContent) -> bool
fn eq(&self, other: &MediaNotificationContent) -> bool
impl Eq for MediaNotificationContent
impl StructuralEq for MediaNotificationContent
impl StructuralPartialEq for MediaNotificationContent
Auto Trait Implementations
impl RefUnwindSafe for MediaNotificationContent
impl Send for MediaNotificationContent
impl Sync for MediaNotificationContent
impl Unpin for MediaNotificationContent
impl UnwindSafe for MediaNotificationContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read moresourceimpl<T> DowncastSync for Twhere
T: Any + Send + Sync,
impl<T> DowncastSync for Twhere
T: Any + Send + Sync,
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.