diff options
author | Richard Mudgett <rmudgett@digium.com> | 2017-06-08 11:38:33 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2017-06-15 09:42:15 -0500 |
commit | e563a1920e35b3986462dceadde5e162628adeb6 (patch) | |
tree | 22176e8b9070abd58ed0df87d552f410495f1714 /main/sdp_options.c | |
parent | 716abaf33dc13c41d95629f853a0850c9ef3e8ce (diff) |
SDP: Add get/set option calls for RTP sched context per type.
Change-Id: I82dc75c63c48904e9e5a49e2205dcc06e88487e4
Diffstat (limited to 'main/sdp_options.c')
-rw-r--r-- | main/sdp_options.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/main/sdp_options.c b/main/sdp_options.c index ab8fb2973..a938583c6 100644 --- a/main/sdp_options.c +++ b/main/sdp_options.c @@ -77,6 +77,39 @@ DEFINE_GETTERS_SETTERS_FOR(enum ast_sdp_options_impl, impl); DEFINE_GETTERS_SETTERS_FOR(enum ast_sdp_options_encryption, encryption); DEFINE_GETTERS_SETTERS_FOR(unsigned int, ssrc); +struct ast_sched_context *ast_sdp_options_get_sched_type(const struct ast_sdp_options *options, enum ast_media_type type) +{ + struct ast_sched_context *sched = NULL; + + switch (type) { + case AST_MEDIA_TYPE_AUDIO: + case AST_MEDIA_TYPE_VIDEO: + case AST_MEDIA_TYPE_IMAGE: + case AST_MEDIA_TYPE_TEXT: + sched = options->sched[type]; + break; + case AST_MEDIA_TYPE_UNKNOWN: + case AST_MEDIA_TYPE_END: + break; + } + return sched; +} + +void ast_sdp_options_set_sched_type(struct ast_sdp_options *options, enum ast_media_type type, struct ast_sched_context *sched) +{ + switch (type) { + case AST_MEDIA_TYPE_AUDIO: + case AST_MEDIA_TYPE_VIDEO: + case AST_MEDIA_TYPE_IMAGE: + case AST_MEDIA_TYPE_TEXT: + options->sched[type] = sched; + break; + case AST_MEDIA_TYPE_UNKNOWN: + case AST_MEDIA_TYPE_END: + break; + } +} + static void set_defaults(struct ast_sdp_options *options) { options->dtmf = DEFAULT_DTMF; |