From 0560c32375a5edd110d544f5762edb6f1fb0f005 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Fri, 24 Feb 2017 14:30:33 -0700 Subject: stream: Unit tests for stream read and tweaks framework * Removed the AST_CHAN_TP_MULTISTREAM tech property. We now rely on read_stream being set to indicate a multi stream channel. * Added ast_channel_is_multistream convenience function. * Fixed issue where stream and default_stream weren't being set on a frame retrieved from the queue. * Now testing for NULL being returned from the driver's read or read_stream callback. * Fixed issue where the dropnondefault code was crashing on a NULL f. * Now enforcing that if either read_stream or write_stream are set when ast_channel_tech_set is called that BOTH are set. * Added the unit tests. ASTERISK-26816 Change-Id: If7792b20d782e71e823dabd3124572cf0a4caab2 --- include/asterisk/channel.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include/asterisk/channel.h') diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index f6e09252f..3ae1e2fd4 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -911,10 +911,6 @@ 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 */ @@ -4843,4 +4839,15 @@ struct ast_stream_topology *ast_channel_set_stream_topology( */ struct ast_stream *ast_channel_get_default_stream(struct ast_channel *chan, enum ast_media_type type); +/*! + * \brief Determine if a channel is multi-stream capable + * + * \param channel The channel to test + * + * \pre chan is locked + * + * \return Returns true if the channel is multi-stream capable. + */ +int ast_channel_is_multistream(struct ast_channel *chan); + #endif /* _ASTERISK_CHANNEL_H */ -- cgit v1.2.3