Prosody RTP processing: API: sm_vmprx_config_codec_speex

Prototype Definition

int sm_vmprx_config_codec_speex(struct sm_vmprx_codec_speex_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_speex_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_UT32 nb_channels;					/* in */
	tSM_UT32 sampling_rate;					/* in */
	enum kSMSpeexMode {
		kSMSpeexNarrowbandMode,
		kSMSpeexWidebandMode,
		kSMSpeexUltrawidebandMode,
	} bandwidth;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_SPEEX_PARMS;

Description

Configures the VMP[rx] to use Speex for encoding data, as defined in IETF RFC 5574. However, neither variable bit-rate coding (VBR) nor discontinuous transmission (DTX) are supported.

This requires the module speex_vmp to have been downloaded.

Fields

vmprx
The VMP[rx] to which to add this codec
payload_type
The payload type identifer to use with this codec (see IETF RFC 3550 section 13). Supplying a value of -1 will remove any payload type configuration from the codec preventing its use.
nb_channels
Number of channels (mono vs stereo: options 1 or 2)
sampling_rate
The desired sampling rate of the audio.
bandwidth
Ignored. kSMSpeexNarrowbandMode is always used since it is the only value supported by current firmware. One of these values:
kSMSpeexNarrowbandMode
Narrowband (8 kHz sampling rate) mode
kSMSpeexWidebandMode
Wideband (16 kHz sampling rate) mode
kSMSpeexUltrawidebandMode
Ultrawideband (32 kHz sampling rate) mode
plc_mode
Option for packet loss concealment (plc). Note the codec implementation may not allow PLC to be disabled. One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


This function is part of the Prosody RTP processing API.