mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Add channel optimization interaction with frame hooks BUGBUG comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4499,6 +4499,21 @@ static int check_swap_optimize_out(struct ast_bridge *chan_bridge,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BUGBUG Need to take into account frame hooks on the unreal/local channels optimization.
|
||||||
|
*
|
||||||
|
* Frame hooks on the unreal/local channels may inhibit optimization here if they cannot
|
||||||
|
* be moved to an appropriate peer channel.
|
||||||
|
*
|
||||||
|
* caller -- Bridge -- L;1 -- L;2 -- Bridge -- agent
|
||||||
|
* Any frame hooks on L;1 need to be moved to agent channel.
|
||||||
|
* Any frame hooks on L;2 need to be moved to caller channel.
|
||||||
|
*
|
||||||
|
* Moving the frame hooks may cause the hooks to miss a frame if
|
||||||
|
* the destination channel has already read a frame but cannot
|
||||||
|
* write it into the bridge yet because optimization has the
|
||||||
|
* bridge locked.
|
||||||
|
*/
|
||||||
other = ast_bridge_channel_peer(src_bridge_channel);
|
other = ast_bridge_channel_peer(src_bridge_channel);
|
||||||
if (other && other->state == AST_BRIDGE_CHANNEL_STATE_WAIT) {
|
if (other && other->state == AST_BRIDGE_CHANNEL_STATE_WAIT) {
|
||||||
ast_debug(1, "Move-swap optimizing %s <-- %s.\n",
|
ast_debug(1, "Move-swap optimizing %s <-- %s.\n",
|
||||||
@@ -4602,6 +4617,7 @@ static int check_merge_optimize_out(struct ast_bridge *chan_bridge,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* BUGBUG Frame hooks on the unreal/local channels need to inhibit optimization here. */
|
||||||
ast_debug(1, "Merge optimizing %s -- %s out.\n",
|
ast_debug(1, "Merge optimizing %s -- %s out.\n",
|
||||||
ast_channel_name(chan_bridge_channel->chan),
|
ast_channel_name(chan_bridge_channel->chan),
|
||||||
ast_channel_name(peer_bridge_channel->chan));
|
ast_channel_name(peer_bridge_channel->chan));
|
||||||
|
|||||||
Reference in New Issue
Block a user