C# Class NVorbis.Ogg.ContainerReader

Provides an IContainerReader implementation for basic Ogg files.
Inheritance: IContainerReader
Show file Open project: gregzo/G-Audio Class Usage Examples

Public Methods

Method Description
ContainerReader ( Stream stream, bool closeOnDispose ) : System

Creates a new instance with the specified stream. Optionally sets to close the stream when disposed.

ContainerReader ( string path ) : System

Creates a new instance with the specified file.

Dispose ( ) : void

Disposes this instance.

FindNextStream ( ) : bool

Finds the next new stream in the container.

GetStream ( int streamSerial ) : IPacketProvider

Gets the IPacketProvider instance for the specified stream serial.

GetTotalPageCount ( ) : int

Retrieves the total number of pages in the container.

Init ( ) : bool

Initializes the container and finds the first stream.

Private Methods

Method Description
AddPage ( PageHeader hdr ) : bool
DisposePacketReader ( PacketReader packetReader ) : void
FindNextPageHeader ( ) : PageHeader
GatherNextPage ( ) : int
GatherNextPage ( int streamSerial ) : void
PacketDiscardThrough ( long offset ) : void
PacketReadByte ( long offset ) : int
ReadPageHeader ( long position ) : PageHeader

Method Details

ContainerReader() public method

Creates a new instance with the specified stream. Optionally sets to close the stream when disposed.
public ContainerReader ( Stream stream, bool closeOnDispose ) : System
stream Stream The stream to read.
closeOnDispose bool True to close the stream when is called, otherwise False.
return System

ContainerReader() public method

Creates a new instance with the specified file.
public ContainerReader ( string path ) : System
path string The full path to the file.
return System

Dispose() public method

Disposes this instance.
public Dispose ( ) : void
return void

FindNextStream() public method

Finds the next new stream in the container.
is False.
public FindNextStream ( ) : bool
return bool

GetStream() public method

Gets the IPacketProvider instance for the specified stream serial.
The specified stream serial was not found.
public GetStream ( int streamSerial ) : IPacketProvider
streamSerial int The stream serial to look for.
return IPacketProvider

GetTotalPageCount() public method

Retrieves the total number of pages in the container.
is False.
public GetTotalPageCount ( ) : int
return int

Init() public method

Initializes the container and finds the first stream.
public Init ( ) : bool
return bool