Prosody RTP processing: API: sm_vmprx_config_codec_opus

Prototype Definition

int sm_vmprx_config_codec_opus(struct sm_vmprx_codec_opus_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_opus_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT decode_fec;					/* in */
	tSM_INT payload_type;					/* in */
} SM_VMPRX_CODEC_OPUS_PARMS;

Description

Configures a VMP[rx] to use Opus codec as defined in IETF RFC 6716, 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.

The sample rate of the resulting audio is set to match the VMP[rx], and in the current release should be either 8000 or 16000.

Fields

vmprx
The VMP[rx] to which to add the codec.
decode_fec
Set to zero if FEC (forward error correction) information in packets is not to be decoded, set to 1 to enable FEC decode. On low packet loss network inhibiting FEC decode can reduce CPU load when there is little likelyhood of this information being used.
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.

Returns

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


This function is part of the Prosody RTP processing API.