Struct OnMetaData

Source
pub struct OnMetaData<'a> {
Show 18 fields pub audiocodecid: Option<OnMetaDataAudioCodecId>, pub audiodatarate: Option<f64>, pub audiodelay: Option<f64>, pub audiosamplerate: Option<f64>, pub audiosamplesize: Option<f64>, pub can_seek_to_end: Option<bool>, pub creationdate: Option<String>, pub duration: Option<f64>, pub filesize: Option<f64>, pub framerate: Option<f64>, pub height: Option<f64>, pub stereo: Option<bool>, pub videocodecid: Option<OnMetaDataVideoCodecId>, pub videodatarate: Option<f64>, pub width: Option<f64>, pub audio_track_id_info_map: Option<Amf0Object<'a>>, pub video_track_id_info_map: Option<Amf0Object<'a>>, pub other: Amf0Object<'a>,
}
Expand description

FLV onMetaData script data

Defined by:

  • Legacy FLV spec, Annex E.5
  • Enhanced RTMP spec, page 13-16, Enhancing onMetaData

Fields§

§audiocodecid: Option<OnMetaDataAudioCodecId>

Audio codec ID used in the file.

§audiodatarate: Option<f64>

Audio bitrate, in kilobits per second.

§audiodelay: Option<f64>

Delay introduced by the audio codec, in seconds.

§audiosamplerate: Option<f64>

Frequency at which the audio stream is replayed.

§audiosamplesize: Option<f64>

Resolution of a single audio sample.

§can_seek_to_end: Option<bool>

Indicating the last video frame is a key frame.

§creationdate: Option<String>

Creation date and time.

§duration: Option<f64>

Total duration of the file, in seconds.

§filesize: Option<f64>

Total size of the file, in bytes.

§framerate: Option<f64>

Number of frames per second.

§height: Option<f64>

Height of the video, in pixels.

§stereo: Option<bool>

Indicates stereo audio.

§videocodecid: Option<OnMetaDataVideoCodecId>

Video codec ID used in the file.

§videodatarate: Option<f64>

Video bitrate, in kilobits per second.

§width: Option<f64>

Width of the video, in pixels.

§audio_track_id_info_map: Option<Amf0Object<'a>>

The audioTrackIdInfoMap and videoTrackIdInfoMap objects are designed to store metadata for audio and video tracks respectively. Each object uses a TrackId as a key to map to properties that detail the unique characteristics of each individual track, diverging from the default configurations.

Key-Value Structure:

  • Keys: Each TrackId acts as a unique identifier for a specific audio or video track.
  • Values: Track Objects containing metadata that specify characteristics which deviate from the default track settings.

Properties of Each Track Object:

  • These properties detail non-standard configurations needed for custom handling of the track, facilitating specific adjustments to enhance track performance and quality for varied conditions.
  • For videoTrackIdInfoMap:
    • Properties such as width, height, videodatarate, etc. specify video characteristics that differ from standard settings.
  • For audioTrackIdInfoMap:
    • Properties such as audiodatarate, channels, etc., define audio characteristics that differ from standard configurations.

Purpose:

  • The purpose of these maps is to specify unique properties for each track, ensuring tailored configurations that optimize performance and quality for specific media content and delivery scenarios.

This structure provides a framework for detailed customization and control over the media tracks, ensuring optimal management and delivery across various types of content and platforms.

§video_track_id_info_map: Option<Amf0Object<'a>>§other: Amf0Object<'a>

Any other metadata contained in the script data.

Trait Implementations§

Source§

impl<'a> Clone for OnMetaData<'a>

Source§

fn clone(&self) -> OnMetaData<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for OnMetaData<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de: 'a, 'a> Deserialize<'de> for OnMetaData<'a>
where 'a: 'de,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'a> PartialEq for OnMetaData<'a>

Source§

fn eq(&self, other: &OnMetaData<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> StructuralPartialEq for OnMetaData<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for OnMetaData<'a>

§

impl<'a> RefUnwindSafe for OnMetaData<'a>

§

impl<'a> Send for OnMetaData<'a>

§

impl<'a> Sync for OnMetaData<'a>

§

impl<'a> Unpin for OnMetaData<'a>

§

impl<'a> UnwindSafe for OnMetaData<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,