C# Class TagLib.Ogg.Codec

This abstract class implements ICodec to provide support for processing packets from an Ogg logical bitstream.
Unsupported Ogg codecs can be added by creating child classes and registering them using AddCodecProvider.
Inheritance: ICodec
显示文件 Open project: secred/Tachycardia Class Usage Examples

Public Methods

Method Description
AddCodecProvider ( CodecProvider provider ) : void

Adds a codec

A CodecProvider delegate is used to add support for new Codec subclasses in .

GetCodec ( ByteVector packet ) : Codec

Determines the correct codec to use for a stream header packet.

This method will first use CodecProvider delegates registered with AddCodecProvider and then attempt to use the built-in codecs.

GetDuration ( long firstGranularPosition, long lastGranularPosition ) : System.TimeSpan

Computes the duration of the stream using the first and last granular positions of the stream.

ReadPacket ( ByteVector packet, int index ) : bool

Reads a Ogg packet that has been encountered in the stream.

Method Details

AddCodecProvider() public static method

Adds a codec
A CodecProvider delegate is used to add support for new Codec subclasses in .
public static AddCodecProvider ( CodecProvider provider ) : void
provider CodecProvider /// A ///
return void

GetCodec() public static method

Determines the correct codec to use for a stream header packet.
This method will first use CodecProvider delegates registered with AddCodecProvider and then attempt to use the built-in codecs.
/// No registered codec capable of processing could be found. ///
public static GetCodec ( ByteVector packet ) : Codec
packet ByteVector /// A object containing the first /// packet of an Ogg logical bitstream. ///
return Codec

GetDuration() public abstract method

Computes the duration of the stream using the first and last granular positions of the stream.
public abstract GetDuration ( long firstGranularPosition, long lastGranularPosition ) : System.TimeSpan
firstGranularPosition long /// A value containing the first granular /// position of the stream. ///
lastGranularPosition long /// A value containing the last granular /// position of the stream. ///
return System.TimeSpan

ReadPacket() public abstract method

Reads a Ogg packet that has been encountered in the stream.
/// is . /// /// is less than zero. /// /// The data does not conform to the specificiation for the /// codec represented by the current instance. ///
public abstract ReadPacket ( ByteVector packet, int index ) : bool
packet ByteVector /// A object containing a packet to /// be read by the current instance. ///
index int /// A value containing the index of the /// packet in the stream. ///
return bool