pub enum TrackKind {
Video,
Audio,
Subtitle,
Data,
Attachment,
Unknown,
}Expand description
What a track carries.
A closed roster: these six are every kind a container can present,
and Unknown is the honest answer for a track the
backend cannot classify rather than an escape hatch for new kinds.
Minted here rather than borrowed: mediaframe has a track
disposition vocabulary but no kind vocabulary, and the dependency
direction forbids reaching the other way.
Cover art is Attachment, not
Video. A still image stored in a container’s
video-shaped slot is an attachment by every property that matters —
one sample, no timeline, no motion — so the Video arm carries true
motion video and nothing else. See DemuxedPacket for the
delivery contract that follows from this.
Variants§
Video
Motion video.
Audio
Audio.
Subtitle
Subtitles / captions, text or bitmap.
Data
Timed opaque data — timecode, KLV, timed ID3.
Attachment
A file carried inside the container: a font, cover art.
Unknown
The backend could not classify this track.
Implementations§
Source§impl TrackKind
impl TrackKind
Sourcepub const fn is_video(&self) -> bool
pub const fn is_video(&self) -> bool
Returns true if this value is of type Video. Returns false otherwise
Sourcepub const fn is_audio(&self) -> bool
pub const fn is_audio(&self) -> bool
Returns true if this value is of type Audio. Returns false otherwise
Sourcepub const fn is_subtitle(&self) -> bool
pub const fn is_subtitle(&self) -> bool
Returns true if this value is of type Subtitle. Returns false otherwise
Sourcepub const fn is_data(&self) -> bool
pub const fn is_data(&self) -> bool
Returns true if this value is of type Data. Returns false otherwise
Sourcepub const fn is_attachment(&self) -> bool
pub const fn is_attachment(&self) -> bool
Returns true if this value is of type Attachment. Returns false otherwise
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if this value is of type Unknown. Returns false otherwise