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 /codecs/codec_gsm.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 'codecs/codec_gsm.c')
-rw-r--r-- | codecs/codec_gsm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c index ab2815445..46c1c84fb 100644 --- a/codecs/codec_gsm.c +++ b/codecs/codec_gsm.c @@ -168,8 +168,6 @@ static void gsm_destroy_stuff(struct ast_trans_pvt *pvt) static struct ast_translator gsmtolin = { .name = "gsmtolin", - .srcfmt = AST_FORMAT_GSM, - .dstfmt = AST_FORMAT_SLINEAR, .newpvt = gsm_new, .framein = gsmtolin_framein, .destroy = gsm_destroy_stuff, @@ -181,8 +179,6 @@ static struct ast_translator gsmtolin = { static struct ast_translator lintogsm = { .name = "lintogsm", - .srcfmt = AST_FORMAT_SLINEAR, - .dstfmt = AST_FORMAT_GSM, .newpvt = gsm_new, .framein = lintogsm_framein, .frameout = lintogsm_frameout, @@ -213,6 +209,12 @@ static int load_module(void) { int res; + ast_format_set(&gsmtolin.src_format, AST_FORMAT_GSM, 0); + ast_format_set(&gsmtolin.dst_format, AST_FORMAT_SLINEAR, 0); + + ast_format_set(&lintogsm.src_format, AST_FORMAT_SLINEAR, 0); + ast_format_set(&lintogsm.dst_format, AST_FORMAT_GSM, 0); + res = ast_register_translator(&gsmtolin); if (!res) res=ast_register_translator(&lintogsm); |