node-taglib-sharp / Exports / OggCodecFactory
Factory for creating codecs from the first packet of the Ogg bitstream.
Remarks
By default, only codecs provided by the library will be matched. However, custom codec support can be added by using addCodecProvider.
• new OggCodecFactory()
▸ Static
addCodecProvider(provider
): void
Adds a custom codec provider to try before using standard codec creation methods. Codec providers are used before standard methods so custom checking can be used and new formats can be added. They are executed in reverse order in which they are added.
Name | Type | Description |
---|---|---|
provider |
OggCodecProvider |
Codec provider function * firstPacket: ByteVector First packet of the bitstream * returns IOggCodec if method was able to match the packet, falsy otherwise |
void
▸ Static
clearCustomProviders(): void
Clears the custom providers from the factory.
void
▸ Static
getCodec(packet
): IOggCodec
Determines the correc codec to use for a stream header packet.
Name | Type | Description |
---|---|---|
packet |
ByteVector |
First packet of an Ogg logical bitstream. |