Prosody RTP processing: API: sm_vmprx_config_codec

This function is deprecated.

Prototype Definition

int sm_vmprx_config_codec(struct sm_vmprx_codec_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_parms {
	tSMVMPrxId vmprx;					/* in */
	enum kSMCodecType {
		kSMCodecTypeAlaw,
		kSMCodecTypeMulaw,
		kSMCodecTypeG729AB,
		kSMCodecTypeRFC2833,
		kSMCodecTypeComfortNoise,
	} codec;							/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_PARMS;

Description

This function is deprecated because it will not be updated to add any new codecs or new features for the codecs it covers. The codecs it covers can also be configured using sm_vmprx_config_codec_alaw(), sm_vmprx_config_codec_comfort_noise(), sm_vmprx_config_codec_g729ab(), sm_vmprx_config_codec_mulaw(), and sm_vmprx_config_codec_rfc2833() and new codecs will be added by adding new functions for each codec.

Configures the specified codec to the VMP[rx] setting the payload type mapping to payload_type.

It is possible to change the payload type mapping of a codec whilst a VMP[rx] remains valid by specifying a new payload type mapping for a given codec. This supersedes any previous mappings that were in effect for that codec.

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

If a codec is given the payload type -1 the codec is no longer valid for this RTP session, unless it is subsequently reconfigured.

Fields

vmprx (Deprecated)
The VMP[rx] to which to add the codec
codec (Deprecated)
The codec to be configured
One of these values:
kSMCodecTypeAlaw
G711 A-law codec.
kSMCodecTypeMulaw
G711 Mu-law codec.
kSMCodecTypeG729AB
G729 AB codec.
kSMCodecTypeRFC2833
RFC 2833 tones.
kSMCodecTypeComfortNoise
Comfort noise generation.
payload_type (Deprecated)
The payload type identifer for the selected codec (see IETF RFC 3550 section 13). Supplying a value of -1 will remove any payload type configuration from the specified codec.
plc_mode (Deprecated)
Enables or disables PLC (packet loss concealment) as appropriate for the configured codec
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.