|
Yate
|
Wrapper class for audio and video formats. More...
#include <yateiax.h>
Public Types | |
| enum | Formats { G723_1 = (1 << 0) , GSM = (1 << 1) , ULAW = (1 << 2) , ALAW = (1 << 3) , G726 = (1 << 4) , ADPCM = (1 << 5) , SLIN = (1 << 6) , LPC10 = (1 << 7) , G729 = (1 << 8) , SPEEX = (1 << 9) , ILBC = (1 << 10) , G726AAL2 = (1 << 11) , G722 = (1 << 12) , AMR = (1 << 13) , GSM_HR = (1 << 31) , AudioMask , JPEG = (1 << 16) , PNG = (1 << 17) , ImageMask = JPEG | PNG , H261 = (1 << 18) , H263 = (1 << 19) , H263p = (1 << 20) , H264 = (1 << 21) , VideoMask = H261 | H263 | H263p | H264 } |
| enum | Media { Audio = 0 , Video , Image , TypeCount } |
Public Member Functions | |
| IAXFormat (int type=Audio) | |
| int | type () const |
| u_int32_t | format () const |
| u_int32_t | in () const |
| u_int32_t | out () const |
| const IAXFormatDesc & | formatDesc (bool in) const |
| const char * | formatName () const |
| const char * | typeName () const |
| void | set (u_int32_t *fmt, u_int32_t *fmtIn, u_int32_t *fmtOut) |
Static Public Member Functions | |
| static void | formatList (String &dest, u_int32_t formats, const TokenDict *dict=0, const char *sep=",") |
| static u_int32_t | pickFormat (u_int32_t formats, u_int32_t format=0) |
| static u_int32_t | encode (const String &formats, const TokenDict *dict, char sep=',') |
| static u_int32_t | mask (u_int32_t value, int type) |
| static u_int32_t | clear (u_int32_t value, int type) |
| static const char * | formatName (u_int32_t fmt) |
| static const char * | typeName (int type) |
| static const String & | typeNameStr (int type) |
Static Public Attributes | |
| static const TokenDict | s_formats [] |
| static const TokenDict | s_types [] |
| static const String | s_typesList [TypeCount] |
Protected Attributes | |
| int | m_type |
| IAXFormatDesc | m_format |
| IAXFormatDesc | m_formatIn |
| IAXFormatDesc | m_formatOut |
Wrapper class for audio and video formats.
This class holds the enumeration values for audio and video formats
| enum Formats |
Format enumeration types
|
inline |
|
inlinestatic |
|
inline |
Get the format
Referenced by IAXTransaction::format(), formatName(), and pickFormat().
|
inline |
Get the incoming or outgoing format description
| in | True to retrieve the incoming format, false to retrieve the outgoing one |
References in().
|
static |
Create a string list from formats
| dest | The destination |
| formats | The formats |
| dict | Optional dictionary to use, 0 to use s_formats |
| sep | The separator to use |
|
inline |
Get the text associated with the format
References format(), and formatName().
Referenced by formatName().
|
inlinestatic |
Get the text associated with a format
| fmt | The desired format |
References s_formats.
|
inline |
Get the incoming format
Referenced by formatDesc(), and IAXTransaction::formatIn().
|
inlinestatic |
|
inline |
|
static |
Pick a format from a list of capabilities
| formats | Capabilities list |
| format | Optional format to pick |
References format().
| void set | ( | u_int32_t * | fmt, |
| u_int32_t * | fmtIn, | ||
| u_int32_t * | fmtOut ) |
Set format
| fmt | Optional pointer to format to set |
| fmtIn | Optional pointer to incoming format to set |
| fmtOut | Optional pointer to outgoing format to set |
|
inline |
Get the media type
Referenced by clear(), IAXFormat(), mask(), typeName(), and typeNameStr().
|
inline |
Get the text associated with the media type
References typeName().
Referenced by typeName().
|
inlinestatic |
|
inlinestatic |
Get the text associated with a media type
| type | The media type |
References s_typesList, and type().
|
static |
Keep the texts associated with the formats
Referenced by formatName().
|
static |
Keep the texts associated with type
Referenced by typeName().
|
static |
Keep the texts associated with a type also as String
Referenced by typeNameStr().