Object

Struct Object 

Source
pub struct Object {
    pub encoded_bitrate: Option<i64>,
    pub object_duration: Option<Duration>,
    pub object_type: Option<ObjectType>,
    pub top_bitrate: Option<i64>,
}
Expand description

An CMCD-Object Header contains keys whose values vary with the object being requested.

Fields§

§encoded_bitrate: Option<i64>

Key: br

Header: CMCD-Object

Type & Unit: Integer kbps

The encoded bitrate of the audio or video object being requested. This may not be known precisely by the player; however, it MAY be estimated based upon playlist/manifest declarations. If the playlist declares both peak and average bitrate values, the peak value should be transmitted.

§object_duration: Option<Duration>

Key: d

Header: CMCD-Object

Type & Unit: Integer milliseconds

The playback duration in milliseconds of the object being requested. If a partial segment is being requested, then this value MUST indicate the playback duration of that part and not that of its parent segment. This value can be an approximation of the estimated duration if the explicit value is not known.

§object_type: Option<ObjectType>

Key: ot

Header: CMCD-Object

Type & Unit: Token

The media type of the current object being requested:

m = text file, such as a manifest or playlist

a = audio only

v = video only

av = muxed audio and video

i = init segment

c = caption or subtitle

tt = ISOBMFF timed text track

k = cryptographic key, license or certificate.

o = other

If the object type being requested is unknown, then this key MUST NOT be used.

ObjectType

§top_bitrate: Option<i64>

Key: tb

Header: CMCD-Object

Type & Unit: Integer Kbps

The highest bitrate rendition in the manifest or playlist that the client is allowed to play, given current codec, licensing and sizing constraints.

Trait Implementations§

Source§

impl Debug for Object

Source§

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

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

impl Default for Object

Source§

fn default() -> Object

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Object

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 Encoder for Object

Source§

fn header_key() -> String

The Header Key returned by this trait.
Source§

fn to_arguments(&self) -> Vec<String>

Parses the data fields into stringified key value pair.
Source§

fn to_query_string(&self) -> String

Converts the data fields to an URL encoded string.
Source§

fn to_header(&self, custom: Option<&Vec<String>>) -> (String, String)

Encodes the data fields to the header key and value. Read more
Source§

impl PartialEq for Object

Source§

fn eq(&self, other: &Object) -> 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 Serialize for Object

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Object

Auto Trait Implementations§

§

impl Freeze for Object

§

impl RefUnwindSafe for Object

§

impl Send for Object

§

impl Sync for Object

§

impl Unpin for Object

§

impl UnwindSafe for Object

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> 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> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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>,