Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AudioRegisterCodec Class Reference

This class is used by loadable modules and application specific code to register new codec modules. a base class for codec registration. More...

#include <audio.h>

List of all members.

Public Methods

virtual audioencoding_t getEncoding (void) = 0
 Get the encoding format of this codec registry. More...

virtual unsigned getRate (void)
 Get the default sample rate for this codec type. More...

virtual char* getName (void) = 0
 Get a logical name for this codec. More...

virtual AudioCodecgetCodec (unsigned frames) = 0
 Creates a new codec from the registry class. More...

unsigned getFrameSize (void)
 Return minimum codec frame size in samples. More...

unsigned getFrameCount (void)
 Get the default or preferred number of frames for optimal performance. More...


Protected Methods

 AudioRegisterCodec (unsigned min, unsigned def = 1)

Protected Attributes

unsigned minframe
unsigned framecnt

Friends

AudioRegisterCodec* findCodec (audioencoding_t encoding, unsigned rate = 0)
 Locate a codec registry object. More...

AudioRegisterCodec* findCodec (const char *name)
 Locate a codec registry object by name. More...

AudioCodecgetCodec (audioencoding_t encoding, unsigned rate = 0, unsigned frames = 0)
 Create a new codec object from the registry to use for transcoding. More...

AudioCodecgetCodec (const char *name, unsigned frame = 0)
 Create a new codec object from a named registry to use for transcoding. More...


Detailed Description

This class is used by loadable modules and application specific code to register new codec modules. a base class for codec registration.

A derived AudioRegisterXXX class will typically exist as a static member of an AudioCodecXXX class to automatically register the codec at system load time.

Author(s):
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

AudioRegisterCodec::AudioRegisterCodec ( unsigned min,
unsigned def = 1 ) [protected]
 


Member Function Documentation

AudioCodec * AudioRegisterCodec::getCodec ( unsigned frames ) [pure virtual]
 

Creates a new codec from the registry class.

This creates an object of "frame" size, as a multiple of the min. frame size. This is usually just a new xxxCodec(frames * minframe).

Parameters:
number   of "minframe" sample frames in transcoder.

audioencoding_t AudioRegisterCodec::getEncoding ( void ) [pure virtual]
 

Get the encoding format of this codec registry.

Returns:
audio encoding format.

unsigned AudioRegisterCodec::getFrameCount ( void ) [inline]
 

Get the default or preferred number of frames for optimal performance.

Returns:
codec transcoding preferred sample resolution.

unsigned AudioRegisterCodec::getFrameSize ( void ) [inline]
 

Return minimum codec frame size in samples.

Returns:
codec transcoding sample size resolution.

char * AudioRegisterCodec::getName ( void ) [pure virtual]
 

Get a logical name for this codec.

Returns:
null terminated name string.

unsigned AudioRegisterCodec::getRate ( void ) [inline, virtual]
 

Get the default sample rate for this codec type.

Returns:
samples per second.


Friends And Related Function Documentation

AudioRegisterCodec * findCodec ( const char * name ) [friend]
 

Locate a codec registry object by name.

Parameters:
name   of codec registry to locate.

AudioRegisterCodec * findCodec ( audioencoding_t encoding,
unsigned rate = 0 ) [friend]
 

Locate a codec registry object.

Parameters:
encoding   of codec registry to locate.
optional   sample rate of codec registry to locate.

AudioCodec * getCodec ( const char * name,
unsigned frame = 0 ) [friend]
 

Create a new codec object from a named registry to use for transcoding.

Parameters:
name   of codec to create.
frame   count to process or 0 for default frame size.

AudioCodec * getCodec ( audioencoding_t encoding,
unsigned rate = 0,
unsigned frames = 0 ) [friend]
 

Create a new codec object from the registry to use for transcoding.

Parameters:
encoding   of codec to create.
optional   sample rate of codec being created.
sample   frames (multiples of minframe) or 0 for defframe.


Member Data Documentation

unsigned AudioRegisterCodec::framecnt [protected]
 

unsigned AudioRegisterCodec::minframe [protected]
 


The documentation for this class was generated from the following file:
Generated at Thu Jun 28 11:02:40 2001 for ccaudio by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000