pub struct ContainerDuration { /* private fields */ }Expand description
A container-level duration with the library’s account of it.
What Demuxer::duration answers: value is the
figure, as a Timestamp the way TrackInfo::duration carries
one, and source is how the library says it came by
it. Read the two together — the same number means one thing read off
timestamps and another divided out of a bitrate.
The figure is a length: how long the library says the file runs.
It is not an endpoint on any track’s timeline, and it is not
interchangeable with a MeasuredEnd.
It is the container’s figure and no track’s: a track’s own comes
through TrackInfo::duration, or is absent.
Implementations§
Source§impl ContainerDuration
impl ContainerDuration
Sourcepub const fn new(value: Timestamp, source: DurationSource) -> Self
pub const fn new(value: Timestamp, source: DurationSource) -> Self
Constructs a ContainerDuration from a figure and the library’s
account of it.
Sourcepub const fn value(&self) -> Timestamp
pub const fn value(&self) -> Timestamp
Returns the figure.
How far to trust it is source’s to say, in the
library’s own words.
Sourcepub const fn source(&self) -> DurationSource
pub const fn source(&self) -> DurationSource
Returns the library’s account of how it came by the figure.