pub struct Packet {
pub data: Bytes,
pub granule_position: i64,
pub serial: u32,
pub bos: bool,
pub eos: bool,
pub page_index: u32,
pub page_count: u32,
}Expand description
A fully reassembled Ogg packet (continuation pages already merged).
granule_position/bos/eos are page-level fields (RFC 3533) attached
here to the page that completed the packet — spec-precise for the last
packet completed on a page. page_index/page_count record where the
packet sits among the packets completed on that finishing page, so a
codec-aware layer can back-compute each packet’s own end position from the
page granule (the facade does this for Opus via TOC frame durations).
Fields§
§data: BytesPacket payload (continuation pages merged).
granule_position: i64The finishing page’s granule position (codec-defined units; e.g. sample count).
serial: u32Logical bitstream serial number.
bos: boolSet if the containing page was the first page of the logical stream.
eos: boolSet if the containing page was the last page of the logical stream.
page_index: u32Index of this packet among the packets completed on its finishing page.
page_count: u32Total packets completed on its finishing page.