pub struct Packet {
pub data: Vec<u8>,
/* private fields */
}
Expand description
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§
§data: Vec<u8>
The data the Packet
contains
Implementations§
source§impl Packet
impl Packet
sourcepub fn first_in_page(&self) -> bool
pub fn first_in_page(&self) -> bool
Returns whether the packet is the first one starting in the page
sourcepub fn first_in_stream(&self) -> bool
pub fn first_in_stream(&self) -> bool
Returns whether the packet is the first one of the entire stream
sourcepub fn last_in_page(&self) -> bool
pub fn last_in_page(&self) -> bool
Returns whether the packet is the last one starting in the page
sourcepub fn last_in_stream(&self) -> bool
pub fn last_in_stream(&self) -> bool
Returns whether the packet is the last one of the entire stream
sourcepub fn absgp_page(&self) -> u64
pub fn absgp_page(&self) -> u64
Returns the absolute granule position of the page the packet ended in.
The meaning of the absolute granule position is defined by the codec.
sourcepub fn stream_serial(&self) -> u32
pub fn stream_serial(&self) -> u32
Returns the serial number that uniquely identifies the logical bitstream.