Home --> Documentations --> PJSIP Reference
#include <endpoint.hpp>
This structure describes media configuration, which will be specified when calling Lib::init().
◆ MediaConfig()
pj::MediaConfig::MediaConfig |
( |
| ) |
|
Default constructor initialises with default values
◆ fromPj()
◆ toPj()
◆ readObject()
Read this object from a container.
- Parameters
-
node | Container to write values from. |
Implements pj::PersistentObject.
◆ writeObject()
Write this object to a container.
- Parameters
-
node | Container to write values to. |
Implements pj::PersistentObject.
◆ clockRate
unsigned pj::MediaConfig::clockRate |
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).
◆ sndClockRate
unsigned pj::MediaConfig::sndClockRate |
Clock rate to be applied when opening the sound device. If value is zero, conference bridge clock rate will be used.
◆ channelCount
unsigned pj::MediaConfig::channelCount |
Channel count be applied when opening the sound device and conference bridge.
◆ audioFramePtime
unsigned pj::MediaConfig::audioFramePtime |
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
◆ maxMediaPorts
unsigned pj::MediaConfig::maxMediaPorts |
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
◆ hasIoqueue
bool pj::MediaConfig::hasIoqueue |
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.
◆ threadCnt
unsigned pj::MediaConfig::threadCnt |
Specify the number of worker threads to handle incoming RTP packets. A value of one is recommended for most applications.
◆ quality
unsigned pj::MediaConfig::quality |
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: PJSUA_DEFAULT_CODEC_QUALITY.
◆ ptime
unsigned pj::MediaConfig::ptime |
Specify default codec ptime.
Default: 0 (codec specific)
◆ noVad
bool pj::MediaConfig::noVad |
Disable VAD?
Default: 0 (codec specific)
◆ ilbcMode
unsigned pj::MediaConfig::ilbcMode |
iLBC mode (20 or 30).
Default: 30 (PJSUA_DEFAULT_ILBC_MODE)
◆ txDropPct
unsigned pj::MediaConfig::txDropPct |
Percentage of RTP packet to drop in TX direction (to simulate packet lost).
Default: 0
◆ rxDropPct
unsigned pj::MediaConfig::rxDropPct |
Percentage of RTP packet to drop in RX direction (to simulate packet lost).
Default: 0
◆ ecOptions
unsigned pj::MediaConfig::ecOptions |
Echo canceller options (see pjmedia_echo_create()). Specify PJMEDIA_ECHO_USE_SW_ECHO here if application wishes to use software echo canceller instead of device EC.
Default: 0.
◆ ecTailLen
unsigned pj::MediaConfig::ecTailLen |
Echo canceller tail length, in miliseconds. Setting this to zero will disable echo cancellation.
Default: PJSUA_DEFAULT_EC_TAIL_LEN
◆ sndRecLatency
unsigned pj::MediaConfig::sndRecLatency |
Audio capture buffer length, in milliseconds.
Default: PJMEDIA_SND_DEFAULT_REC_LATENCY
◆ sndPlayLatency
unsigned pj::MediaConfig::sndPlayLatency |
Audio playback buffer length, in milliseconds.
Default: PJMEDIA_SND_DEFAULT_PLAY_LATENCY
◆ jbInit
int pj::MediaConfig::jbInit |
Jitter buffer initial prefetch delay in msec. The value must be between jb_min_pre and jb_max_pre below. If the value is 0, prefetching will be disabled.
Default: -1 (to use default stream settings, currently 0)
◆ jbMinPre
int pj::MediaConfig::jbMinPre |
Jitter buffer minimum prefetch delay in msec.
Default: -1 (to use default stream settings, currently codec ptime)
◆ jbMaxPre
int pj::MediaConfig::jbMaxPre |
Jitter buffer maximum prefetch delay in msec.
Default: -1 (to use default stream settings, currently 80% of jbMax)
◆ jbMax
int pj::MediaConfig::jbMax |
Set maximum delay that can be accomodated by the jitter buffer msec.
Default: -1 (to use default stream settings, currently 500 msec)
◆ jbDiscardAlgo
Set the algorithm the jitter buffer uses to discard frames in order to adjust the latency.
Default: PJMEDIA_JB_DISCARD_PROGRESSIVE
◆ sndAutoCloseTime
int pj::MediaConfig::sndAutoCloseTime |
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
◆ vidPreviewEnableNative
bool pj::MediaConfig::vidPreviewEnableNative |
Specify whether built-in/native preview should be used if available. In some systems, video input devices have built-in capability to show preview window of the device. Using this built-in preview is preferable as it consumes less CPU power. If built-in preview is not available, the library will perform software rendering of the input. If this field is set to PJ_FALSE, software preview will always be used.
Default: PJ_TRUE
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.
|