Prosody RTP processing: API: sm_vmptx_config_codec_g729i
Prototype Definition
int sm_vmptx_config_codec_g729i(struct sm_vmptx_codec_g729i_parms *codecp)
Parameters
- *codecp
-
a structure of the following type:
typedef struct sm_vmptx_codec_g729i_parms {
tSMVMPtxId vmptx; /* in */
tSM_INT payload_type; /* in */
enum kSMG729IMode g729_mode; /* in */
enum kSMVMPTxVADMode VADMode; /* in */
tSM_INT ptime; /* in */
} SM_VMPTX_CODEC_G729I_PARMS;
Description
This requires the module
g729i
to have been downloaded.
Fields
- vmptx
- The VMP[tx] 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. The payload type should be chosen to
match this value.
One of these values:
- kSMG729IModeG729D
- G.729 Annex D
- kSMG729IModeG729
- G.729 standard
- kSMG729IModeG729E
- G.729 Annex E
- VADMode
- The mode of operation for the voice activity detector. (This is not
currently implemented, so the codec will encode all data supplied to
it).
One of these values:
- kSMVMPTxVADModeDisabled
- Disable VAD - all data delivered to the VMP[tx] is encoded and sent
- kSMVMPTxVADModeEnabled
- Enable VAD - if the signal is inactive, no data is sent (DTX)
- kSMVMPTxVADModeComfortNoise
- Enable VAD with comfort noise generation - if the signal is inactive,
comfort noise packets are sent. If the main codec does not define
its own comfort noise, it must have been configured by
sm_vmptx_config_codec_comfort_noise().
- ptime
- The length of the RTP media, in milliseconds, to send in each packet.
It is usually desirable to send 20 ms packets. Applications
should specify
ptime
as a multiple of 10 ms.
Returns
0
if call completed successfully, otherwise a standard error such as:
- ERR_SM_DEVERR - device error
This function is part of the Prosody RTP processing API.