|
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
| enum Media |
Media type enumeration
|
inline |
Constructor. Build an audio format
| type | Media type |
|
inlinestatic |
Clear formats by type
| value | Input format(s) |
| type | Media type to clear |
Encode a formats list
| formats | Formats list |
| dict | Dictionary to use |
| sep | Formats list separator |
|
inline |
|
inline |
Get the incoming or outgoing format description
| in | True to retrieve the incoming format, false to retrieve the outgoing one |
|
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
|
inlinestatic |
Get the text associated with a format
| fmt | The desired format |
|
inline |
|
inlinestatic |
Mask formats by type
| value | Input format(s) |
| type | Media type to retrieve |
|
inline |
|
static |
Pick a format from a list of capabilities
| formats | Capabilities list |
| format | Optional format to pick |
| 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
|
inline |
Get the text associated with the media type
|
inlinestatic |
Get the text associated with a media type
| type | The media type |
|
inlinestatic |
Get the text associated with a media type
| type | The media type |
|
static |
Keep the texts associated with the formats
|
static |
Keep the texts associated with type