summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-06-15 15:02:26 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-06-15 15:02:26 -0500
commit1f2ab6e72a43daf65cdac97f999b3154cabfd2c3 (patch)
tree77cb89dec7a2237c8e69b2e6f99dadf8ddba7c59 /include
parent15c04db3bd976edc60393f6261c60ca779a1f8d2 (diff)
parentd6386a8f0ca635ba770c1d102f69361beebef7d6 (diff)
Merge "bridge: Add a deferred queue."
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/bridge_channel.h2
-rw-r--r--include/asterisk/bridge_channel_internal.h11
-rw-r--r--include/asterisk/bridge_technology.h3
3 files changed, 16 insertions, 0 deletions
diff --git a/include/asterisk/bridge_channel.h b/include/asterisk/bridge_channel.h
index dd72f3275..4d3326083 100644
--- a/include/asterisk/bridge_channel.h
+++ b/include/asterisk/bridge_channel.h
@@ -145,6 +145,8 @@ struct ast_bridge_channel {
AST_LIST_ENTRY(ast_bridge_channel) entry;
/*! Queue of outgoing frames to the channel. */
AST_LIST_HEAD_NOLOCK(, ast_frame) wr_queue;
+ /*! Queue of deferred frames, queued onto channel when other party joins. */
+ AST_LIST_HEAD_NOLOCK(, ast_frame) deferred_queue;
/*! Pipe to alert thread when frames are put into the wr_queue. */
int alert_pipe[2];
/*!
diff --git a/include/asterisk/bridge_channel_internal.h b/include/asterisk/bridge_channel_internal.h
index fb8e781e8..ba71e9fc4 100644
--- a/include/asterisk/bridge_channel_internal.h
+++ b/include/asterisk/bridge_channel_internal.h
@@ -98,6 +98,17 @@ void bridge_channel_settle_owed_events(struct ast_bridge *orig_bridge, struct as
/*!
* \internal
+ * \brief Queue any deferred frames on the channel.
+ * \since 13.17.0
+ *
+ * \param bridge_channel Channel that the deferred frames should be pulled from and queued to.
+ *
+ * \return Nothing
+ */
+void bridge_channel_queue_deferred_frames(struct ast_bridge_channel *bridge_channel);
+
+/*!
+ * \internal
* \brief Push the bridge channel into its specified bridge.
* \since 12.0.0
*
diff --git a/include/asterisk/bridge_technology.h b/include/asterisk/bridge_technology.h
index 09b0fc0e8..8cebe9326 100644
--- a/include/asterisk/bridge_technology.h
+++ b/include/asterisk/bridge_technology.h
@@ -156,6 +156,9 @@ struct ast_bridge_technology {
* \retval -1 Frame needs to be deferred.
*
* \note On entry, bridge is already locked.
+ *
+ * \note Deferred frames will be automatically queued onto the channel when another
+ * channel joins the bridge.
*/
int (*write)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame);
/*!