Prosody RTP processing: API: sm_vmptx_config_codec_silk
Prototype Definition
int sm_vmptx_config_codec_silk(struct sm_vmptx_codec_silk_parms *codecp)
Parameters
- *codecp
-
a structure of the following type:
typedef struct sm_vmptx_codec_silk_parms {
tSMVMPtxId vmptx; /* in */
tSM_INT payload_type; /* in */
tSM_INT sample_rate; /* in */
tSM_INT internal_rate; /* in */
tSM_INT bit_rate; /* in */
tSM_INT frames_per_packet; /* in */
tSM_INT packet_loss; /* in */
tSM_INT complexity; /* in */
tSM_INT use_fec; /* in */
tSM_INT use_dtx; /* in */
} SM_VMPTX_CODEC_SILK_PARMS;
Description
Configures a VMP[tx] to use the SILK codec from Skype.
This requires the module
silk
to have been downloaded.
Fields
- vmptx
- The VMP[tx] to which to add this 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.
- sample_rate
- Sample rate of the audio being encoded. In the current release, this
should be either 8000 (narrowband) or 16000 (wideband).
- internal_rate
- Maximum sample rate used internally by the codec. Must be no greater
than
sample_rate
and must also be equal to one of the standard SILK internal sample
rate values, i.e. 8000, 12000, 16000, or 24000.
- bit_rate
- The target bit rate which the codec should aim to produce. This value
must be between 5000 and 100000. Recommended values are between 5000
and 20000 for 8kHz-sampled (narrowband) signals, and between 8000 and
30000 for 16kHz (wideband) sampling.
- frames_per_packet
- The number of frames to send per packet. This value is normally one,
which encodes 20 milliseconds per packet, but larger values could be
used, to reduce the packet overhead at the expense of extra delay.
- packet_loss
- An estimate of the current level of packet loss to which the encoded
data will be subjected, as a percentage. Normally set to zero.
- complexity
- The complexity of the algorithms used to encode the data: 0, 1, or 2.
This controls the trade-off between channel count and audio quality.
0 will give the biggest channel count; 2 will give best quality.
- use_fec
- Set to any non-zero value to include data for "forward error correction"
(FEC) in the transmitted stream. Only recommended if really needed, as it
reduces quality unless there is significant packet loss.
- use_dtx
- Set to any non-zero value to suppress transmission of data during silence.
Not recommended unless average bit rate is absolutely critical.
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.