pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication
Loading

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJMEDIA Reference

Packet Lost Concealment (PLC)
[Audio Manipulation Algorithms]

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

typedef typedefPJ_BEGIN_DECL struct pjmedia_plc pjmedia_plc

Opaque declaration for PLC.


Function Documentation

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:
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.
pj_status_t pjmedia_plc_save ( pjmedia_plc plc,
pj_int16_t frame 
)

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.
pj_status_t pjmedia_plc_generate ( pjmedia_plc plc,
pj_int16_t frame 
)

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.

 


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