pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

pjsua_media_config Struct Reference
[PJSUA-API Media Manipulation]

#include <pjsua.h>


Detailed Description

This structure describes media configuration, which will be specified when calling pjsua_init(). Application MUST initialize this structure by calling pjsua_media_config_default().

Data Fields

unsigned clock_rate
unsigned snd_clock_rate
unsigned channel_count
unsigned audio_frame_ptime
unsigned max_media_ports
pj_bool_t has_ioqueue
unsigned thread_cnt
unsigned quality
unsigned ptime
pj_bool_t no_vad
unsigned ilbc_mode
unsigned tx_drop_pct
unsigned rx_drop_pct
unsigned ec_options
unsigned ec_tail_len
unsigned snd_rec_latency
unsigned snd_play_latency
int jb_init
int jb_min_pre
int jb_max_pre
int jb_max
pj_bool_t enable_ice
int ice_max_host_cands
pj_ice_sess_options ice_opt
pj_bool_t ice_no_rtcp
pj_bool_t enable_turn
pj_str_t turn_server
pj_turn_tp_type turn_conn_type
pj_stun_auth_cred turn_auth_cred
int snd_auto_close_time

Field Documentation

Clock rate to be applied to the conference bridge. If value is zero, default clock rate will be used (PJSUA_DEFAULT_CLOCK_RATE, which by default is 16KHz).

Clock rate to be applied when opening the sound device. If value is zero, conference bridge clock rate will be used.

Channel count be applied when opening the sound device and conference bridge.

Specify audio frame ptime. The value here will affect the samples per frame of both the sound device and the conference bridge. Specifying lower ptime will normally reduce the latency.

Default value: PJSUA_DEFAULT_AUDIO_FRAME_PTIME

Specify maximum number of media ports to be created in the conference bridge. Since all media terminate in the bridge (calls, file player, file recorder, etc), the value must be large enough to support all of them. However, the larger the value, the more computations are performed.

Default value: PJSUA_MAX_CONF_PORTS

Specify whether the media manager should manage its own ioqueue for the RTP/RTCP sockets. If yes, ioqueue will be created and at least one worker thread will be created too. If no, the RTP/RTCP sockets will share the same ioqueue as SIP sockets, and no worker thread is needed.

Normally application would say yes here, unless it wants to run everything from a single thread.

Specify the number of worker threads to handle incoming RTP packets. A value of one is recommended for most applications.

Media quality, 0-10, according to this table: 5-10: resampling use large filter, 3-4: resampling use small filter, 1-2: resampling use linear. The media quality also sets speex codec quality/complexity to the number.

Default: 5 (PJSUA_DEFAULT_CODEC_QUALITY).

Specify default codec ptime.

Default: 0 (codec specific)

Disable VAD?

Default: 0 (no (meaning VAD is enabled))

iLBC mode (20 or 30).

Default: 30 (PJSUA_DEFAULT_ILBC_MODE)

Percentage of RTP packet to drop in TX direction (to simulate packet lost).

Default: 0

Percentage of RTP packet to drop in RX direction (to simulate packet lost).

Default: 0

Echo canceller options (see pjmedia_echo_create())

Default: 0.

Echo canceller tail length, in miliseconds.

Default: PJSUA_DEFAULT_EC_TAIL_LEN

Audio capture buffer length, in milliseconds.

Default: PJMEDIA_SND_DEFAULT_REC_LATENCY

Audio playback buffer length, in milliseconds.

Default: PJMEDIA_SND_DEFAULT_PLAY_LATENCY

Jitter buffer initial prefetch delay in msec. The value must be between jb_min_pre and jb_max_pre below.

Default: -1 (to use default stream settings, currently 150 msec)

Jitter buffer minimum prefetch delay in msec.

Default: -1 (to use default stream settings, currently 60 msec)

Jitter buffer maximum prefetch delay in msec.

Default: -1 (to use default stream settings, currently 240 msec)

Set maximum delay that can be accomodated by the jitter buffer msec.

Default: -1 (to use default stream settings, currently 360 msec)

Set the maximum number of host candidates.

Default: -1 (maximum not set)

Disable RTCP component.

Default: no

Enable TURN relay candidate in ICE.

Specify TURN domain name or host name, in in "DOMAIN:PORT" or "HOST:PORT" format.

Specify the connection type to be used to the TURN server. Valid values are PJ_TURN_TP_UDP or PJ_TURN_TP_TCP.

Default: PJ_TURN_TP_UDP

Specify the credential to authenticate with the TURN server.

Specify idle time of sound device before it is automatically closed, in seconds. Use value -1 to disable the auto-close feature of sound device

Default : 1


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

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.