Prosody RTP processing: API: sm_vmptx_config_codec_amrnb

Prototype Definition

int sm_vmptx_config_codec_amrnb(struct sm_vmptx_codec_amrnb_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmptx_codec_amrnb_parms {
	tSMVMPtxId vmptx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT aligned;					/* in */
	tSM_INT gsmefr;						/* in */
	enum kSMVMPTxVADMode VADMode;				/* in */
	tSM_INT frames_per_packet;				/* in */
} SM_VMPTX_CODEC_AMRNB_PARMS;

Description

Configures a VMP[tx] to use AMR narrow-band for encoding data, as defined in IETF RFC 3267.

This requires the module amr-nb to have been downloaded. Alternatively the module amr-nb-all can be used if amr-nb-prs functionality is also required.

Fields

vmptx
The VMP[tx] 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.
aligned
Packet alignment (bandwidth efficient mode). 0 if packet is not aligned, otherwise packet is aligned.
gsmefr
Configures the codec to perform GSM-EFR equivalent encoding. This will assume non-aligned packets and 12.2 kHz mode encoding.
VADMode
The mode of operation for the voice activity detector. Note that for this codec kSMVMPTxVADModeEnabled and kSMVMPTxVADModeComfortNoise are equivalent, in that the codec will generate SID frames when the signal is not active. One of these values:
kSMVMPTxVADModeDisabled
Disable VAD - all data delivered to the VMP[tx] is encoded and sent
kSMVMPTxVADModeEnabled
Enable VAD - if the signal is inactive, no data is sent (DTX)
kSMVMPTxVADModeComfortNoise
Enable VAD with comfort noise generation - if the signal is inactive, comfort noise packets are sent. If the main codec does not define its own comfort noise, it must have been configured by sm_vmptx_config_codec_comfort_noise().
frames_per_packet
The number of frames to send per packet. This value is normally one, which encodes 20 milliseconds per packet, but larger values can be used, reducing the packet overhead at the expense of extra delay.

Returns

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


This function is part of the Prosody RTP processing API.