pub struct TrackInfo { /* private fields */ }Expand description
One track of a container: its codec, clock, configuration and what the
container declares about it. Built with TrackInfo::video,
TrackInfo::audio or TrackInfo::other.
Delays and edit offsets are carried untouched, so a stream copy preserves them. They are applied exactly once, by the decoder adapter configured from this track; the session never trims.
Implementations§
Source§impl TrackInfo
impl TrackInfo
Sourcepub fn video(
index: u32,
codec: CodecId,
time_base: TimeBase,
video: VideoTrackInfo,
) -> TrackInfoBuilder
pub fn video( index: u32, codec: CodecId, time_base: TimeBase, video: VideoTrackInfo, ) -> TrackInfoBuilder
A video track.
Sourcepub fn audio(
index: u32,
codec: CodecId,
time_base: TimeBase,
audio: AudioTrackInfo,
) -> TrackInfoBuilder
pub fn audio( index: u32, codec: CodecId, time_base: TimeBase, audio: AudioTrackInfo, ) -> TrackInfoBuilder
An audio track.
Sourcepub fn other(
index: u32,
kind: TrackKind,
codec: CodecId,
time_base: TimeBase,
) -> TrackInfoBuilder
pub fn other( index: u32, kind: TrackKind, codec: CodecId, time_base: TimeBase, ) -> TrackInfoBuilder
A subtitle or data track.
Sourcepub fn codec_private(&self) -> Option<&Arc<[u8]>>
pub fn codec_private(&self) -> Option<&Arc<[u8]>>
Codec configuration bytes from the container (av1C, avcC,
OpusHead), as stored.
Sourcepub fn config_epoch(&self) -> u32
pub fn config_epoch(&self) -> u32
The configuration epoch the current codec_private belongs to.
Sourcepub fn video_info(&self) -> Option<&VideoTrackInfo>
pub fn video_info(&self) -> Option<&VideoTrackInfo>
Video declarations, for a video track.
Sourcepub fn audio_info(&self) -> Option<&AudioTrackInfo>
pub fn audio_info(&self) -> Option<&AudioTrackInfo>
Audio declarations, for an audio track.
Sourcepub fn codec_delay(&self) -> Option<FrameDuration>
pub fn codec_delay(&self) -> Option<FrameDuration>
Decoder delay the container records (Opus pre-skip, AAC priming).
Sourcepub fn seek_preroll(&self) -> Option<FrameDuration>
pub fn seek_preroll(&self) -> Option<FrameDuration>
How much must be decoded before a seek target to output it correctly (Opus in WebM: 80 ms).
Sourcepub fn edit_delay_ticks(&self) -> Option<i64>
pub fn edit_delay_ticks(&self) -> Option<i64>
The edit-list offset of the first presentation, in track ticks.
Sourcepub fn declared_packets(&self) -> Option<u64>
pub fn declared_packets(&self) -> Option<u64>
How many packets the container says the track has.
Sourcepub fn declared_duration_ticks(&self) -> Option<u64>
pub fn declared_duration_ticks(&self) -> Option<u64>
The track length the container declares, in track ticks.