[svn-commits] dvossel: trunk r249893 - in /trunk: channels/ configs/ include/asterisk/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 2 13:08:46 CST 2010


Author: dvossel
Date: Tue Mar  2 13:08:38 2010
New Revision: 249893

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249893
Log:
fixes adaptive jitterbuffer configuration

When configuring the adaptive jitterbuffer, the target_extra
value not only could not be set from the configuration, but was
not even being set to its proper default.  This value is required
in order for the adaptive jitterbuffer to work correctly.  To resolve
this a config option has been added to expose this value to the conf
files, and a default value is provided when no config specific value
is present.


Modified:
    trunk/channels/chan_alsa.c
    trunk/channels/chan_console.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_gtalk.c
    trunk/channels/chan_h323.c
    trunk/channels/chan_jingle.c
    trunk/channels/chan_local.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_oss.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/channels/chan_usbradio.c
    trunk/channels/misdn_config.c
    trunk/configs/alsa.conf.sample
    trunk/configs/chan_dahdi.conf.sample
    trunk/configs/console.conf.sample
    trunk/configs/mgcp.conf.sample
    trunk/configs/misdn.conf.sample
    trunk/configs/oss.conf.sample
    trunk/configs/sip.conf.sample
    trunk/configs/usbradio.conf.sample
    trunk/include/asterisk/abstract_jb.h
    trunk/main/abstract_jb.c

Modified: trunk/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_alsa.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_alsa.c (original)
+++ trunk/channels/chan_alsa.c Tue Mar  2 13:08:38 2010
@@ -62,7 +62,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_console.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_console.c (original)
+++ trunk/channels/chan_console.c Tue Mar  2 13:08:38 2010
@@ -177,7 +177,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Mar  2 13:08:38 2010
@@ -269,7 +269,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Tue Mar  2 13:08:38 2010
@@ -79,7 +79,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_h323.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Tue Mar  2 13:08:38 2010
@@ -118,7 +118,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_jingle.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_jingle.c (original)
+++ trunk/channels/chan_jingle.c Tue Mar  2 13:08:38 2010
@@ -77,7 +77,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Mar  2 13:08:38 2010
@@ -58,6 +58,7 @@
 	.max_size = -1,
 	.resync_threshold = -1,
 	.impl = "",
+	.target_extra = -1,
 };
 
 static struct ast_channel *local_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause);

Modified: trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Tue Mar  2 13:08:38 2010
@@ -99,7 +99,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_oss.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Tue Mar  2 13:08:38 2010
@@ -72,6 +72,7 @@
 	.max_size = -1,
 	.resync_threshold = -1,
 	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Mar  2 13:08:38 2010
@@ -555,7 +555,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;                /*!< Global jitterbuffer configuration */
 

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Tue Mar  2 13:08:38 2010
@@ -220,7 +220,8 @@
 	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Tue Mar  2 13:08:38 2010
@@ -188,10 +188,11 @@
 /*! \brief Global jitterbuffer configuration - by default, jb is disabled */
 static struct ast_jb_conf default_jbconf =
 {
-        .flags = 0,
+	.flags = 0,
 	.max_size = -1,
 	.resync_threshold = -1,
-	.impl = ""
+	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 				

Modified: trunk/channels/chan_usbradio.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_usbradio.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/chan_usbradio.c (original)
+++ trunk/channels/chan_usbradio.c Tue Mar  2 13:08:38 2010
@@ -193,6 +193,7 @@
 	.max_size = -1,
 	.resync_threshold = -1,
 	.impl = "",
+	.target_extra = -1,
 };
 static struct ast_jb_conf global_jbconf;
 

Modified: trunk/channels/misdn_config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/misdn_config.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/channels/misdn_config.c (original)
+++ trunk/channels/misdn_config.c Tue Mar  2 13:08:38 2010
@@ -54,6 +54,7 @@
 	.max_size = -1,
 	.resync_threshold = -1,
 	.impl = "",
+	.target_extra = -1,
 };
 
 static struct ast_jb_conf global_jbconf;

Modified: trunk/configs/alsa.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/alsa.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/alsa.conf.sample (original)
+++ trunk/configs/alsa.conf.sample Tue Mar  2 13:08:38 2010
@@ -66,6 +66,13 @@
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 

Modified: trunk/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/chan_dahdi.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/chan_dahdi.conf.sample (original)
+++ trunk/configs/chan_dahdi.conf.sample Tue Mar  2 13:08:38 2010
@@ -855,6 +855,13 @@
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 ;

Modified: trunk/configs/console.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/console.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/console.conf.sample (original)
+++ trunk/configs/console.conf.sample Tue Mar  2 13:08:38 2010
@@ -64,6 +64,13 @@
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 

Modified: trunk/configs/mgcp.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/mgcp.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/mgcp.conf.sample (original)
+++ trunk/configs/mgcp.conf.sample Tue Mar  2 13:08:38 2010
@@ -39,6 +39,13 @@
                               ; channel. Two implementations are currently available - "fixed"
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
+
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
 
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------

Modified: trunk/configs/misdn.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/misdn.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/misdn.conf.sample (original)
+++ trunk/configs/misdn.conf.sample Tue Mar  2 13:08:38 2010
@@ -132,6 +132,13 @@
                               ; (with size always equals to jbmaxsize) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 

Modified: trunk/configs/oss.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/oss.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/oss.conf.sample (original)
+++ trunk/configs/oss.conf.sample Tue Mar  2 13:08:38 2010
@@ -65,6 +65,13 @@
                                   ; channel. Two implementations are currently available - "fixed"
                                   ; (with size always equals to jbmax-size) and "adaptive" (with
                                   ; variable size, actually the new jb of IAX2). Defaults to fixed.
+
+    ; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                                  ; The option represents the number of milliseconds by which the new
+                                  ; jitter buffer will pad its size. the default is 40, so without
+                                  ; modification, the new jitter buffer will set its size to the jitter
+                                  ; value plus 40 milliseconds. increasing this value may help if your
+                                  ; network normally has low jitter, but occasionally has spikes.
 
     ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
     ;-----------------------------------------------------------------------------------

Modified: trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Tue Mar  2 13:08:38 2010
@@ -891,6 +891,13 @@
                               ; channel. Two implementations are currently available - "fixed"
                               ; (with size always equals to jbmaxsize) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
+
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new jitter buffer
+                              ; will pad its size. the default is 40, so without modification, the new
+                              ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
+                              ; increasing this value may help if your network normally has low jitter,
+                              ; but occasionally has spikes.
 
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------

Modified: trunk/configs/usbradio.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/usbradio.conf.sample?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/configs/usbradio.conf.sample (original)
+++ trunk/configs/usbradio.conf.sample Tue Mar  2 13:08:38 2010
@@ -48,6 +48,13 @@
                               ; (with size always equals to jbmax-size) and "adaptive" (with
                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
 
+; jbtargetextra = 40          ; This option only affects the jb when 'jbimpl = adaptive' is set.
+                              ; The option represents the number of milliseconds by which the new
+                              ; jitter buffer will pad its size. the default is 40, so without
+                              ; modification, the new jitter buffer will set its size to the jitter
+                              ; value plus 40 milliseconds. increasing this value may help if your
+                              ; network normally has low jitter, but occasionally has spikes.
+
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
 ;-----------------------------------------------------------------------------------
 

Modified: trunk/include/asterisk/abstract_jb.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/abstract_jb.h?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/include/asterisk/abstract_jb.h (original)
+++ trunk/include/asterisk/abstract_jb.h Tue Mar  2 13:08:38 2010
@@ -59,9 +59,11 @@
 	/*! \brief Max size of the jitterbuffer implementation. */
 	long max_size;
 	/*! \brief Resynchronization threshold of the jitterbuffer implementation. */
- 	long resync_threshold;
+	long resync_threshold;
 	/*! \brief Name of the jitterbuffer implementation to be used. */
- 	char impl[AST_JB_IMPL_NAME_SIZE];
+	char impl[AST_JB_IMPL_NAME_SIZE];
+	/*! \brief amount of additional jitterbuffer adjustment */
+	long target_extra;
 };
 
 
@@ -71,6 +73,7 @@
 #define AST_JB_CONF_FORCE "force"
 #define AST_JB_CONF_MAX_SIZE "maxsize"
 #define AST_JB_CONF_RESYNCH_THRESHOLD "resyncthreshold"
+#define AST_JB_CONF_TARGET_EXTRA "targetextra"
 #define AST_JB_CONF_IMPL "impl"
 #define AST_JB_CONF_LOG "log"
 

Modified: trunk/main/abstract_jb.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/abstract_jb.c?view=diff&rev=249893&r1=249892&r2=249893
==============================================================================
--- trunk/main/abstract_jb.c (original)
+++ trunk/main/abstract_jb.c Tue Mar  2 13:08:38 2010
@@ -592,6 +592,10 @@
 	} else if (!strcasecmp(name, AST_JB_CONF_IMPL)) {
 		if (!ast_strlen_zero(value))
 			snprintf(conf->impl, sizeof(conf->impl), "%s", value);
+	} else if (!strcasecmp(name, AST_JB_CONF_TARGET_EXTRA)) {
+		if (sscanf(value, "%30d", &tmp) == 1) {
+			conf->target_extra = tmp;
+		}
 	} else if (!strcasecmp(name, AST_JB_CONF_LOG)) {
 		ast_set2_flag(conf, ast_true(value), AST_JB_LOG);
 	} else {
@@ -738,6 +742,7 @@
 		jbconf.max_jitterbuf = general_config->max_size;
 		jbconf.resync_threshold = general_config->resync_threshold;
 		jbconf.max_contig_interp = 10;
+		jbconf.target_extra = general_config->target_extra;
 		jb_setconf(adaptivejb, &jbconf);
 	}
 




More information about the svn-commits mailing list