Group PJMED_OPUS

group PJMED_OPUS

Opus codec wrapper.

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

Opus codec uses multiple bit rates, and supports fullband (48 kHz sampling rate), super wideband (24 kHz sampling rate), wideband (16 kHz sampling rate), medium band (12kHz sampling rate), and narrowband (8 kHz sampling rate).

Functions

pj_status_t pjmedia_codec_opus_init(pjmedia_endpt *endpt)

Initialize and register Opus codec factory to pjmedia endpoint.

Return

PJ_SUCCESS on success.

Parameters
  • endpt: The pjmedia endpoint.

pj_status_t pjmedia_codec_opus_deinit(void)

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

Return

PJ_SUCCESS on success.

pj_status_t pjmedia_codec_opus_get_config(pjmedia_codec_opus_config *cfg)

Get the default Opus configuration.

Return

PJ_SUCCESS on success.

Parameters
  • cfg: Opus codec configuration.

pj_status_t pjmedia_codec_opus_set_default_param(const pjmedia_codec_opus_config *cfg, pjmedia_codec_param *param)

Set the default Opus configuration and set the default Opus codec param. Note that the function will call pjmedia_codec_mgr_set_default_param().

Return

PJ_SUCCESS on success.

Parameters
  • cfg: Opus codec configuration.

  • param: On input, the default Opus codec parameter to be set. On output, the current default Opus codec parameter after setting. This may be different from the input because some settings can be rejected, or overwritten by the Opus codec configuration above.

struct pjmedia_codec_opus_config
#include <opus.h>

Opus codec configuration.