#include <audio2.h>
Inheritance diagram for ost::AudioCodec:
Public Member Functions | |
AudioCodec (const char *name, Encoding encoding) | |
Base for codecs, create a named coded of a specific encoding. | |
virtual | ~AudioCodec () |
virtual Level | getImpulse (void *buffer, unsigned number=0) |
Get the impulse energy level of a frame of X samples in the specified codec format. | |
virtual Level | getPeak (void *buffer, unsigned number=0) |
Get the peak energy level within the frame of X samples. | |
virtual bool | isSilent (Level threashold, void *buffer, unsigned number=0) |
Signal if the current audio frame is silent. | |
virtual unsigned | encode (Linear buffer, void *dest, unsigned number=0)=0 |
Encode a linear sample frame into the codec sample buffer. | |
virtual unsigned | encodeBuffered (Linear Buffer, Encoded dest, unsigned number) |
Encode linear samples buffered into the coded. | |
virtual unsigned | decode (Linear buffer, void *source, unsigned number=0)=0 |
Decode the sample frame into linear samples. | |
virtual unsigned | decodeBuffered (Linear buffer, Encoded source, unsigned len) |
Buffer and decode data into linear samples. | |
virtual unsigned | getEstimated (void) |
Get estimated data required for buffered operations. | |
virtual unsigned | getRequired (void) |
get required samples for encoding. | |
virtual unsigned | getPacket (Encoded destination, Encoded data, unsigned size) |
Get a packet of data rather than decode. | |
Info | getInfo (void) |
Get an info description for this codec. | |
Static Public Member Functions | |
static void | endCodec (AudioCodec *codec) |
End use of a requested codec. | |
static AudioCodec * | getCodec (Encoding encoding, const char *format=NULL, bool loaded=false) |
Get the codec base class for accessing a specific derived codec identified by encoding type and optional spd info. | |
static AudioCodec * | getCodec (Info &info, bool loaded=false) |
Get the codec base class for accessing a specific derived codec identified by audio source descriptor. | |
static bool | load (const char *name) |
Load a named codec set into process memory. | |
static bool | load (Encoding encoding) |
Find and load a codec file by it's encoding type. | |
Protected Member Functions | |
AudioCodec () | |
virtual AudioCodec * | getByFormat (const char *format) |
often used to create a "new" codec of a subtype based on encoding format, default returns the current codec entity. | |
virtual AudioCodec * | getByInfo (Info &info) |
get a codec by audio source info descriptor. | |
Protected Attributes | |
AudioCodec * | next |
Encoding | encoding |
const char * | name |
Info | info |
Static Protected Attributes | |
static AudioCodec * | first |
This class is only abstract and describes the core interface for loadable codec modules. This class is normally merged with AudioSample. A derived AudioCodecXXX will typically include a AudioRegisterXXX static class to automatically initialize and register the codec with the codec registry.
|
|
|
Base for codecs, create a named coded of a specific encoding.
|
|
|
|
Decode the sample frame into linear samples.
|
|
Buffer and decode data into linear samples. This is needed for audio formats that have irregular packet sizes.
|
|
Encode a linear sample frame into the codec sample buffer.
|
|
Encode linear samples buffered into the coded.
|
|
End use of a requested codec. If constructed then will be deleted.
|
|
often used to create a "new" codec of a subtype based on encoding format, default returns the current codec entity.
|
|
get a codec by audio source info descriptor.
|
|
Get the codec base class for accessing a specific derived codec identified by audio source descriptor.
|
|
Get the codec base class for accessing a specific derived codec identified by encoding type and optional spd info.
|
|
Get estimated data required for buffered operations.
|
|
Get the impulse energy level of a frame of X samples in the specified codec format.
|
|
Get an info description for this codec.
|
|
Get a packet of data rather than decode. This is tied with getEstimated.
|
|
Get the peak energy level within the frame of X samples.
|
|
get required samples for encoding.
|
|
Signal if the current audio frame is silent. This can be deterimed either by an impulse computation, or, in some cases, some codecs may signal and flag silent packets.
|
|
Find and load a codec file by it's encoding type. Converts the type into a codec name and invokes the other loader...
|
|
Load a named codec set into process memory.
|
|
|
|
|
|
|
|
|
|
|