Prosody RTP processing: API: sm_vmprx_config_codec_gsmfr

Prototype Definition

int sm_vmprx_config_codec_gsmfr(struct sm_vmprx_codec_gsmfr_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_gsmfr_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMGSMVariant {
		kSMGSMVariantStandard,
		kSMGSMVariantMS,
	} variant;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_GSMFR_PARMS;

Description

Configures the VMP[rx] to use the GSM full-rate 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 gsm-fr 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.
variant
Configures which GSM variant is to be used. One of these values:
kSMGSMVariantStandard
Use the standard GSM 06.10 codec.
kSMGSMVariantMS
Decode packets using the alternate MS-GSM encoding scheme. The GSM 06.10 codec itself is identical, however the bitstream is packed with two frames in 65 bytes instead of one frame in 33 bytes.
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

Returns

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


This function is part of the Prosody RTP processing API.