BLOG | DOCUMENTATION | TRAC

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
 
info
 
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
 
setting
 

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

unsigned pjmedia_codec_param::clock_rate

Sampling rate in Hz

unsigned pjmedia_codec_param::channel_cnt

Channel count.

pj_uint32_t pjmedia_codec_param::avg_bps

Average bandwidth in bits/sec

pj_uint32_t pjmedia_codec_param::max_bps

Maximum bandwidth in bits/sec

unsigned pjmedia_codec_param::max_rx_frame_size

Maximum frame size

pj_uint16_t pjmedia_codec_param::frm_ptime

Decoder frame ptime in msec.

pj_uint16_t pjmedia_codec_param::enc_ptime

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

pj_uint8_t pjmedia_codec_param::pcm_bits_per_sample

Bits/sample in the PCM side

pj_uint8_t pjmedia_codec_param::pt

Payload type.

pjmedia_format_id pjmedia_codec_param::fmt_id

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

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.

pj_uint8_t pjmedia_codec_param::frm_per_pkt

Number of frames per packet.

unsigned pjmedia_codec_param::vad

Voice Activity Detector.

unsigned pjmedia_codec_param::cng

Comfort Noise Generator.

unsigned pjmedia_codec_param::penh

Perceptual Enhancement

unsigned pjmedia_codec_param::plc

Packet loss concealment

unsigned pjmedia_codec_param::reserved

Reserved, must be zero.

pjmedia_codec_fmtp pjmedia_codec_param::enc_fmtp

Encoder's fmtp params.

pjmedia_codec_fmtp pjmedia_codec_param::dec_fmtp

Decoder's fmtp params.

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.