Crosstales.NVorbis.Ogg.ContainerReader Class Reference

Provides an IContainerReader implementation for basic Ogg files. More...

Inheritance diagram for Crosstales.NVorbis.Ogg.ContainerReader:
Crosstales.NVorbis.IContainerReader

Public Member Functions

 ContainerReader (string path)
 Creates a new instance with the specified file. More...
 
 ContainerReader (Stream stream, bool closeOnDispose)
 Creates a new instance with the specified stream. Optionally sets to close the stream when disposed. More...
 
bool Init ()
 Initializes the container and finds the first stream. More...
 
void Dispose ()
 Disposes this instance. More...
 
IPacketProvider GetStream (int streamSerial)
 Gets the IPacketProvider instance for the specified stream serial. More...
 
bool FindNextStream ()
 Finds the next new stream in the container. More...
 
int GetTotalPageCount ()
 Retrieves the total number of pages in the container. More...
 

Public Attributes

int[] StreamSerials => _packetReaders.Keys.ToArray()
 Gets the list of stream serials found in the container so far. More...
 

Properties

int PagesRead [get]
 Gets the number of pages that have been read in the container. More...
 
bool CanSeek [get]
 Gets whether the container supports seeking. More...
 
long WasteBits [get]
 Gets the number of bits in the container that are not associated with a logical stream. More...
 
- Properties inherited from Crosstales.NVorbis.IContainerReader
int[] StreamSerials [get]
 Gets the list of stream serials found in the container so far. More...
 
bool CanSeek [get]
 Gets whether the container supports seeking. More...
 
long WasteBits [get]
 Gets the number of bits in the container that are not associated with a logical stream. More...
 
int PagesRead [get]
 Gets the number of pages that have been read in the container. More...
 

Events

EventHandler< NewStreamEventArgsNewStream
 Event raised when a new logical stream is found in the container. More...
 
- Events inherited from Crosstales.NVorbis.IContainerReader
EventHandler< NewStreamEventArgsNewStream
 Event raised when a new logical stream is found in the container. More...
 

Detailed Description

Provides an IContainerReader implementation for basic Ogg files.

Constructor & Destructor Documentation

◆ ContainerReader() [1/2]

Crosstales.NVorbis.Ogg.ContainerReader.ContainerReader ( string  path)

Creates a new instance with the specified file.

Parameters
pathThe full path to the file.

◆ ContainerReader() [2/2]

Crosstales.NVorbis.Ogg.ContainerReader.ContainerReader ( Stream  stream,
bool  closeOnDispose 
)

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

Parameters
streamThe stream to read.
closeOnDisposeTrue to close the stream when Dispose is called, otherwise False.

Member Function Documentation

◆ Dispose()

void Crosstales.NVorbis.Ogg.ContainerReader.Dispose ( )

Disposes this instance.

◆ FindNextStream()

bool Crosstales.NVorbis.Ogg.ContainerReader.FindNextStream ( )

Finds the next new stream in the container.

Returns
True if a new stream was found, otherwise False.
Exceptions
InvalidOperationExceptionCanSeek is False.

Implements Crosstales.NVorbis.IContainerReader.

◆ GetStream()

IPacketProvider Crosstales.NVorbis.Ogg.ContainerReader.GetStream ( int  streamSerial)

Gets the IPacketProvider instance for the specified stream serial.

Parameters
streamSerialThe stream serial to look for.
Returns
An IPacketProvider instance.
Exceptions
ArgumentOutOfRangeExceptionThe specified stream serial was not found.

◆ GetTotalPageCount()

int Crosstales.NVorbis.Ogg.ContainerReader.GetTotalPageCount ( )

Retrieves the total number of pages in the container.

Returns
The total number of pages.
Exceptions
InvalidOperationExceptionCanSeek is False.

Implements Crosstales.NVorbis.IContainerReader.

◆ Init()

bool Crosstales.NVorbis.Ogg.ContainerReader.Init ( )

Initializes the container and finds the first stream.

Returns
True if a valid logical stream is found, otherwise False.

Implements Crosstales.NVorbis.IContainerReader.

Member Data Documentation

◆ StreamSerials

int [] Crosstales.NVorbis.Ogg.ContainerReader.StreamSerials => _packetReaders.Keys.ToArray()

Gets the list of stream serials found in the container so far.

Property Documentation

◆ CanSeek

bool Crosstales.NVorbis.Ogg.ContainerReader.CanSeek
get

Gets whether the container supports seeking.

◆ PagesRead

int Crosstales.NVorbis.Ogg.ContainerReader.PagesRead
get

Gets the number of pages that have been read in the container.

◆ WasteBits

long Crosstales.NVorbis.Ogg.ContainerReader.WasteBits
get

Gets the number of bits in the container that are not associated with a logical stream.

Event Documentation

◆ NewStream

EventHandler<NewStreamEventArgs> Crosstales.NVorbis.Ogg.ContainerReader.NewStream

Event raised when a new logical stream is found in the container.


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/DJPro/DJPro/Assets/Plugins/crosstales/Common/Libraries/NVorbis/Ogg/OggContainerReader.cs