Prosody RTP processing: API: sm_vmprx_config_codec_evrc
Prototype Definition
int sm_vmprx_config_codec_evrc(struct sm_vmprx_codec_evrc_parms *codecp)
Parameters
- *codecp
-
a structure of the following type:
typedef struct sm_vmprx_codec_evrc_parms {
tSMVMPrxId vmprx; /* in */
tSM_INT payload_type; /* in */
tSM_INT post_filter; /* in */
enum kSMEVRCRTPMode {
kSMEVRCRTPModeHeaderless,
kSMEVRCRTPModeRFC2658,
kSMEVRCRTPModeRFC3558,
} rtp_mode; /* in */
enum kSMPLCMode plc_mode; /* in */
} SM_VMPRX_CODEC_EVRC_PARMS;
Description
Configures the VMP[rx] to use the Enhanced Variable Rate Codec
(EVRC), 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.
This requires the module
evrc
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.
- post_filter
- Configures whether or not to use a post-filter. It is used if
this value is non-zero.
- rtp_mode
- Selects the RTP format for this codec. There are two commonly-used
specifications for how to pack the the encoded data into an RTP
packet.
One of these values:
- kSMEVRCRTPModeHeaderless
- Encodes the bitstream as raw encoded bytes, with no headers. This
requires that there is only one frame per packet.
- kSMEVRCRTPModeRFC2658
- Encodes the bitstream as specified in
IETF RFC 2658. The
header is one byte. This specification only allows for one frame per
packet.
- kSMEVRCRTPModeRFC3558
- Encodes the bitstream as specified in
IETF RFC 3558. The
header is two bytes, plus one byte for every two frames in the packet.
- plc_mode
- Configures packet loss concealment for this codec.
Note the codec implementation may not allow PLC to be disabled.
One of these values:
- kSMPLCModeDisabled
- PLC Disabled
- kSMPLCModeEnabled
- PLC Enabled
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.