[svn-commits] branch group/rtpjitterbuffer r30215 -
/team/group/rtpjitterbuffer/channels/
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Thu May 25 07:04:54 MST 2006
Author: russell
Date: Thu May 25 09:04:54 2006
New Revision: 30215
URL: http://svn.digium.com/view/asterisk?rev=30215&view=rev
Log:
add generic jitterbuffer support to chan_oss
Modified:
team/group/rtpjitterbuffer/channels/chan_alsa.c
team/group/rtpjitterbuffer/channels/chan_oss.c
Modified: team/group/rtpjitterbuffer/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/group/rtpjitterbuffer/channels/chan_alsa.c?rev=30215&r1=30214&r2=30215&view=diff
==============================================================================
--- team/group/rtpjitterbuffer/channels/chan_alsa.c (original)
+++ team/group/rtpjitterbuffer/channels/chan_alsa.c Thu May 25 09:04:54 2006
@@ -826,7 +826,8 @@
}
}
#ifdef AST_JB
- ast_jb_configure(tmp, &global_jbconf);
+ if (tmp)
+ ast_jb_configure(tmp, &global_jbconf);
#endif
}
return tmp;
Modified: team/group/rtpjitterbuffer/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/group/rtpjitterbuffer/channels/chan_oss.c?rev=30215&r1=30214&r2=30215&view=diff
==============================================================================
--- team/group/rtpjitterbuffer/channels/chan_oss.c (original)
+++ team/group/rtpjitterbuffer/channels/chan_oss.c Thu May 25 09:04:54 2006
@@ -81,6 +81,19 @@
#include "ringtone.h"
#include "ring10.h"
#include "answer.h"
+
+#ifdef AST_JB
+#include "asterisk/abstract_jb.h"
+/* Global jitterbuffer configuration - by default, jb is disabled */
+static struct ast_jb_conf default_jbconf =
+{
+ .flags = 0,
+ .max_size = -1,
+ .resync_threshold = -1,
+ .impl = ""
+};
+static struct ast_jb_conf global_jbconf;
+#endif /* AST_JB */
/*
* Basic mode of operation:
@@ -981,6 +994,11 @@
/* XXX what about usecnt ? */
}
}
+#ifdef AST_JB
+ if (c)
+ ast_jb_configure(c, &global_jbconf);
+#endif
+
return c;
}
@@ -1407,6 +1425,12 @@
for (v = ast_variable_browse(cfg, ctg);v; v=v->next) {
M_START(v->name, v->value);
+#ifdef AST_JB
+ /* handle jb conf */
+ if (!ast_jb_read_conf(&global_jbconf, v->name, v->value))
+ continue;
+#endif /* AST_JB */
+
M_BOOL("autoanswer", o->autoanswer)
M_BOOL("autohangup", o->autohangup)
M_BOOL("overridecontext", o->overridecontext)
@@ -1472,6 +1496,11 @@
int i;
struct ast_config *cfg;
+#ifdef AST_JB
+ /* Copy the default jb config over global_jbconf */
+ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
+#endif /* AST_JB */
+
/* load config file */
cfg = ast_config_load(config);
if (cfg != NULL) {
More information about the svn-commits
mailing list