Skip to main content

Output

Enum Output 

Source
#[non_exhaustive]
pub enum Output {
Show 14 variants Manifest(ManifestSelection), PeriodChanged { index: usize, id: Option<String>, start_us: i128, continuous: bool, }, Init(Vec<u8>), Tracks(Vec<TrackSpec>), Samples { track_id: TrackId, samples: Vec<Sample>, }, Discontinuity, TrackDropped { period: usize, set: usize, rep: Option<usize>, cause: DropCause, }, TrackSkipped { track_id: Option<TrackId>, fourcc: String, reason: String, }, FragmentDamaged { id: ResourceId, skipped: usize, }, Notice(Notice), ClockSynced { source: ClockSource, uncertainty_us: u64, }, SegmentLost { id: ResourceId, status: Option<u16>, }, Fatal(FatalKind), EndOfStream,
}
Expand description

One unit of output.

Per Period the order is: Notice/TrackDropped for what was left out, Manifest, PeriodChanged, then (when the Period does not continue the previous one) Discontinuity, Init per changed init, Tracks when the track set changed, and the Samples. Samples of one track are in decode order with no gap and no repeat; their timestamps are the container’s (tfdt) timeline, not a Period-rebased one.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Manifest(ManifestSelection)

The selection made for a Period.

§

PeriodChanged

A Period starts playing.

Fields

§index: usize

Period index in the MPD.

§id: Option<String>

Period@id.

§start_us: i128

PeriodStart, microseconds from the presentation start.

§continuous: bool

true only for a boundary signalled period-continuous (urn:mpeg:dash:period-continuity:2015, 23009-1 5.3.2.4) whose init is unchanged: nothing is re-announced and no Discontinuity is emitted. Always false for the first Period.

§

Init(Vec<u8>)

The Initialization Segment bytes (ftyp + moov) a decoder takes before the samples that follow.

§

Tracks(Vec<TrackSpec>)

The full track set; session track ids are 1-based in selection order (video, then audio) and survive a Representation switch.

§

Samples

Access units of one track, in decode order.

Fields

§track_id: TrackId

Session track id.

§samples: Vec<Sample>

The samples.

§

Discontinuity

The timeline may jump: a Period that does not continue the previous one, a skipped segment, or a Representation switch that cannot be aligned.

§

TrackDropped

A set or Representation is not played.

Fields

§period: usize

Period index.

§set: usize

AdaptationSet index.

§rep: Option<usize>

Representation index when only it was dropped.

§cause: DropCause

Why.

§

TrackSkipped

A track of an init that the demuxer could not model (an encrypted or unknown sample entry); once per track and init.

Fields

§track_id: Option<TrackId>

Session track id, when it maps to one.

§fourcc: String

The sample-entry four-character code.

§reason: String

The demuxer’s reason.

§

FragmentDamaged

The demuxer skipped fragments of a segment; the others were emitted.

Fields

§id: ResourceId

The segment.

§skipped: usize

How many fragments were skipped.

§

Notice(Notice)

A non-fatal observation.

§

ClockSynced

The UTC clock has its first anchor, or its source changed (23009-1 5.8.5.7; DESIGN 3.4). Not emitted for every refinement.

Fields

§source: ClockSource

Where the anchor came from.

§uncertainty_us: u64

Half-width of its error bar, microseconds.

§

SegmentLost

A segment of a live presentation was given up on after the configured number of failures; a Discontinuity marks the gap. (A static presentation ends with a fatal error instead.)

Fields

§id: ResourceId

The segment.

§status: Option<u16>

Status of the last failure, when it was an HTTP status.

§

Fatal(FatalKind)

The presentation cannot continue; nothing follows.

§

EndOfStream

Every selected segment was delivered.

Trait Implementations§

Source§

impl Clone for Output

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Output

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> DescriptorObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ExtensionObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
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> TableObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.