From 8162fc4547f022217c84a8b01dacc0abdec40f12 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 10 Jan 2008 12:09:26 +0000 Subject: Added PJSUA_DEFAULT_AUDIO_FRAME_PTIME setting and changed default iLBC mode from 20 to 30 git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1675 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua.h | 32 ++++++++++++++++++++++++-------- pjsip/src/pjsua-lib/pjsua_core.c | 4 ++-- 2 files changed, 26 insertions(+), 10 deletions(-) (limited to 'pjsip') diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index c548e716..604f4f81 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -3541,35 +3541,49 @@ PJ_DECL(pj_status_t) pjsua_im_typing(pjsua_acc_id acc_id, */ /** - * Max ports in the conference bridge. + * Max ports in the conference bridge. This setting is the default value + * for pjsua_media_config.max_media_ports. */ #ifndef PJSUA_MAX_CONF_PORTS # define PJSUA_MAX_CONF_PORTS 254 #endif /** - * The default clock rate to be used by the conference bridge. + * The default clock rate to be used by the conference bridge. This setting + * is the default value for pjsua_media_config.clock_rate. */ #ifndef PJSUA_DEFAULT_CLOCK_RATE # define PJSUA_DEFAULT_CLOCK_RATE 16000 #endif /** - * Default codec quality settings. + * Default frame length in the conference bridge. This setting + * is the default value for pjsua_media_config.audio_frame_ptime. + */ +#ifndef PJSUA_DEFAULT_AUDIO_FRAME_PTIME +# define PJSUA_DEFAULT_AUDIO_FRAME_PTIME 10 +#endif + + +/** + * Default codec quality settings. This setting is the default value + * for pjsua_media_config.quality. */ #ifndef PJSUA_DEFAULT_CODEC_QUALITY # define PJSUA_DEFAULT_CODEC_QUALITY 5 #endif /** - * Default iLBC mode. + * Default iLBC mode. This setting is the default value for + * pjsua_media_config.ilbc_mode. */ #ifndef PJSUA_DEFAULT_ILBC_MODE -# define PJSUA_DEFAULT_ILBC_MODE 20 +# define PJSUA_DEFAULT_ILBC_MODE 30 #endif /** - * The default echo canceller tail length. + * The default echo canceller tail length. This setting + * is the default value for pjsua_media_config.ec_tail_len. */ #ifndef PJSUA_DEFAULT_EC_TAIL_LEN # define PJSUA_DEFAULT_EC_TAIL_LEN 200 @@ -3620,7 +3634,7 @@ struct pjsua_media_config * bridge. Specifying lower ptime will normally reduce the * latency. * - * Default: 10 (miliseconds) + * Default value: PJSUA_DEFAULT_AUDIO_FRAME_PTIME */ unsigned audio_frame_ptime; @@ -3630,6 +3644,8 @@ struct pjsua_media_config * (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 */ unsigned max_media_ports; @@ -3680,7 +3696,7 @@ struct pjsua_media_config /** * iLBC mode (20 or 30). * - * Default: 20 (PJSUA_DEFAULT_ILBC_MODE) + * Default: 30 (PJSUA_DEFAULT_ILBC_MODE) */ unsigned ilbc_mode; diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index 985608cc..316f467f 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -154,8 +154,8 @@ PJ_DEF(void) pjsua_media_config_default(pjsua_media_config *cfg) pj_bzero(cfg, sizeof(*cfg)); cfg->clock_rate = PJSUA_DEFAULT_CLOCK_RATE; - cfg->audio_frame_ptime = 10; - cfg->max_media_ports = 32; + cfg->audio_frame_ptime = PJSUA_DEFAULT_AUDIO_FRAME_PTIME; + cfg->max_media_ports = PJSUA_MAX_CONF_PORTS; cfg->has_ioqueue = PJ_TRUE; cfg->thread_cnt = 1; cfg->quality = PJSUA_DEFAULT_CODEC_QUALITY; -- cgit v1.2.3