Prosody RTP processing: API: sm_vmprx_config_codec_amrnb

Prototype Definition

int sm_vmprx_config_codec_amrnb(struct sm_vmprx_codec_amrnb_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_amrnb_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT aligned;					/* in */
	tSM_INT gsmefr;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
	tSM_INT report_cmr;					/* in */
} SM_VMPRX_CODEC_AMRNB_PARMS;

Description

Configures the VMP[rx] to use the AMR narrow-band 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 amr-nb to have been downloaded. Alternatively the module amr-nb-all can be used if amr-nb-prs functionality is also required.

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.
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 decoding. This will assume non-aligned packets, non-sorted bits and 12.2 kHz mode encoding.
plc_mode
Enables or disables PLC (packet loss concealment) as appropriate for the codec. Note the codec implementation may not allow PLC to be disabled. One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled
report_cmr
Enables or disables the notification of CMR changes. If non-zero, then CMR changes will be reported via sm_vmprx_status_codec_amrnb().

Returns

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


This function is part of the Prosody RTP processing API.