|
|
This class holds the enumeration values for audio and video formats
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 = G723_1 | GSM | ULAW | ALAW | G726 | ADPCM | SLIN | LPC10 | G729 | SPEEX | ILBC | G726AAL2 | G722 | AMR | GSM_HR, 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, } | Formats |
Format enumeration types
enum Media { Audio = 0, Video, Image, TypeCount } | Media |
Media type enumeration
inline IAXFormat (int type = Audio)
| IAXFormat |
Constructor. Build an audio format
Parameters:
type | Media type |
inline int type ()
| type |
[const]
Get the media type
Returns: Media type
inline u_int32_t format ()
| format |
[const]
Get the format
Returns: The format
inline u_int32_t in ()
| in |
[const]
Get the incoming format
Returns: The incoming format
inline u_int32_t out ()
| out |
[const]
Get the outgoing format
Returns: The outgoing format
inline const IAXFormatDesc& formatDesc (bool in)
| formatDesc |
[const]
Get the incoming or outgoing format description
Parameters:
in | True to retrieve the incoming format, false to retrieve the outgoing one |
Returns: Requested format desc
inline const char* formatName ()
| formatName |
[const]
Get the text associated with the format
Returns: Format name
inline const char* typeName ()
| typeName |
[const]
Get the text associated with the media type
Returns: Media name
void set (u_int32_t* fmt, u_int32_t* fmtIn, u_int32_t* fmtOut)
| set |
Set format
Parameters:
fmt | Optional pointer to format to set |
fmtIn | Optional pointer to incoming format to set |
fmtOut | Optional pointer to outgoing format to set |
void formatList (String& dest, u_int32_t formats, const TokenDict* dict = 0,
const char* sep = ",")
| formatList |
[static]
Create a string list from formats
Parameters:
dest | The destination |
formats | The formats |
dict | Optional dictionary to use, 0 to use s_formats |
sep | The separator to use |
u_int32_t pickFormat (u_int32_t formats, u_int32_t format = 0)
| pickFormat |
[static]
Pick a format from a list of capabilities
Parameters:
formats | Capabilities list |
format | Optional format to pick |
Returns: IAX format, 0 if not found
u_int32_t encode (const String& formats, const TokenDict* dict, char sep = ',')
| encode |
[static]
Encode a formats list
Parameters:
formats | Formats list |
dict | Dictionary to use |
sep | Formats list separator |
Returns: Encoded formats
inline u_int32_t mask (u_int32_t value, int type)
| mask |
[static]
Mask formats by type
Parameters:
value | Input format(s) |
type | Media type to retrieve |
Returns: Media format(s) from input
inline u_int32_t clear (u_int32_t value, int type)
| clear |
[static]
Clear formats by type
Parameters:
value | Input format(s) |
type | Media type to clear |
Returns: Cleared format(s) from input
inline const char* formatName (u_int32_t fmt)
| formatName |
[static]
Get the text associated with a format
Parameters:
fmt | The desired format |
Returns: A pointer to the text associated with the format or 0 if the format doesn't exist
inline const char* typeName (int type)
| typeName |
[static]
Get the text associated with a media type
Parameters:
type | The media type |
Returns: A pointer to the text associated with the media type
inline const String& typeNameStr (int type)
| typeNameStr |
[static]
Get the text associated with a media type
Parameters:
type | The media type |
Returns: A string associated with the media type
static const TokenDict s_formats[] | s_formats[] |
static const TokenDict s_types[] | s_types[] |
static const String s_typesList[TypeCount] | s_typesList[TypeCount] |
int m_type | m_type |
[protected]
IAXFormatDesc m_format | m_format |
[protected]
IAXFormatDesc m_formatIn | m_formatIn |
[protected]
IAXFormatDesc m_formatOut | m_formatOut |
[protected]
Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54. |