diff options
author | Joshua Colp <jcolp@digium.com> | 2013-10-02 16:23:34 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-10-02 16:23:34 +0000 |
commit | c1235f2639023a9e450cafcdf8bd35cc304d9e53 (patch) | |
tree | b48cb7bb27925ff48e4f807dda8ee9588fd36031 /include | |
parent | 424c0f2eb7ff45a06a21b2d81532ac49e24e8b60 (diff) |
Reduce channel snapshot creation and publishing by up to 50%.
This change introduces the ability to stage channel snapshot
creation and publishing by suppressing the implicit creation
and publishing that some functions have. Once all operations
are executed the staging is marked as done and a single snapshot
is created and published.
Review: https://reviewboard.asterisk.org/r/2889/
........
Merged revisions 400265 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/channel.h | 5 | ||||
-rw-r--r-- | include/asterisk/stasis_channels.h | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 24dc53f6b..e952b93b8 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -923,6 +923,11 @@ enum { * occur. */ AST_FLAG_DEAD = (1 << 24), + /*! + * Channel snapshot should not be published, it is being staged for an explicit + * publish. + */ + AST_FLAG_SNAPSHOT_STAGE = (1 << 25), }; /*! \brief ast_bridge_config flags */ diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h index c0b596ac9..7d9c3efdc 100644 --- a/include/asterisk/stasis_channels.h +++ b/include/asterisk/stasis_channels.h @@ -316,6 +316,22 @@ void ast_channel_publish_blob(struct ast_channel *chan, struct stasis_message_ty /*! * \since 12 + * \brief Set flag to indicate channel snapshot is being staged. + * + * \param chan Channel being staged. + */ +void ast_channel_stage_snapshot(struct ast_channel *chan); + +/*! + * \since 12 + * \brief Clear flag to indicate channel snapshot is being staged, and publish snapshot. + * + * \param chan Channel being staged. + */ +void ast_channel_stage_snapshot_done(struct ast_channel *chan); + +/*! + * \since 12 * \brief Publish a \ref ast_channel_snapshot for a channel. * * \param chan Channel to publish. |