| Yate
    | 
An unidirectional data translator (codec) More...
#include <yatephone.h>
 
  
 | Public Member Functions | |
| DataTranslator (const char *sFormat, const char *dFormat) | |
| DataTranslator (const char *sFormat, DataSource *source=0) | |
| ~DataTranslator () | |
| virtual void * | getObject (const String &name) const | 
| virtual bool | valid () const | 
| virtual DataSource * | getTransSource () const | 
| DataTranslator * | getFirstTranslator () | 
| const DataTranslator * | getFirstTranslator () const | 
|  Public Member Functions inherited from DataConsumer | |
| DataConsumer (const char *format="slin") | |
| virtual void | destroyed () | 
| virtual unsigned long | Consume (const DataBlock &data, unsigned long tStamp, unsigned long flags)=0 | 
| DataSource * | getConnSource () const | 
| DataSource * | getOverSource () const | 
|  Public Member Functions inherited from DataNode | |
| DataNode (const char *format=0) | |
| virtual int | costFormat (const DataFormat &format) | 
| virtual bool | setFormat (const DataFormat &format) | 
| const DataFormat & | getFormat () const | 
| unsigned long | timeStamp () const | 
| virtual bool | control (NamedList ¶ms) | 
| virtual void | attached (bool added) | 
|  Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () | 
| virtual bool | alive () const | 
| bool | ref () | 
| bool | deref () | 
| int | refcount () const | 
| virtual void | destruct () | 
|  Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () | 
| virtual const String & | toString () const | 
| NamedCounter * | getObjCounter () const | 
| NamedCounter * | setObjCounter (NamedCounter *counter) | 
| Static Public Member Functions | |
| static ObjList * | srcFormats (const DataFormat &dFormat="slin", int maxCost=-1, unsigned int maxLen=0, ObjList *lst=0) | 
| static ObjList * | destFormats (const DataFormat &sFormat="slin", int maxCost=-1, unsigned int maxLen=0, ObjList *lst=0) | 
| static ObjList * | allFormats (const ObjList *formats, bool existing=true, bool sameRate=true, bool sameChans=true) | 
| static ObjList * | allFormats (const String &formats, bool existing=true, bool sameRate=true, bool sameChans=true) | 
| static bool | canConvert (const DataFormat &fmt1, const DataFormat &fmt2="slin") | 
| static int | cost (const DataFormat &sFormat, const DataFormat &dFormat) | 
| static DataTranslator * | create (const DataFormat &sFormat, const DataFormat &dFormat) | 
| static bool | attachChain (DataSource *source, DataConsumer *consumer, bool override=false) | 
| static bool | detachChain (DataSource *source, DataConsumer *consumer) | 
| static void | setMaxChain (unsigned int maxChain) | 
|  Static Public Member Functions inherited from DataNode | |
| static unsigned long | invalidStamp () | 
|  Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) | 
| static bool | efficientIncDec () | 
|  Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) | 
| static bool | getObjCounting () | 
| static void | setObjCounting (bool enable) | 
| static NamedCounter * | getObjCounter (const String &name, bool create=true) | 
| static ObjList & | getObjCounters () | 
| Protected Member Functions | |
| ObjList * | getConsumers () const | 
| virtual bool | synchronize (DataSource *source) | 
|  Protected Member Functions inherited from RefObject | |
| virtual void | zeroRefs () | 
| bool | resurrect () | 
| Static Protected Member Functions | |
| static void | install (TranslatorFactory *factory) | 
| static void | uninstall (TranslatorFactory *factory) | 
| Friends | |
| class | TranslatorFactory | 
| Additional Inherited Members | |
|  Public Types inherited from DataNode | |
| enum | DataFlags { DataStart = 0x0001, DataEnd = 0x0002, DataMark = 0x0004, DataSilent = 0x0008, DataMissed = 0x0010, DataError = 0x0020, DataPrivate = 0x0100 } | 
|  Protected Attributes inherited from DataNode | |
| DataFormat | m_format | 
| unsigned long | m_timestamp | 
An unidirectional data translator (codec)
The DataTranslator holds a translator (codec) capable of unidirectional conversion of data from one type to another.
| DataTranslator | ( | const char * | sFormat, | 
| const char * | dFormat | ||
| ) | 
Construct a data translator.
| sFormat | Name of the source format (data received from the consumer) | 
| dFormat | Name of the destination format (data supplied to the source) | 
| 
 | explicit | 
Creates a data translator from an existing source, does not increment the source's reference counter.
| sFormat | Name of the source format (data received from the consumer) | 
| source | Optional pointer to a DataSource object | 
| ~DataTranslator | ( | ) | 
Destroys the translator and its source
| 
 | static | 
Get a list of formats supported by transcoding for a given format list
| formats | List of data format names | 
| existing | Also return formats already existing in the initial list | 
| sameRate | Only return formats with same sampling rate | 
| sameChans | Only return formats with same number of channels | 
| 
 | static | 
Get a list of formats supported by transcoding for a given format list
| formats | Data format names as comma separated list | 
| existing | Also return formats already existing in the initial list | 
| sameRate | Only return formats with same sampling rate | 
| sameChans | Only return formats with same number of channels | 
| 
 | static | 
Attach a consumer to a source, possibly trough a chain of translators
| source | Source to attach the chain to | 
| consumer | Consumer where the chain ends | 
| override | Attach chain for temporary source override | 
| 
 | static | 
Check if bidirectional conversion can be performed by installed translators
| fmt1 | Name of the first data format | 
| fmt2 | Name of the second data format | 
| 
 | static | 
Finds the cost of a translator given the source and destination format names
| sFormat | Name of the source format (data received from the consumer) | 
| dFormat | Name of the destination format (data supplied to the source) | 
| 
 | static | 
Creates a translator given the source and destination format names
| sFormat | Name of the source format (data received from the consumer) | 
| dFormat | Name of the destination format (data supplied to the source) | 
| 
 | static | 
Get a list of formats supported for a given input format
| sFormat | Name of source format | 
| maxCost | Maximum cost of candidates to consider, -1 to accept all | 
| maxLen | Maximum length of codec chains to consider, 0 to accept all | 
| lst | Initial list, will append to it if not empty | 
| 
 | static | 
Detach a consumer from a source, possibly trough a chain of translators
| source | Source to dettach the chain from | 
| consumer | Consumer where the chain ends | 
| 
 | inlineprotected | 
Get access to the list of consumers of the data source
References ObjList::skipNull().
| DataTranslator* getFirstTranslator | ( | ) | 
Get the first translator from a chain
| const DataTranslator* getFirstTranslator | ( | ) | const | 
Constant version to get the first translator from a chain
| 
 | virtual | 
Get a pointer to a derived class given that class name
| name | Name of the class we are asking for | 
Reimplemented from DataConsumer.
| 
 | inlinevirtual | 
Get the data source of a translator object
Reimplemented from DataConsumer.
| 
 | staticprotected | 
Install a Translator Factory in the list of known codecs
| factory | A pointer to a TranslatorFactory instance | 
Referenced by TranslatorFactory::TranslatorFactory().
| 
 | static | 
Set the length of the longest translator chain we are allowed to create
| maxChain | Desired longest chain length | 
| 
 | static | 
Get a list of formats supported for a given output format.
| dFormat | Name of destination format | 
| maxCost | Maximum cost of candidates to consider, -1 to accept all | 
| maxLen | Maximum length of codec chains to consider, 0 to accept all | 
| lst | Initial list, will append to it if not empty | 
| 
 | protectedvirtual | 
Synchronize the consumer with a source
| source | Data source to copy the timestamp from | 
Reimplemented from DataConsumer.
| 
 | staticprotected | 
Remove a Translator Factory from the list of known codecs
| factory | A pointer to a TranslatorFactory instance | 
| 
 | inlinevirtual | 
Check if the data translator has a valid source
Reimplemented from DataNode.
References DataSource::valid().
 1.8.8
 1.8.8