diff options
author | Jonathan Rose <jrose@digium.com> | 2014-04-18 20:09:24 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2014-04-18 20:09:24 +0000 |
commit | b9d7dfcc62c80d2b2827dd7b70701dfb21512c13 (patch) | |
tree | 5d564284aeb95084327ad944a2e358829e67ba6a /res/stasis | |
parent | 06657c92e61340a9bc3e0d89fa676f93e6581ef1 (diff) |
ARI: Make bridges/{bridgeID}/play queue sound files
Previously multiple play actions against a bridge at one time would cause
the sounds to play simultaneously on the bridge. Now if a sound is already
playing, the play action will queue playback to occur after the completion
of other sounds currently on the queue.
(closes issue ASTERISK-22677)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/3379/
........
Merged revisions 412639 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/stasis')
-rw-r--r-- | res/stasis/control.c | 10 | ||||
-rw-r--r-- | res/stasis/control.h | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/res/stasis/control.c b/res/stasis/control.c index d91a9f8d0..88ef8969d 100644 --- a/res/stasis/control.c +++ b/res/stasis/control.c @@ -368,12 +368,22 @@ void stasis_app_control_clear_roles(struct stasis_app_control *control) ast_channel_clear_bridge_roles(control->channel); } +int control_command_count(struct stasis_app_control *control) +{ + return ao2_container_count(control->command_queue); +} + int control_is_done(struct stasis_app_control *control) { /* Called from stasis_app_exec thread; no lock needed */ return control->is_done; } +void control_mark_done(struct stasis_app_control *control) +{ + control->is_done = 1; +} + struct stasis_app_control_continue_data { char context[AST_MAX_CONTEXT]; char extension[AST_MAX_EXTENSION]; diff --git a/res/stasis/control.h b/res/stasis/control.h index 6b602e770..0febd8438 100644 --- a/res/stasis/control.h +++ b/res/stasis/control.h @@ -58,6 +58,15 @@ int control_dispatch_all(struct stasis_app_control *control, void control_wait(struct stasis_app_control *control); /*! + * \brief Returns the count of items in a control's command queue. + * + * \param control Control to count commands on + * + * \retval number of commands in the command que + */ +int control_command_count(struct stasis_app_control *control); + +/*! * \brief Returns true if control_continue() has been called on this \a control. * * \param control Control to query. @@ -66,5 +75,7 @@ void control_wait(struct stasis_app_control *control); */ int control_is_done(struct stasis_app_control *control); +void control_mark_done(struct stasis_app_control *control); + #endif /* _ASTERISK_RES_STASIS_CONTROL_H */ |