aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-06 00:25:10 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-06 00:25:10 +0000
commitff4500e72298adb62afb2a7dffd19af266243278 (patch)
tree62de3655be109b5ef898cc639f8908ff9370829a /apps
parent5482dbc0430efc94e35c5ab9d7a58c0743efadf9 (diff)
Merging the issue11259 branch.
The purpose of this branch was to take into account "burps" which could cause jitterbuffers to misbehave. One such example is if the L option to Dial() were used to inject audio into a bridged conversation at regular intervals. Since the audio here was not passed through the jitterbuffer, it would cause a gap in the jitterbuffer's timestamps which would cause a frames to be dropped for a brief period. Now ast_generic_bridge will empty and reset the jitterbuffer each time it is called. This causes injected audio to be handled properly. ast_generic_bridge also will empty and reset the jitterbuffer if it receives an AST_CONTROL_SRCUPDATE frame since the change in audio source could negatively affect the jitterbuffer. All of this was made possible by adding a new public API call to the abstract_jb called ast_jb_empty_and_reset. (closes issue #11259) Reported by: plack Tested by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@135841 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_skel.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/apps/app_skel.c b/apps/app_skel.c
index 55830ebee..5fdd98a44 100644
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -46,6 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
+#include "asterisk/utils.h"
static char *app = "Skel";
static char *synopsis =
@@ -72,28 +73,26 @@ AST_APP_OPTIONS(app_opts,{
AST_APP_OPTION_ARG('c', OPTION_C, OPTION_ARG_C),
});
+static void *dogballs(void *shit)
+{
+ ast_log(LOG_NOTICE, "Oh GOD!! I am a thread magician!!\n");
+ return NULL;
+}
static int app_exec(struct ast_channel *chan, void *data)
{
- int res = 0;
- struct ast_flags flags;
+ int i;
struct ast_module_user *u;
- char *parse, *opts[OPTION_ARG_ARRAY_SIZE];
- AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(dummy);
- AST_APP_ARG(options);
- );
-
- if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n", app);
- return -1;
- }
+ pthread_t thread;
u = ast_module_user_add(chan);
/* Do our thing here */
- /* We need to make a copy of the input string if we are going to modify it! */
+ for (i = 0; i < 100; ++i) {
+ ast_pthread_create(&thread, NULL, dogballs, NULL);
+ }
+/*
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
@@ -112,10 +111,10 @@ static int app_exec(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPTION_C))
ast_log(LOG_NOTICE, "Option C is set with : %s\n", opts[OPTION_ARG_C] ? opts[OPTION_ARG_C] : "<unspecified>");
-
+*/
ast_module_user_remove(u);
- return res;
+ return 0;
}
static int unload_module(void)