[asterisk-commits] mjordan: branch mjordan/AST_16981 r334226 - in /team/mjordan/AST_16981/1.8: ....
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 1 12:22:01 CDT 2011
Author: mjordan
Date: Thu Sep 1 12:22:00 2011
New Revision: 334226
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334226
Log: (empty)
Added:
team/mjordan/AST_16981/1.8/ (props changed)
- copied from r333944, branches/1.8/
team/mjordan/AST_16981/1.8/addons/ooh323c/src/ooCalls.c
- copied unchanged from r334156, branches/1.8/addons/ooh323c/src/ooCalls.c
team/mjordan/AST_16981/1.8/addons/ooh323c/src/ooCalls.h
- copied unchanged from r334156, branches/1.8/addons/ooh323c/src/ooCalls.h
team/mjordan/AST_16981/1.8/addons/ooh323c/src/ooGkClient.c
- copied unchanged from r334156, branches/1.8/addons/ooh323c/src/ooGkClient.c
team/mjordan/AST_16981/1.8/addons/ooh323c/src/oochannels.c
- copied unchanged from r334156, branches/1.8/addons/ooh323c/src/oochannels.c
team/mjordan/AST_16981/1.8/addons/ooh323c/src/ooh323.c
- copied unchanged from r334156, branches/1.8/addons/ooh323c/src/ooh323.c
team/mjordan/AST_16981/1.8/addons/ooh323c/src/ooq931.c
- copied unchanged from r334156, branches/1.8/addons/ooh323c/src/ooq931.c
team/mjordan/AST_16981/1.8/channels/chan_agent.c
- copied unchanged from r334156, branches/1.8/channels/chan_agent.c
team/mjordan/AST_16981/1.8/channels/chan_dahdi.c
- copied unchanged from r334156, branches/1.8/channels/chan_dahdi.c
team/mjordan/AST_16981/1.8/channels/chan_sip.c
- copied unchanged from r334156, branches/1.8/channels/chan_sip.c
team/mjordan/AST_16981/1.8/main/channel.c
- copied unchanged from r334156, branches/1.8/main/channel.c
Modified:
team/mjordan/AST_16981/1.8/main/app.c
Propchange: team/mjordan/AST_16981/1.8/
------------------------------------------------------------------------------
--- branch-1.6.2-blocked (added)
+++ branch-1.6.2-blocked Thu Sep 1 12:22:00 2011
@@ -1,0 +1,1 @@
+/branches/1.6.2:279852,279883,280227,280556,280812,282668,299533,303273,309348,320506,330490,330505
Propchange: team/mjordan/AST_16981/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.
Propchange: team/mjordan/AST_16981/1.8/
------------------------------------------------------------------------------
--- reviewboard:url (added)
+++ reviewboard:url Thu Sep 1 12:22:00 2011
@@ -1,0 +1,1 @@
+https://reviewboard.asterisk.org
Propchange: team/mjordan/AST_16981/1.8/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Thu Sep 1 12:22:00 2011
@@ -1,0 +1,1 @@
+menuselect https://origsvn.digium.com/svn/menuselect/trunk
Propchange: team/mjordan/AST_16981/1.8/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Sep 1 12:22:00 2011
@@ -1,0 +1,26 @@
+asterisk
+defaults.h
+ast_expr2.output
+.version
+.depend
+.applied
+mpg123-0.59r
+mpg123-0.59r.tar.gz
+update.out
+.lastclean
+.cleancount
+.tags-depend
+.tags-sources
+tags
+TAGS
+testexpr2
+makeopts
+menuselect.makeopts
+menuselect.makedeps
+config.status
+config.log
+menuselect-tree
+autom4te.cache
+makeopts.embed_rules
+aclocal.m4
+update.log
Propchange: team/mjordan/AST_16981/1.8/
------------------------------------------------------------------------------
svn:mergeinfo = /be/branches/C.3:256426
Modified: team/mjordan/AST_16981/1.8/main/app.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/AST_16981/1.8/main/app.c?view=diff&rev=334226&r1=333944&r2=334226
==============================================================================
--- team/mjordan/AST_16981/1.8/main/app.c (original)
+++ team/mjordan/AST_16981/1.8/main/app.c Thu Sep 1 12:22:00 2011
@@ -747,7 +747,6 @@
struct ast_dsp *sildet = NULL; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
- int olddspsilence = 0;
int rfmt = 0;
struct ast_silence_generator *silgen = NULL;
char prependfile[80];
@@ -874,14 +873,15 @@
if (maxsilence > 0) {
dspsilence = 0;
ast_dsp_silence(sildet, f, &dspsilence);
- if (olddspsilence > dspsilence) {
- totalsilence += olddspsilence;
+ if (dspsilence) {
+ totalsilence = dspsilence;
+ } else {
+ totalsilence = 0;
}
- olddspsilence = dspsilence;
-
- if (dspsilence > maxsilence) {
+
+ if (totalsilence > maxsilence) {
/* Ended happily with silence */
- ast_verb(3, "Recording automatically stopped after a silence of %d seconds\n", dspsilence/1000);
+ ast_verb(3, "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
res = 'S';
outmsg = 2;
break;
@@ -954,18 +954,7 @@
* closed (which would create a resource leak).
*/
*duration = others[0] ? ast_tellstream(others[0]) / 8000 : 0;
-
if (!prepend) {
- /* Reduce duration by a total silence amount */
- if (olddspsilence <= dspsilence) {
- totalsilence += dspsilence;
- }
-
- if (totalsilence > 0)
- *duration -= (totalsilence - 200) / 1000;
- if (*duration < 0) {
- *duration = 0;
- }
for (x = 0; x < fmtcnt; x++) {
if (!others[x]) {
break;
@@ -975,9 +964,16 @@
* off the recording. However, if we ended with '#', we don't want
* to trim ANY part of the recording.
*/
- if (res > 0 && dspsilence) {
- /* rewind only the trailing silence */
- ast_stream_rewind(others[x], dspsilence - 200);
+ if (res > 0 && totalsilence) {
+ /* rewind only the trailing silence */
+ ast_stream_rewind(others[x], totalsilence - 200);
+ /* Reduce duration by a corresponding amount */
+ if (x == 0 && *duration) {
+ *duration -= (totalsilence - 200) / 1000;
+ if (*duration < 0) {
+ *duration = 0;
+ }
+ }
}
ast_truncstream(others[x]);
ast_closestream(others[x]);
@@ -995,8 +991,8 @@
break;
}
/*!\note Same logic as above. */
- if (dspsilence) {
- ast_stream_rewind(others[x], dspsilence - 200);
+ if (totalsilence) {
+ ast_stream_rewind(others[x], totalsilence - 200);
}
ast_truncstream(others[x]);
/* add the original file too */
More information about the asterisk-commits
mailing list