Prosody RTP processing: API: sm_vmprx_config_codec_g726

Prototype Definition

int sm_vmprx_config_codec_g726(struct sm_vmprx_codec_g726_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g726_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT bits;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
	enum kSMG726Variant {
		kSMG726VariantRFC3551,
		kSMG726VariantAAL2,
	} variant;						/* in */
} SM_VMPRX_CODEC_G726_PARMS;

Description

Configures the VMP[rx] to use the G.726 codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

If the call completes successfully, RTP packets arriving at the VMP[rx] with a payload type that matches the specified payload type will be decoded using this codec.

This requires the module g726 to have been downloaded.

Fields

vmprx
The VMP[rx] to which to add the 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.
plc_mode
Enables or disables PLC (packet loss concealment) as appropriate for the codec One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled
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.