diff options
author | Joshua Colp <jcolp@digium.com> | 2018-03-21 13:52:08 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2018-03-27 08:39:00 -0600 |
commit | e14b0e960d99aaf9c75b23814a1bef22ab2a53ff (patch) | |
tree | 25a3acf7fced71385f3784401209af903a917734 /main/channel.c | |
parent | a4a5b8d562b0e0f10024f7dcbfaf2cb740e81d15 (diff) |
res_rtp_asterisk: Add support for raising additional RTCP messages.
This change extends the existing AST_FRAME_RTCP frame type to be
able to contain additional RTCP message types, such as feedback
messages. The payload type is contained in the subclass which allows
knowing what is in the frame itself.
The RTCP feedback message type is now handled and REMB[1] messages
are raised with their containing information.
This also fixes a bug where all feedback messages were triggering
video updates instead of just FIR and FUR.
Finally RTCP frames are now passed up through the Asterisk core to
what is handling the channel, mapped appropriately in the case of
bridging, and written to an outgoing stream. Since RTCP frames are
on a per-stream basis this is only done on multistream capable
channels.
[1] https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03
ASTERISK-27758
ASTERISK-26366
Change-Id: I680da0ad8d5059d5e9655d896fb9d92e9da8491e
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c index 869b29f5e..815d5dbfe 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4123,8 +4123,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio, int if (ast_channel_writetrans(chan)) { ast_translate(ast_channel_writetrans(chan), f, 0); } - ast_frfree(f); - f = &ast_null_frame; + break; default: /* Just pass it on! */ break; @@ -5267,6 +5266,14 @@ int ast_write_stream(struct ast_channel *chan, int stream_num, struct ast_frame /* Ignore these */ res = 0; break; + case AST_FRAME_RTCP: + /* RTCP information is on a per-stream basis and only available on multistream capable channels */ + if (ast_channel_tech(chan)->write_stream && stream) { + res = ast_channel_tech(chan)->write_stream(chan, ast_stream_get_position(stream), fr); + } else { + res = 0; + } + break; default: /* At this point, fr is the incoming frame and f is NULL. Channels do * not expect to get NULL as a frame pointer and will segfault. Hence, |