Prosody RTP processing: API: sm_vmptx_config_codec
Prototype Definition
int sm_vmptx_config_codec(struct sm_vmptx_codec_parms *codecp)
Parameters
- *codecp
-
a structure of the following type:
typedef struct sm_vmptx_codec_parms {
tSMVMPtxId vmptx; /* in */
enum kSMCodecType codec; /* in */
tSM_INT payload_type; /* in */
enum kSMVMPTxVADMode VADMode; /* in */
tSM_INT ptime; /* in */
} SM_VMPTX_CODEC_PARMS;
Description
This function is deprecated because it will not be updated to add any
new codecs. The codecs it covers can also be configured using
sm_vmptx_config_codec_alaw(),
sm_vmptx_config_codec_comfort_noise(),
sm_vmptx_config_codec_g729ab(),
sm_vmptx_config_codec_mulaw(),
and
sm_vmptx_config_codec_rfc2833()
and new codecs will be added by adding new functions for each codec.
Fields
- vmptx (Deprecated)
- The VMP[tx] to which to add the codec
- codec (Deprecated)
- The codec to be added
- payload_type (Deprecated)
- 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.
- VADMode (Deprecated)
- The mode of operation for the voice activity detector.
This is interpreted as described in
sm_vmptx_config_codec_alaw(),
sm_vmptx_config_codec_g729ab(),
and
sm_vmptx_config_codec_mulaw().
It is ignored for other codecs.
- ptime (Deprecated)
- The length of the RTP media, in milliseconds, to send in each packet.
For G.711 and G.729 it is usually desirable to send 20 ms packets.
Applications should specify
ptime
as a multiple of 10 ms.
This is ignored when configuring the RFC2833 and comfort noise codec types and should be set to zero.
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.