Prosody RTP processing: API: sm_vmptx_config_codec_speex_mode

Prototype Definition

int sm_vmptx_config_codec_speex_mode(struct sm_vmptx_codec_speex_mode_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmptx_codec_speex_mode_parms {
	tSMVMPtxId vmptx;					/* in */
	tSM_UT32 complexity;					/* in */
	tSM_UT32 quality;					/* in */
	tSM_UT32 bitrate;					/* in */
	tSM_UT32 denoiser;					/* in */
} SM_VMPTX_CODEC_SPEEX_MODE_PARMS;

Description

Configures a VMP[tx] to use Speex for encoding data, as defined in IETF RFC 5574.

This function requires the module speex_vmp to have been downloaded, and must be called to make the codec operational. It must be called once, and only once, after each call to sm_vmptx_config_codec_speex.

Fields

vmptx
The VMP[tx] to which to add this codec
complexity
This determines the amount of processor time available to the encoding process. Higher complexity gives a better trade-off between quality and bitrate, especially for non-speech sounds (e.g. music), but it will give a lower channel count. A range of values from 0 to 10 may be used. The recommended range is from 2 to 4.
quality
This affects the quality of the encoded speech. A value between 0 and 10 may be used. The default is 8. There is a trade-off between complexity, quality, bitrate, and achievable channel count. This value may be overridden by the bitrate parameter, below.
bitrate
This specifies the encoded data rate in bits per second. The actual bitrate used will be one of: 2150, 3950, 5950, 8000, 11000, 15000, 18200, and 24600 bits per second. Only a few quality settings are compatible with each bitrate. In this API call, bitrate takes precedence over quality.
denoiser
Disable (0) or enable (any non-zero value, e.g. 1) pre-processing to reduce the audibility of background noise. Use of the denoiser will severely reduce the channel count. This field is currently ignored: the denoiser is not implemented because of its impact on channel count.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody RTP processing API.