summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2017-04-25 11:49:16 -0500
committerKevin Harwell <kharwell@digium.com>2017-05-03 16:36:22 -0500
commit7b0e3b92fd49e5fbe406ef74336e164eb3f31b6e (patch)
treebe14294023edfbb6698f4c8e8b25d529756e5aee /include/asterisk/channel.h
parentbdec0852b96a9475a013f88949ad162511fd8404 (diff)
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
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 128cd3056..889d3ff07 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -4904,6 +4904,7 @@ int ast_channel_is_multistream(struct ast_channel *chan);
*
* \param chan The channel to change
* \param topology The new stream topology
+ * \param change_source The source that initiated the change
*
* \pre chan is locked
*
@@ -4918,7 +4919,8 @@ int ast_channel_is_multistream(struct ast_channel *chan);
* \note This interface is provided for applications and resources to request that the topology change.
* It is not for use by the channel driver itself.
*/
-int ast_channel_request_stream_topology_change(struct ast_channel *chan, struct ast_stream_topology *topology);
+int ast_channel_request_stream_topology_change(struct ast_channel *chan,
+ struct ast_stream_topology *topology, void *change_source);
/*!
* \brief Provide notice to a channel that the stream topology has changed
@@ -4936,4 +4938,13 @@ int ast_channel_request_stream_topology_change(struct ast_channel *chan, struct
*/
int ast_channel_stream_topology_changed(struct ast_channel *chan, struct ast_stream_topology *topology);
+/*!
+ * \brief Retrieve the source that initiated the last stream topology change
+ *
+ * \param chan The channel
+ *
+ * \retval The channel's stream topology change source
+ */
+void *ast_channel_get_stream_topology_change_source(struct ast_channel *chan);
+
#endif /* _ASTERISK_CHANNEL_H */