Home --> Documentations --> PJSIP Reference
#include <pjsua.h>
This structure describes media configuration, which will be specified when calling pjsua_init(). Application MUST initialize this structure by calling pjsua_media_config_default().
Forward declaration
◆ clock_rate
unsigned pjsua_media_config::clock_rate |
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).
◆ snd_clock_rate
unsigned pjsua_media_config::snd_clock_rate |
Clock rate to be applied when opening the sound device. If value is zero, conference bridge clock rate will be used.
◆ channel_count
unsigned pjsua_media_config::channel_count |
Channel count be applied when opening the sound device and conference bridge.
◆ audio_frame_ptime
unsigned pjsua_media_config::audio_frame_ptime |
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
◆ max_media_ports
unsigned pjsua_media_config::max_media_ports |
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
◆ has_ioqueue
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.
◆ thread_cnt
unsigned pjsua_media_config::thread_cnt |
Specify the number of worker threads to handle incoming RTP packets. A value of one is recommended for most applications.
◆ quality
unsigned pjsua_media_config::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 pjsua_media_config::ptime |
Specify default codec ptime.
Default: 0 (codec specific)
◆ no_vad
Disable VAD?
Default: 0 (codec specific)
◆ ilbc_mode
unsigned pjsua_media_config::ilbc_mode |
iLBC mode (20 or 30).
Default: 30 (PJSUA_DEFAULT_ILBC_MODE)
◆ tx_drop_pct
unsigned pjsua_media_config::tx_drop_pct |
Percentage of RTP packet to drop in TX direction (to simulate packet lost).
Default: 0
◆ rx_drop_pct
unsigned pjsua_media_config::rx_drop_pct |
Percentage of RTP packet to drop in RX direction (to simulate packet lost).
Default: 0
◆ ec_options
unsigned pjsua_media_config::ec_options |
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.
◆ ec_tail_len
unsigned pjsua_media_config::ec_tail_len |
Echo canceller tail length, in miliseconds.
Default: PJSUA_DEFAULT_EC_TAIL_LEN
◆ snd_rec_latency
unsigned pjsua_media_config::snd_rec_latency |
Audio capture buffer length, in milliseconds.
Default: PJMEDIA_SND_DEFAULT_REC_LATENCY
◆ snd_play_latency
unsigned pjsua_media_config::snd_play_latency |
Audio playback buffer length, in milliseconds.
Default: PJMEDIA_SND_DEFAULT_PLAY_LATENCY
◆ jb_init
int pjsua_media_config::jb_init |
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)
◆ jb_min_pre
int pjsua_media_config::jb_min_pre |
Jitter buffer minimum prefetch delay in msec.
Default: -1 (to use default stream settings, currently codec ptime)
◆ jb_max_pre
int pjsua_media_config::jb_max_pre |
Jitter buffer maximum prefetch delay in msec.
Default: -1 (to use default stream settings, currently 80% of jb_max)
◆ jb_max
int pjsua_media_config::jb_max |
Set maximum delay that can be accomodated by the jitter buffer msec.
Default: -1 (to use default stream settings, currently 500 msec)
◆ jb_discard_algo
Set the algorithm the jitter buffer uses to discard frames in order to adjust the latency.
Default: PJMEDIA_JB_DISCARD_PROGRESSIVE
◆ enable_ice
◆ ice_max_host_cands
int pjsua_media_config::ice_max_host_cands |
Set the maximum number of host candidates.
Default: -1 (maximum not set)
◆ ice_opt
◆ ice_no_rtcp
Disable RTCP component.
Default: no
◆ ice_always_update
pj_bool_t pjsua_media_config::ice_always_update |
Send re-INVITE/UPDATE every after ICE connectivity check regardless the default ICE transport address is changed or not. When this is set to PJ_FALSE, re-INVITE/UPDATE will be sent only when the default ICE transport address is changed.
Default: yes
◆ enable_turn
Enable TURN relay candidate in ICE.
◆ turn_server
pj_str_t pjsua_media_config::turn_server |
Specify TURN domain name or host name, in in "DOMAIN:PORT" or "HOST:PORT" format.
◆ turn_conn_type
Specify the connection type to be used to the TURN server. Valid values are PJ_TURN_TP_UDP, PJ_TURN_TP_TCP or PJ_TURN_TP_TLS.
Default: PJ_TURN_TP_UDP
◆ turn_auth_cred
Specify the credential to authenticate with the TURN server.
◆ turn_tls_setting
This specifies TLS settings for TLS transport. It is only be used when this TLS is used to connect to the TURN server.
◆ snd_auto_close_time
int pjsua_media_config::snd_auto_close_time |
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
◆ vid_preview_enable_native
pj_bool_t pjsua_media_config::vid_preview_enable_native |
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
◆ no_smart_media_update
pj_bool_t pjsua_media_config::no_smart_media_update |
Disable smart media update (ticket #1568). The smart media update will check for any changes in the media properties after a successful SDP negotiation and the media will only be reinitialized when any change is found. When it is disabled, media streams will always be reinitialized after a successful SDP negotiation.
Note for third party media, the smart media update requires stream info retrieval capability, see PJSUA_THIRD_PARTY_STREAM_HAS_GET_INFO.
Default: PJ_FALSE
◆ no_rtcp_sdes_bye
pj_bool_t pjsua_media_config::no_rtcp_sdes_bye |
Omit RTCP SDES and BYE in outgoing RTCP packet, this setting will be applied for both audio and video streams. Note that, when RTCP SDES and BYE are set to be omitted, RTCP SDES will still be sent once when the stream starts/stops and RTCP BYE will be sent once when the stream stops.
Default: PJ_FALSE
◆ on_aud_prev_play_frame
void(* pjsua_media_config::on_aud_prev_play_frame) (pjmedia_frame *frame) |
Optional callback for audio frame preview right before queued to the speaker. Notes:
- application MUST NOT block or perform long operation in the callback as the callback may be executed in sound device thread
- when using software echo cancellation, application MUST NOT modify the audio data from within the callback, otherwise the echo canceller will not work properly.
◆ on_aud_prev_rec_frame
void(* pjsua_media_config::on_aud_prev_rec_frame) (pjmedia_frame *frame) |
Optional callback for audio frame preview recorded from the microphone before being processed by any media component such as software echo canceller. Notes:
- application MUST NOT block or perform long operation in the callback as the callback may be executed in sound device thread
- when using software echo cancellation, application MUST NOT modify the audio data from within the callback, otherwise the echo canceller will not work properly.
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.
|