summaryrefslogtreecommitdiff
path: root/main/frame.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-02-23 19:03:15 +0000
committerGeorge Joseph <gjoseph@digium.com>2017-02-24 10:20:33 -0600
commitc07c6714f270b7689ddd904bd52f547c19b51555 (patch)
treea517a0508a8c5f9fe1fc4554205aae051eef10e7 /main/frame.c
parent6cc890b880a6d50b3236860c3ab89e26ba59a7d3 (diff)
channel: Add ast_read_stream function for reading frames from all streams.
This change introduces an ast_read_stream function and callback in the channel technology which allows reading frames from all streams and not just the default streams. The stream number has also been added to frames. This is to allow the case where frames are queued onto the channel instead of being read directly from the driver. This change does impose a restriction on reading though: a chain of frames can only contain frames from the same stream. ASTERISK-26816 Change-Id: I5d7dc35e86694df91fd025126f6cfe0453aa38ce
Diffstat (limited to 'main/frame.c')
-rw-r--r--main/frame.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/frame.c b/main/frame.c
index c284a8e1c..c24cc8f78 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -222,6 +222,7 @@ struct ast_frame *ast_frisolate(struct ast_frame *fr)
out->len = fr->len;
out->seqno = fr->seqno;
}
+ out->stream_num = fr->stream_num;
} else {
out = fr;
}
@@ -370,6 +371,7 @@ struct ast_frame *ast_frdup(const struct ast_frame *f)
out->ts = f->ts;
out->len = f->len;
out->seqno = f->seqno;
+ out->stream_num = f->stream_num;
return out;
}