aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 18:26:37 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 18:26:37 +0000
commit7c07a7987bf7a6c2b8abc6028431efbf4346a66d (patch)
tree30072642033dae96e60d35bbd88fdd74b62b75a9 /include
parentde7685531815fc619a99c3c80547a8abf4193157 (diff)
Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait).
(closes issue #11945) Reported by: xheliox git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108083 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/audiohook.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index a7de27460..cafc5ef14 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -53,6 +53,7 @@ enum ast_audiohook_flags {
AST_AUDIOHOOK_TRIGGER_READ = (1 << 0), /*!< Audiohook wants to be triggered when reading audio in */
AST_AUDIOHOOK_TRIGGER_WRITE = (2 << 0), /*!< Audiohook wants to be triggered when writing audio out */
AST_AUDIOHOOK_WANTS_DTMF = (1 << 1), /*!< Audiohook also wants to receive DTMF frames */
+ AST_AUDIOHOOK_TRIGGER_SYNC = (1 << 2), /*!< Audiohook wants to be triggered when both sides have combined audio available */
};
struct ast_audiohook;
@@ -82,6 +83,8 @@ struct ast_audiohook {
unsigned int flags; /*!< Flags on the audiohook */
struct ast_slinfactory read_factory; /*!< Factory where frames read from the channel, or read from the whisper source will go through */
struct ast_slinfactory write_factory; /*!< Factory where frames written to the channel will go through */
+ struct timeval read_time; /*!< Last time read factory was fed */
+ struct timeval write_time; /*!< Last time write factory was fed */
int format; /*!< Format translation path is setup as */
struct ast_trans_pvt *trans_pvt; /*!< Translation path for reading frames */
ast_audiohook_manipulate_callback manipulate_callback; /*!< Manipulation callback */