Struct ogg::Packet [] [src]

pub struct Packet {
    pub data: Vec<u8>,
    pub first_packet: bool,
    pub last_packet: bool,
    pub absgp_page: u64,
    pub stream_serial: u32,
}

Ogg packet representation.

For the Ogg format, packets are the logically smallest subdivision it handles.

Every packet belongs to a logical bitstream. The logical bitstreams then form a physical bitstream, with the data combined in multiple different ways.

Every logical bitstream is identified by the serial number its pages have stored. The Packet struct contains a field for that number as well, so that one can find out which logical bitstream the Packet belongs to.

Fields

The data the Packet contains

true iff this packet is the first one in the logical bitstream.

true iff this packet is the last one in the logical bitstream

Absolute granule position of the last page the packet was in. The meaning of the absolute granule position is defined by the codec.

Serial number. Uniquely identifying the logical bitstream.