BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJMEDIA Reference

Packet Lost Concealment (PLC)

Packet lost compensation algorithm. More...

Typedefs

typedef typedefPJ_BEGIN_DECL struct pjmedia_plc pjmedia_plc
 

Functions

pj_status_t pjmedia_plc_create (pj_pool_t *pool, unsigned clock_rate, unsigned samples_per_frame, unsigned options, pjmedia_plc **p_plc)
 
pj_status_t pjmedia_plc_save (pjmedia_plc *plc, pj_int16_t *frame)
 
pj_status_t pjmedia_plc_generate (pjmedia_plc *plc, pj_int16_t *frame)
 

Detailed Description

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.

Typedef Documentation

◆ pjmedia_plc

typedef typedefPJ_BEGIN_DECL struct pjmedia_plc pjmedia_plc

Opaque declaration for PLC.

Function Documentation

◆ pjmedia_plc_create()

pj_status_t pjmedia_plc_create ( pj_pool_t pool,
unsigned  clock_rate,
unsigned  samples_per_frame,
unsigned  options,
pjmedia_plc **  p_plc 
)

Create PLC session. This function will select the PLC algorithm to use based on the arguments.

Parameters
poolPool to allocate memory for the PLC.
clock_rateMedia sampling rate.
samples_per_frameNumber of samples per frame.
optionsMust be zero for now.
p_plcPointer to receive the PLC instance.
Returns
PJ_SUCCESS on success.

◆ pjmedia_plc_save()

pj_status_t pjmedia_plc_save ( pjmedia_plc plc,
pj_int16_t frame 
)

Save a good frame to PLC.

Parameters
plcThe PLC session.
frameThe 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()

pj_status_t pjmedia_plc_generate ( pjmedia_plc plc,
pj_int16_t frame 
)

Generate a replacement for lost frame.

Parameters
plcThe PLC session.
frameBuffer to receive the generated frame. This buffer must be able to store the frame.
Returns
PJ_SUCCESS on success.

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.