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
This commit is contained in:
Joshua Colp
2013-10-02 16:23:34 +00:00
parent 424c0f2eb7
commit c1235f2639
22 changed files with 151 additions and 3 deletions

View File

@@ -577,6 +577,8 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
return NULL;
}
ast_channel_stage_snapshot(chan);
/* If res_pjsip_session is ever updated to create/destroy ast_sip_session_media
* during a call such as if multiple same-type stream support is introduced,
* these will need to be recaptured as well */
@@ -632,6 +634,8 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
ast_endpoint_add_channel(session->endpoint->persistent, chan);
ast_channel_stage_snapshot_done(chan);
return chan;
}