Skip to main content

Detail

Enum Detail 

Source
#[non_exhaustive]
pub enum Detail {
#[non_exhaustive]
Ts { stride: u16, phase: u16, },
#[non_exhaustive]
Isobmff { major_brand: Option<[u8; 4]>, boxes_walked: u8, layout: IsobmffLayout, },
#[non_exhaustive]
Ebml { doc_type: DocType, },
#[non_exhaustive]
Flv { has_audio: bool, has_video: bool, data_offset: u32, },
#[non_exhaustive]
Mxf { partition_kind: PartitionKind, },
#[non_exhaustive]
MpegPs { structurally_valid: bool, }, None, }
Expand description

What a prober learned on the way to its conclusion — the difference between “it is TS” and “it is TS, 192-byte stride, first sync at offset 4”.

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.
§

#[non_exhaustive]
Ts

MPEG-2 TS lattice: packet stride (188/192/204/208) and the byte offset of the first sync (phase), so a demuxer need not re-derive them.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§stride: u16

Byte distance between consecutive sync bytes (a packet length).

§phase: u16

Byte offset of the first sync byte in the probed region.

§

#[non_exhaustive]
Isobmff

ISOBMFF: the ftyp major brand (if seen) and how many top-level boxes chained cleanly.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§major_brand: Option<[u8; 4]>

The 4-character code from the ftyp major brand, if one was read.

§boxes_walked: u8

Number of top-level boxes that chained cleanly into the buffer.

§layout: IsobmffLayout

Which structural layout the top-level walk observed — the discriminator between a fragmented and a progressive file.

§

#[non_exhaustive]
Ebml

Matroska/WebM: the EBML header’s DocType string.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§doc_type: DocType

The EBML DocType.

§

#[non_exhaustive]
Flv

FLV: the header’s TypeFlags (which tag types are present) and the DataOffset header size.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§has_audio: bool

TypeFlags bit 0 — audio tags present.

§has_video: bool

TypeFlags bit 2 — video tags present.

§data_offset: u32

The DataOffset field (bytes 5..9), the header size.

§

#[non_exhaustive]
Mxf

MXF: the decoded Partition Pack kind (byte 14 of the UL).

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§partition_kind: PartitionKind

Which Partition Pack this is — see PartitionKind.

§

#[non_exhaustive]
MpegPs

MPEG-PS: whether the pack header’s SCR/mux-rate marker bits validated.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§structurally_valid: bool

true when the SCR '01' prefix, the four SCR marker bits and the two program_mux_rate marker bits all validated (STRUCTURAL); false when only the pack start code matched (HEURISTIC).

§

None

No format-specific detail to report.

Implementations§

Source§

impl Detail

Source

pub fn name(&self) -> &'static str

The human-readable name of the detail variant.

Source

pub fn major_brand_str(&self) -> Option<&str>

The ftyp/styp major brand as a string, when the identifying file carried one (an ISOBMFF result). The brand is a registered 4-character code, so this is the ergonomic view of the raw [u8; 4] in Detail::Isobmff.

Returns None when the detail is not Isobmff, when no brand was observed, or when the 4 bytes are not valid UTF-8.

Trait Implementations§

Source§

impl Clone for Detail

Source§

fn clone(&self) -> Detail

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 Copy for Detail

Source§

impl Debug for Detail

Source§

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

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

impl Display for Detail

A lossless Display for Detail: every data-bearing variant renders its fields, so Detail::Ts { stride, phase } is not collapsed to just "Ts". Display delegates to Detail::name (the #204 convention) for the label, then appends the field data the variant actually carries.

Source§

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

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

impl Eq for Detail

Source§

impl PartialEq for Detail

Source§

fn eq(&self, other: &Detail) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Detail

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

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.