summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-11-21 09:06:47 +0000
committerBenny Prijono <bennylp@teluu.com>2006-11-21 09:06:47 +0000
commiteff696b734aeab0179be46941cf5911045b69cfe (patch)
treee1303d919e179f5c6959fbda24bb6d7e2f3f0878 /pjsip
parentc0d24ae7ca8ca82621b174879dc11cdf0f5a499a (diff)
Added jitter buffer settings in PJSUA-API media config
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@813 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h31
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c4
2 files changed, 35 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 12503780..ec040fb9 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -2324,6 +2324,36 @@ struct pjsua_media_config
* Default: PJSUA_DEFAULT_EC_TAIL_LEN
*/
unsigned ec_tail_len;
+
+ /**
+ * 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)
+ */
+ int jb_init;
+
+ /**
+ * Jitter buffer minimum prefetch delay in msec.
+ *
+ * Default: -1 (to use default stream settings, currently 60 msec)
+ */
+ int jb_min_pre;
+
+ /**
+ * Jitter buffer maximum prefetch delay in msec.
+ *
+ * Default: -1 (to use default stream settings, currently 240 msec)
+ */
+ int jb_max_pre;
+
+ /**
+ * Set maximum delay that can be accomodated by the jitter buffer msec.
+ *
+ * Default: -1 (to use default stream settings, currently 360 msec)
+ */
+ int jb_max;
+
};
@@ -2343,6 +2373,7 @@ PJ_INLINE(void) pjsua_media_config_default(pjsua_media_config *cfg)
cfg->quality = PJSUA_DEFAULT_CODEC_QUALITY;
cfg->ilbc_mode = PJSUA_DEFAULT_ILBC_MODE;
cfg->ec_tail_len = PJSUA_DEFAULT_EC_TAIL_LEN;
+ cfg->jb_init = cfg->jb_min_pre = cfg->jb_max_pre = cfg->jb_max = -1;
}
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 1df12e5c..d5530570 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -2131,6 +2131,10 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv,
/* Optionally, application may modify other stream settings here
* (such as jitter buffer parameters, codec ptime, etc.)
*/
+ sess_info.stream_info[0].jb_init = pjsua_var.media_cfg.jb_init;
+ sess_info.stream_info[0].jb_min_pre = pjsua_var.media_cfg.jb_min_pre;
+ sess_info.stream_info[0].jb_max_pre = pjsua_var.media_cfg.jb_max_pre;
+ sess_info.stream_info[0].jb_max = pjsua_var.media_cfg.jb_max;
/* Create session based on session info. */
status = pjmedia_session_create( pjsua_var.med_endpt, &sess_info,