[Pkg-voip-commits] r7767 - in /asterisk/branches/lenny/debian: changelog patches/recording-speed patches/series
paravoid at alioth.debian.org
paravoid at alioth.debian.org
Sat Nov 7 08:44:12 UTC 2009
Author: paravoid
Date: Sat Nov 7 08:44:12 2009
New Revision: 7767
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=7767
Log:
Fix a data loss bug in which recorded calls using MixMonitor() were
recorded at high speed. (Closes: #535968)
Added:
asterisk/branches/lenny/debian/patches/recording-speed
Modified:
asterisk/branches/lenny/debian/changelog
asterisk/branches/lenny/debian/patches/series
Modified: asterisk/branches/lenny/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/lenny/debian/changelog?rev=7767&op=diff
==============================================================================
--- asterisk/branches/lenny/debian/changelog (original)
+++ asterisk/branches/lenny/debian/changelog Sat Nov 7 08:44:12 2009
@@ -12,9 +12,11 @@
the upstream bug report and preparing a fix. (Closes: #521641)
* bristuff: don't priority jump to n+201 if priority jumping is disabled.
Thanks to Tim Retout for the report and fix (Closes: #537055)
+ * Fix a data loss bug in which recorded calls using MixMonitor() were
+ recorded at high speed. (Closes: #535968)
* Create the /usr/share/asterisk/agi-bin directory. (Closes: #463983)
- -- Faidon Liambotis <paravoid at debian.org> Sat, 07 Nov 2009 10:35:54 +0200
+ -- Faidon Liambotis <paravoid at debian.org> Sat, 07 Nov 2009 10:42:36 +0200
asterisk (1:1.4.21.2~dfsg-3) unstable; urgency=medium
Added: asterisk/branches/lenny/debian/patches/recording-speed
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/lenny/debian/patches/recording-speed?rev=7767&op=file
==============================================================================
--- asterisk/branches/lenny/debian/patches/recording-speed (added)
+++ asterisk/branches/lenny/debian/patches/recording-speed Sat Nov 7 08:44:12 2009
@@ -1,0 +1,40 @@
+Recorded calls using MixMonitor() result in data loss,
+since the recordings are (recorded and) played back at high speed.
+
+Debian #535968
+Upstream #13005, r149204
+
+--- a/include/asterisk/audiohook.h
++++ b/include/asterisk/audiohook.h
+@@ -56,6 +56,8 @@ enum ast_audiohook_flags {
+ AST_AUDIOHOOK_TRIGGER_SYNC = (1 << 2), /*!< Audiohook wants to be triggered when both sides have combined audio available */
+ };
+
++#define AST_AUDIOHOOK_SYNC_TOLERANCE 100 /*< Tolerance in milliseconds for audiohooks synchronization */
++
+ struct ast_audiohook;
+
+ /*! \brief Callback function for manipulate audiohook type
+--- a/main/audiohook.c
++++ b/main/audiohook.c
+@@ -130,12 +130,19 @@ int ast_audiohook_write_frame(struct ast
+ struct ast_slinfactory *factory = (direction == AST_AUDIOHOOK_DIRECTION_READ ? &audiohook->read_factory : &audiohook->write_factory);
+ struct ast_slinfactory *other_factory = (direction == AST_AUDIOHOOK_DIRECTION_READ ? &audiohook->write_factory : &audiohook->read_factory);
+ struct timeval *time = (direction == AST_AUDIOHOOK_DIRECTION_READ ? &audiohook->read_time : &audiohook->write_time), previous_time = *time;
++ int our_factory_ms;
++ int other_factory_samples;
++ int other_factory_ms;
+
+ /* Update last feeding time to be current */
+ *time = ast_tvnow();
+
++ our_factory_ms = ast_tvdiff_ms(*time, previous_time) + (ast_slinfactory_available(factory) / 8);
++ other_factory_samples = ast_slinfactory_available(other_factory);
++ other_factory_ms = other_factory_samples / 8;
++
+ /* If we are using a sync trigger and this factory suddenly got audio fed in after a lapse, then flush both factories to ensure they remain in sync */
+- if (ast_test_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC) && ast_slinfactory_available(other_factory) && (ast_tvdiff_ms(*time, previous_time) > (ast_slinfactory_available(other_factory) / 8))) {
++ if (ast_test_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC) && other_factory_samples && (our_factory_ms - other_factory_ms > AST_AUDIOHOOK_SYNC_TOLERANCE)) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Flushing audiohook %p so it remains in sync\n", audiohook);
+ ast_slinfactory_flush(factory);
Modified: asterisk/branches/lenny/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/lenny/debian/patches/series?rev=7767&op=diff
==============================================================================
--- asterisk/branches/lenny/debian/patches/series (original)
+++ asterisk/branches/lenny/debian/patches/series Sat Nov 7 08:44:12 2009
@@ -89,6 +89,7 @@
zap-fix-cause34
### lenny fixes
+recording-speed
iax2-encryption-fix
AST-2009-001
More information about the Pkg-voip-commits
mailing list