Prosody RTP processing: API: sm_vmprx_config_codec_g729i

Prototype Definition

int sm_vmprx_config_codec_g729i(struct sm_vmprx_codec_g729i_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g729i_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMG729IMode {
		kSMG729IModeG729D,
		kSMG729IModeG729,
		kSMG729IModeG729E,
	} g729_mode;						/* in */
} SM_VMPRX_CODEC_G729I_PARMS;

Description

Configures an G.729 I 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 this codec.

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

This requires the module g729i 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.
g729_mode
Sets the data rate according to G.729 Annex D, to the basic G.729 standard, or to G.729 Annex E, respectively. This mode should be chosen to match the payload type. One of these values:
kSMG729IModeG729D
G.729 Annex D
kSMG729IModeG729
G.729 standard
kSMG729IModeG729E
G.729 Annex E

Returns

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


This function is part of the Prosody RTP processing API.