diff options
author | Joshua Colp <jcolp@digium.com> | 2017-07-26 08:20:35 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-07-26 08:20:35 -0500 |
commit | 8412cc1e072a6f608473e98ef4b1366aea6e8549 (patch) | |
tree | ba1adcfdab54af95288293bb6c2152412dce99c8 /main/stream.c | |
parent | 8c6dcbcc6e99078f55e077cc3493c44416e31552 (diff) | |
parent | 3a18a090309271420516ea345ec32c7afa9b332b (diff) |
Merge "SDP: Rework SDP offer/answer model and update capabilities merges."
Diffstat (limited to 'main/stream.c')
-rw-r--r-- | main/stream.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/main/stream.c b/main/stream.c index 093cd5450..89ed0dc53 100644 --- a/main/stream.c +++ b/main/stream.c @@ -214,6 +214,23 @@ const char *ast_stream_state2str(enum ast_stream_state state) } } +enum ast_stream_state ast_stream_str2state(const char *str) +{ + if (!strcmp("sendrecv", str)) { + return AST_STREAM_STATE_SENDRECV; + } + if (!strcmp("sendonly", str)) { + return AST_STREAM_STATE_SENDONLY; + } + if (!strcmp("recvonly", str)) { + return AST_STREAM_STATE_RECVONLY; + } + if (!strcmp("inactive", str)) { + return AST_STREAM_STATE_INACTIVE; + } + return AST_STREAM_STATE_REMOVED; +} + void *ast_stream_get_data(struct ast_stream *stream, enum ast_stream_data_slot slot) { ast_assert(stream != NULL); |