Prosody RTP processing: API: sm_vmptx_config_codec_g726

Prototype Definition

int sm_vmptx_config_codec_g726(struct sm_vmptx_codec_g726_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmptx_codec_g726_parms {
	tSMVMPtxId vmptx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT bits;						/* in */
	enum kSMVMPTxVADMode VADMode;				/* in */
	tSM_INT packetlen;					/* in */
	enum kSMG726Variant variant;				/* in */
} SM_VMPTX_CODEC_G726_PARMS;

Description

Configures a VMP[tx] to use G.726 for encoding data.

This requires the module g726 to have been downloaded.

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.
bits
The bit rate at which the codec runs, specified as the number of bits per sample. This must be 2, 3, 4, or 5.
VADMode
The mode of operation for the voice activity detector. 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().
packetlen
The number of samples of data to encode and send in each RTP packet. This should be a multiple of 80 (i.e. a multiple of 10 mS).
variant
The sample packing variant to use One of these values:
kSMG726VariantRFC3551
Use the packing mode described in RFC 3551
kSMG726VariantAAL2
Use the packing mode used by AAL2 (ITU-T I.366.2)

Returns

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


This function is part of the Prosody RTP processing API.