Packet lost compensation algorithm.
More...
This section describes PJMEDIA's implementation of Packet Lost Concealment algorithm. This algorithm is used to implement PLC for codecs that do not have built-in support for one (e.g. G.711 or GSM codecs).
The PLC algorithm (either built-in or external) is embedded in PJMEDIA codec instance, and application can conceal lost frames by calling recover()
member of the codec's member operation (pjmedia_codec_op).
See also Concealing Lost Frames for more info.
◆ pjmedia_plc
Opaque declaration for PLC.
◆ pjmedia_plc_create()
Create PLC session. This function will select the PLC algorithm to use based on the arguments.
- Parameters
-
pool | Pool to allocate memory for the PLC. |
clock_rate | Media sampling rate. |
samples_per_frame | Number of samples per frame. |
options | Must be zero for now. |
p_plc | Pointer to receive the PLC instance. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_plc_save()
Save a good frame to PLC.
- Parameters
-
plc | The PLC session. |
frame | The good frame to be stored to PLC. This frame must have the same length as the configured samples per frame. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_plc_generate()
Generate a replacement for lost frame.
- Parameters
-
plc | The PLC session. |
frame | Buffer to receive the generated frame. This buffer must be able to store the frame. |
- Returns
- PJ_SUCCESS on success.
References PJ_END_DECL.