Skip to content

Latest commit

 

History

History
78 lines (44 loc) · 1.87 KB

OggCodecFactory.md

File metadata and controls

78 lines (44 loc) · 1.87 KB

node-taglib-sharp / Exports / OggCodecFactory

Class: 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.

Table of contents

Constructors

Methods

Constructors

constructor

new OggCodecFactory()

Methods

addCodecProvider

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.

Parameters

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

Returns

void


clearCustomProviders

Static clearCustomProviders(): void

Clears the custom providers from the factory.

Returns

void


getCodec

Static getCodec(packet): IOggCodec

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

Parameters

Name Type Description
packet ByteVector First packet of an Ogg logical bitstream.

Returns

IOggCodec