Home --> Documentations --> PJMEDIA Reference

pjmedia_codec_param Struct Reference

Data Fields

struct {
   unsigned   clock_rate
   unsigned   channel_cnt
   pj_uint32_t   avg_bps
   pj_uint32_t   max_bps
   unsigned   max_rx_frame_size
   pj_uint16_t   frm_ptime
   pj_uint16_t   enc_ptime
   pj_uint8_t   pcm_bits_per_sample
   pj_uint8_t   pt
   pjmedia_format_id   fmt_id
struct {
   pj_uint8_t   frm_per_pkt
   unsigned   vad:1
   unsigned   cng:1
   unsigned   penh:1
   unsigned   plc:1
   unsigned   reserved:1
   pjmedia_codec_fmtp   enc_fmtp
   pjmedia_codec_fmtp   dec_fmtp

Detailed Description

Detailed codec attributes used in configuring a codec and in querying the capability of codec factories. Default attributes of any codecs could be queried using pjmedia_codec_mgr_get_default_param() and modified using pjmedia_codec_mgr_set_default_param().

Please note that codec parameter also contains SDP specific setting, dec_fmtp and enc_fmtp, which may need to be set appropriately based on the effective setting. See each codec documentation for more detail.

Field Documentation

◆ clock_rate

unsigned pjmedia_codec_param::clock_rate

Sampling rate in Hz

◆ channel_cnt

unsigned pjmedia_codec_param::channel_cnt

Channel count.

◆ avg_bps

pj_uint32_t pjmedia_codec_param::avg_bps

Average bandwidth in bits/sec

◆ max_bps

pj_uint32_t pjmedia_codec_param::max_bps

Maximum bandwidth in bits/sec

◆ max_rx_frame_size

unsigned pjmedia_codec_param::max_rx_frame_size

Maximum frame size

◆ frm_ptime

pj_uint16_t pjmedia_codec_param::frm_ptime

Decoder frame ptime in msec.

◆ enc_ptime

pj_uint16_t pjmedia_codec_param::enc_ptime

Encoder ptime, or zero if it's equal to decoder ptime.

◆ pcm_bits_per_sample

pj_uint8_t pjmedia_codec_param::pcm_bits_per_sample

Bits/sample in the PCM side

◆ pt

pj_uint8_t pjmedia_codec_param::pt

Payload type.

◆ fmt_id

pjmedia_format_id pjmedia_codec_param::fmt_id

Source format, it's format of encoder input and decoder output.

◆ info

struct { ... } pjmedia_codec_param::info

The "info" part of codec param describes the capability of the codec, and the value should NOT be changed by application.

◆ frm_per_pkt

pj_uint8_t pjmedia_codec_param::frm_per_pkt

Number of frames per packet.

◆ vad

unsigned pjmedia_codec_param::vad

Voice Activity Detector.

◆ cng

unsigned pjmedia_codec_param::cng

Comfort Noise Generator.

◆ penh

unsigned pjmedia_codec_param::penh

Perceptual Enhancement

◆ plc

unsigned pjmedia_codec_param::plc

Packet loss concealment

◆ reserved

unsigned pjmedia_codec_param::reserved

Reserved, must be zero.

◆ enc_fmtp

pjmedia_codec_fmtp pjmedia_codec_param::enc_fmtp

Encoder's fmtp params.

◆ dec_fmtp

pjmedia_codec_fmtp pjmedia_codec_param::dec_fmtp

Decoder's fmtp params.

◆ setting

struct { ... } pjmedia_codec_param::setting

The "setting" part of codec param describes various settings to be applied to the codec. When the codec param is retrieved from the codec or codec factory, the values of these will be filled by the capability of the codec. Any features that are supported by the codec (e.g. vad or plc) will be turned on, so that application can query which capabilities are supported by the codec. Application may change the settings here before instantiating the codec/stream.

The documentation for this struct was generated from the following file:


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