From 7b0e3b92fd49e5fbe406ef74336e164eb3f31b6e Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Tue, 25 Apr 2017 11:49:16 -0500 Subject: bridge_simple: Added support for streams This patch is the first cut at adding stream support to the bridging framework. Changes were made to the framework that allows mapping of stream topologies to a bridge's supported media types. The first channel to enter a bridge initially defines the media types for a bridge (i.e. a one to one mapping is created between the bridge and the first channel). Subsequently added channels merge their media types into the bridge's adding to it when necessary. This allows channels with different sized topologies to map correctly to each other according to media type. The bridge drops any frame that does not have a matching index into a given write stream. For now though, bridge_simple will align its two channels according to size or first to join. Once both channels join the bridge the one with the most streams will indicate to the other channel to update its streams to be the same as that of the other. If both channels have the same number of streams then the first channel to join is chosen as the stream base. A topology change source was also added to a channel when a stream toplogy change request is made. This allows subsystems to know whether or not they initiated a change request. Thus avoiding potential recursive situations. ASTERISK-26966 #close Change-Id: I1eb5987921dd80c3cdcf52accc136393ca2d4163 --- include/asterisk/channel_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/asterisk/channel_internal.h') diff --git a/include/asterisk/channel_internal.h b/include/asterisk/channel_internal.h index 3de2b14aa..dd791a416 100644 --- a/include/asterisk/channel_internal.h +++ b/include/asterisk/channel_internal.h @@ -29,5 +29,7 @@ void ast_channel_internal_errno_set(enum ast_channel_error error); enum ast_channel_error ast_channel_internal_errno(void); void ast_channel_internal_set_stream_topology(struct ast_channel *chan, struct ast_stream_topology *topology); +void ast_channel_internal_set_stream_topology_change_source( + struct ast_channel *chan, void *change_source); void ast_channel_internal_swap_stream_topology(struct ast_channel *chan1, struct ast_channel *chan2); -- cgit v1.2.3