pub struct Chapter {
pub id: u64,
pub start: Timestamp,
pub end: Timestamp,
pub title: Option<String>,
pub language: Option<String>,
}Expand description
One chapter / cue point inside a container.
Containers that only carry a start time (Vorbis-comment chapters,
DVD IFO PGCs without explicit end times) set end == start. The
id field is whatever the container uses internally — MKV’s
ChapterUID, MP4 chapter track sample index, or a synthesised
counter for formats without a stable ID.
Fields§
§id: u64Container-native chapter identifier. Stable across demuxer re-opens of the same file but not comparable across different containers.
start: TimestampChapter start time. The Timestamp’s time base is whatever
the demuxer reports; consumers should
rescale to a common base before
comparing chapters from different sources.
end: TimestampChapter end time. Equal to start when the container does not
store an explicit end (the next chapter’s start is the
implicit end in that case).
title: Option<String>Display title in the chapter’s primary language, if present.
language: Option<String>BCP-47 / ISO 639 language tag for the title ("en", "jpn",
…) when the container labels it. None means “unspecified” —
not “neutral”.