Implementation of Speex codecs (narrow/wide/ultrawide-band).
More...
This section describes functions to initialize and register speex codec factory to the codec manager. After the codec factory has been registered, application can use Codec Framework API to manipulate the codec.
The Speex codec uses multiple bit rates, and supports ultra-wideband (32 kHz sampling rate), wideband (16 kHz sampling rate) and narrowband (telephone quality, 8 kHz sampling rate)
By default, the speex codec factory registers three Speex codecs: "speex/8000" narrowband codec, "speex/16000" wideband codec, and "speex/32000" ultra-wideband codec. This behavior can be changed by specifying pjmedia_speex_options flags during initialization.
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 Speex codec quality versus computational complexity and bandwidth requirement can be adjusted by modifying the quality and complexity setting, by calling pjmedia_codec_speex_set_param(). The RFC 5574 Section 5 shows the relationship between quality setting and the resulting bitrate.
The default setting of quality is specified in PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY. And the default setting of complexity is specified in PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY.
◆ pjmedia_speex_options
Bitmask options to be passed during Speex codec factory initialization.
Enumerator |
---|
PJMEDIA_SPEEX_NO_NB | Disable narrowband mode.
|
PJMEDIA_SPEEX_NO_WB | Disable wideband mode.
|
PJMEDIA_SPEEX_NO_UWB | Disable ultra-wideband mode.
|
◆ pjmedia_codec_speex_init()
Initialize and register Speex codec factory to pjmedia endpoint.
- Parameters
-
endpt | The pjmedia endpoint. |
options | Bitmask of pjmedia_speex_options (default=0). |
quality | Specify encoding quality, or use -1 for default ( |
- See also
- PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY).
- Parameters
-
complexity | Specify encoding complexity , or use -1 for default ( |
- See also
- PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY).
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_codec_speex_init_default()
Initialize Speex codec factory using default settings and register to pjmedia endpoint.
- Parameters
-
endpt | The pjmedia endpoint. |
- Returns
- PJ_SUCCESS on success.
◆ pjmedia_codec_speex_set_param()
pj_status_t pjmedia_codec_speex_set_param |
( |
unsigned |
clock_rate, |
|
|
int |
quality, |
|
|
int |
complexity |
|
) |
| |
◆ pjmedia_codec_speex_deinit()
Unregister Speex codec factory from pjmedia endpoint and deinitialize the Speex codec library.
- Returns
- PJ_SUCCESS on success.
References PJ_END_DECL.