diff options
author | Joshua Colp <jcolp@digium.com> | 2017-02-22 14:32:23 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-02-22 14:32:23 +0000 |
commit | f58aefba5be6ab8ada6899ff50c6148830032814 (patch) | |
tree | d500fe189bd2326f8d058b513961008838048734 /main/stream.c | |
parent | 8f248f7a1cc8452eb455a338ddc9bae593310ee7 (diff) |
core: Show streams in "core show channel".
The "core show channel" CLI command will now output the streams
present on the channel with their details.
ASTERISK-26811
Change-Id: I9c95b57aa09415005f0677a1949a0feb07e4987a
Diffstat (limited to 'main/stream.c')
-rw-r--r-- | main/stream.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/main/stream.c b/main/stream.c index aacd33f17..8bee2fdd0 100644 --- a/main/stream.c +++ b/main/stream.c @@ -168,6 +168,24 @@ void ast_stream_set_state(struct ast_stream *stream, enum ast_stream_state state stream->state = state; } +const char *ast_stream_state2str(enum ast_stream_state state) +{ + switch (state) { + case AST_STREAM_STATE_REMOVED: + return "removed"; + case AST_STREAM_STATE_SENDRECV: + return "sendrecv"; + case AST_STREAM_STATE_SENDONLY: + return "sendonly"; + case AST_STREAM_STATE_RECVONLY: + return "recvonly"; + case AST_STREAM_STATE_INACTIVE: + return "inactive"; + default: + return "<unknown>"; + } +} + int ast_stream_get_position(const struct ast_stream *stream) { ast_assert(stream != NULL); |