diff options
author | Joshua Colp <jcolp@digium.com> | 2017-07-11 19:33:44 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-07-11 23:47:32 +0000 |
commit | 7f09fd2c2f1501aeccc7737be4dd0e52fd656913 (patch) | |
tree | 091d76751a376c690a88ea915b79a0787f5200fb /include/asterisk/channel.h | |
parent | 3e7cfe3a92e87dd5c402f4476cee934e44236cc6 (diff) |
bridge/core_unreal: Fix SFU bugs with forwarding frames.
This change fixes a few things uncovered during SFU testing.
1. Unreal channels incorrectly forwarded video frames when
no video stream was present on them. This caused a crash when
they were read as the core requires a stream to exist for the
underlying media type. The Unreal channel will now ensure a
stream exists for the media type before forwarding the frame
and if no stream exists then the frame is dropped.
2. Mapping of frames during bridging from the stream number of
the underlying channel to the stream number of the bridge was
done in the wrong location. This resulted in the frame getting
dropped. This mapping now occurs on reading of the frame from
the channel.
3. Bridging was using the wrong ast_read function resulting in
it living in a non-multistream world.
4. In bridge_softmix when adding new streams to existing channels
the wrong stream topology was copied resulting in no streams
being added.
Change-Id: Ib7445722c3219951d6740802a0feddf2908c18c8
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 197cc990d..55126b472 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -2030,6 +2030,26 @@ struct ast_frame *ast_read_stream(struct ast_channel *chan); struct ast_frame *ast_read_noaudio(struct ast_channel *chan); /*! + * \brief Reads a frame, but does not filter to just the default streams, + * returning AST_FRAME_NULL frame if audio. + * + * \param chan channel to read a frame from + * + * \return Returns a frame, or NULL on error. If it returns NULL, you + * best just stop reading frames and assume the channel has been + * disconnected. + * + * \note This function will not perform any filtering and will return + * media frames from all streams on the channel. To determine which + * stream a frame originated from the stream_num on it can be + * examined. + * + * \note Audio is replaced with AST_FRAME_NULL to avoid + * transcode when the resulting audio is not necessary. + */ +struct ast_frame *ast_read_stream_noaudio(struct ast_channel *chan); + +/*! * \brief Write a frame to a channel * This function writes the given frame to the indicated channel. * \param chan destination channel of the frame |