channel: Add support for writing to a specific stream.
authorJoshua Colp <jcolp@digium.com>
Wed, 22 Feb 2017 11:00:57 +0000 (11:00 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 23 Feb 2017 18:31:15 +0000 (18:31 +0000)
commit6cc890b880a6d50b3236860c3ab89e26ba59a7d3
tree2e3c881e0f076ed443d8d47230e1597a3dbb4df5
parent911252d7b54f8ee7af30f71e26e7a26ef881d316
channel: Add support for writing to a specific stream.

This change adds an ast_write_stream function which allows
writing a frame to a specific media stream. It also moves
ast_write() to using this underneath by writing media
frames provided to it to the default streams of the channel.
Existing functionality (such as audiohooks, framehooks, etc)
are limited to being applied to the default stream only.

Unit tests have also been added which test the behavior of
both non-multistream and multistream channels to confirm that
the write() and write_stream() callbacks are invoked
appropriately.

ASTERISK-26793

Change-Id: I4df20d1b65bd4d787fce0b4b478e19d2dfea245c
include/asterisk/channel.h
main/channel.c
main/channel_internal_api.c
tests/test_stream.c