diff options
author | George Joseph <gjoseph@digium.com> | 2017-02-15 19:29:52 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-15 19:29:52 -0600 |
commit | ca7fa7bbd2d54766f6b5911d7aa046cdcfd0dfe8 (patch) | |
tree | 54d74f4ffaf19eede3f07224526f9922d1eaf9f9 /include | |
parent | 11886dea82b2d342c946f669144d5afaa667a26a (diff) | |
parent | bf2f091bbb2b099d6ca87e5fdd76efe45a209eb7 (diff) |
Merge "stream: Add stream topology to channel"
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/channel.h | 34 | ||||
-rw-r--r-- | include/asterisk/channel_internal.h | 4 | ||||
-rw-r--r-- | include/asterisk/stream.h | 15 |
3 files changed, 53 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index e5f792f1f..4170a8af4 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -884,6 +884,10 @@ enum { * world */ AST_CHAN_TP_INTERNAL = (1 << 2), + /*! + * \brief Channels with this particular technology support multiple simultaneous streams + */ + AST_CHAN_TP_MULTISTREAM = (1 << 3), }; /*! \brief ast_channel flags */ @@ -4734,4 +4738,34 @@ enum ast_channel_error ast_channel_errno(void); */ int ast_channel_get_intercept_mode(void); +/*! + * \brief Retrieve the topology of streams on a channel + * + * \param chan The channel to get the stream topology of + * + * \pre chan is locked + * + * \retval non-NULL success + * \retval NULL failure + */ +struct ast_stream_topology *ast_channel_get_stream_topology( + const struct ast_channel *chan); + +/*! + * \brief Set the topology of streams on a channel + * + * \param chan The channel to set the stream topology on + * \param topology The stream topology to set + * + * \pre chan is locked + * + * \note If topology is NULL a new empty topology will be created + * and returned. + * + * \retval non-NULL Success + * \retval NULL failure + */ +struct ast_stream_topology *ast_channel_set_stream_topology( + struct ast_channel *chan, struct ast_stream_topology *topology); + #endif /* _ASTERISK_CHANNEL_H */ diff --git a/include/asterisk/channel_internal.h b/include/asterisk/channel_internal.h index 2316e2f24..3de2b14aa 100644 --- a/include/asterisk/channel_internal.h +++ b/include/asterisk/channel_internal.h @@ -27,3 +27,7 @@ int ast_channel_internal_setup_topics(struct ast_channel *chan); 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_swap_stream_topology(struct ast_channel *chan1, + struct ast_channel *chan2); diff --git a/include/asterisk/stream.h b/include/asterisk/stream.h index cffe6ea4c..9fb466013 100644 --- a/include/asterisk/stream.h +++ b/include/asterisk/stream.h @@ -316,4 +316,19 @@ int ast_stream_topology_set_stream(struct ast_stream_topology *topology, struct ast_stream_topology *ast_stream_topology_create_from_format_cap( struct ast_format_cap *cap); +/*! + * \brief Gets the first stream of a specific type from the topology + * + * \param topology The topology of streams + * \param type The media type + * + * \retval non-NULL success + * \retval NULL failure + * + * \since 15 + */ +struct ast_stream *ast_stream_topology_get_first_stream_by_type( + const struct ast_stream_topology *topology, + enum ast_media_type type); + #endif /* _AST_STREAM_H */ |