diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2012-09-14 15:08:17 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-02-12 01:36:02 +0000 |
commit | 10084c344c89fdadc915e47bcece84a2ac511dc5 (patch) | |
tree | cf48eed191bfd99bd2087f2d7cb3a13fa3049047 /codecs/G722 | |
parent | ab3348eeb412d45acd89ffb7d0b39189b36399ce (diff) |
RTP: Add support for SBC codec in RTP Player
Add optional dependancy to libsbc to play Bluetooth SBC in
A2DP payload. Also simplify RTP Player and extent codec interface.
Change-Id: I52e1fce9c82e2885736354fe73c6c37168a4fda3
Reviewed-on: https://code.wireshark.org/review/19
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'codecs/G722')
-rw-r--r-- | codecs/G722/G722decode.c | 42 | ||||
-rw-r--r-- | codecs/G722/G722decode.h | 24 |
2 files changed, 57 insertions, 9 deletions
diff --git a/codecs/G722/G722decode.c b/codecs/G722/G722decode.c index b668b2bf57..746d150947 100644 --- a/codecs/G722/G722decode.c +++ b/codecs/G722/G722decode.c @@ -33,19 +33,53 @@ static g722_decode_state_t state; -void -initG722(void) +void * +codec_g722_init(void) { memset (&state, 0, sizeof (state)); g722_decode_init(&state, 64000, 0); + + return NULL; +} + +void +codec_g722_release(void *ctx _U_) +{ + +} + +int +codec_g722_get_channels(void *ctx _U_) +{ + return 1; +} + +int +codec_g722_get_frequency(void *ctx _U_) +{ + return 64000; } int -decodeG722(void *input _U_NOSPANDSP_, int inputSizeBytes _U_NOSPANDSP_, - void *output _U_NOSPANDSP_, int *outputSizeBytes _U_NOSPANDSP_) +codec_g722_decode(void *ctx _U_, const void *input, int inputSizeBytes, void *output, + int *outputSizeBytes) { *outputSizeBytes = g722_decode(&state, output, input, inputSizeBytes); return 0; } #endif + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ + diff --git a/codecs/G722/G722decode.h b/codecs/G722/G722decode.h index 255092190a..0b5d8d0f88 100644 --- a/codecs/G722/G722decode.h +++ b/codecs/G722/G722decode.h @@ -25,10 +25,24 @@ #ifndef __CODECS_G722DECODE_H__ #define __CODECS_G722DECODE_H__ -void -initG722(void); - -int -decodeG722(void *input, int inputSizeBytes, void *output, int *outputSizeBytes); +void *codec_g722_init(void); +void codec_g722_release(void *ctx); +int codec_g722_get_channels(void *ctx); +int codec_g722_get_frequency(void *ctx); +int codec_g722_decode(void *ctx, const void *input, int inputSizeBytes, void *output, + int *outputSizeBytes); #endif /* G722decode.h */ + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ |