Struct ogg::PacketReader [] [src]

pub struct PacketReader<'a, T: Read + Seek + 'a> {
    // some fields omitted
}

Reader for packets from an Ogg stream.

This reads codec packets belonging to several different logical streams from one physical Ogg container stream.

Methods

impl<'a, T: Read + Seek + 'a> PacketReader<'a, T>
[src]

fn new(rdr: &mut T) -> PacketReader<T>

Constructs a new PacketReader with a given Read.

fn read_packet(self: &mut PacketReader<'a, T>) -> Result<PacketOggReadError>

Reads a packet, and returns it on success.

fn seek_bytes(&mut self, pos: SeekFrom) -> Result<u64Error>

Seeks the underlying reader

Seeks the reader that this PacketReader bases on by the specified number of bytes. All new pages will be read from the new position.

This also flushes all the unread packets in the queue.