diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-02-03 16:22:10 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-02-03 16:22:10 +0000 |
commit | 4aca3187a3db25ff4d2208f116f618b363dec7d5 (patch) | |
tree | 00da0caa5a07b7b25729f089dbcafb08129fa9be /apps/app_milliwatt.c | |
parent | 8170aae0a0882a93ca1ef80736cb95c2d6126865 (diff) |
Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal. For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal
The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs. Functionally
no change in behavior should be present in this patch. Thanks to twilson
and russell for all the time they spent reviewing these changes.
Review: https://reviewboard.asterisk.org/r/1083/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_milliwatt.c')
-rw-r--r-- | apps/app_milliwatt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 24137606d..26cba3c40 100644 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -78,10 +78,10 @@ static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int int i, *indexp = (int *) data; struct ast_frame wf = { .frametype = AST_FRAME_VOICE, - .subclass.codec = AST_FORMAT_ULAW, .offset = AST_FRIENDLY_OFFSET, .src = __FUNCTION__, }; + ast_format_set(&wf.subclass.format, AST_FORMAT_ULAW, 0); wf.data.ptr = buf + AST_FRIENDLY_OFFSET; /* Instead of len, use samples, because channel.c generator_force @@ -120,8 +120,8 @@ static struct ast_generator milliwattgen = { static int old_milliwatt_exec(struct ast_channel *chan) { - ast_set_write_format(chan, AST_FORMAT_ULAW); - ast_set_read_format(chan, AST_FORMAT_ULAW); + ast_set_write_format_by_id(chan, AST_FORMAT_ULAW); + ast_set_read_format_by_id(chan, AST_FORMAT_ULAW); if (chan->_state != AST_STATE_UP) { ast_answer(chan); |