WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

Implementation of SILK codecs (narrow/medium/wide/superwide-band). More...

Data Structures

struct  pjmedia_codec_silk_setting
 

Functions

pj_status_t pjmedia_codec_silk_init (pjmedia_endpt *endpt)
 
pj_status_t pjmedia_codec_silk_set_config (unsigned clock_rate, const pjmedia_codec_silk_setting *opt)
 
pj_status_t pjmedia_codec_silk_deinit (void)
 

Detailed Description

This section describes functions to initialize and register SILK codec factory to the codec manager. After the codec factory has been registered, application can use Codec Framework API to manipulate the codec.

The SILK codec uses multiple bit rates, and supports super wideband (24 kHz sampling rate), wideband (16 kHz sampling rate), medium (12kHz sampling rate), and narrowband (telephone quality, 8 kHz sampling rate).

Codec Settings

General Settings

General codec settings for this codec such as VAD and PLC can be manipulated through the setting field in pjmedia_codec_param. Please see the documentation of pjmedia_codec_param for more info.

Codec Specific Settings

The following settings are applicable for this codec.

Quality vs Complexity

The SILK codec quality versus computational complexity and bandwidth requirement can be adjusted by modifying the quality and complexity setting, by calling pjmedia_codec_silk_set_config().

The default setting of quality is specified in PJMEDIA_CODEC_SILK_DEFAULT_QUALITY. And the default setting of complexity is specified in PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY.

Function Documentation

◆ pjmedia_codec_silk_init()

pj_status_t pjmedia_codec_silk_init ( pjmedia_endpt endpt)

Initialize and register SILK codec factory to pjmedia endpoint. By default, only narrowband (8kHz sampling rate) and wideband (16kHz sampling rate) will be enabled. Quality and complexity for those sampling rate modes will be set to the default values (see PJMEDIA_CODEC_SILK_DEFAULT_QUALITY and PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY), application may modify these settings via pjmedia_codec_silk_set_config().

Parameters
endptThe pjmedia endpoint.
Returns
PJ_SUCCESS on success.

◆ pjmedia_codec_silk_set_config()

pj_status_t pjmedia_codec_silk_set_config ( unsigned  clock_rate,
const pjmedia_codec_silk_setting opt 
)

Change the configuration setting of the SILK codec for the specified clock rate.

Parameters
clock_ratePCM sampling rate, in Hz, valid values are 8000, 12000, 16000 and 24000.
optThe setting to be applied for the specified clock rate.
Returns
PJ_SUCCESS on success.

◆ pjmedia_codec_silk_deinit()

pj_status_t pjmedia_codec_silk_deinit ( void  )

Unregister SILK codec factory from pjmedia endpoint and deinitialize the SILK codec library.

Returns
PJ_SUCCESS on success.

References PJ_END_DECL.

 


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