diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2019-02-03 01:07:26 +0000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-06-11 20:27:21 +0000 |
commit | 57bb2b2a099fd1df57a37b3a93a07212167c59aa (patch) | |
tree | 1066544c6480123d022f77e76b508ef4e2c248e2 /codecs/G711a | |
parent | de4463066667e5b3582eb7943c6bbd42d23059bf (diff) |
Move codec plugins to /plugins
Change-Id: I56d61e2ef737e4326080d75a2302c73a4075e8a1
Reviewed-on: https://code.wireshark.org/review/33067
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'codecs/G711a')
-rw-r--r-- | codecs/G711a/G711adecode.c | 76 | ||||
-rw-r--r-- | codecs/G711a/G711adecode.h | 34 | ||||
-rw-r--r-- | codecs/G711a/G711atable.h | 57 |
3 files changed, 0 insertions, 167 deletions
diff --git a/codecs/G711a/G711adecode.c b/codecs/G711a/G711adecode.c deleted file mode 100644 index 3c239d2b25..0000000000 --- a/codecs/G711a/G711adecode.c +++ /dev/null @@ -1,76 +0,0 @@ -/* G711adecode.c - * A-law G.711 codec - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#include "config.h" - -#include <glib.h> - -#include "G711adecode.h" -#include "G711atable.h" - -#include "ws_attributes.h" - -void * -codec_g711a_init(void) -{ - return NULL; -} - -void -codec_g711a_release(void *ctx _U_) -{ - -} - -unsigned -codec_g711a_get_channels(void *ctx _U_) -{ - return 1; -} - -unsigned -codec_g711a_get_frequency(void *ctx _U_) -{ - return 8000; -} - -size_t -codec_g711a_decode(void *ctx _U_, const void *input, size_t inputSizeBytes, void *output, - size_t *outputSizeBytes) -{ - const guint8 *dataIn = (const guint8 *) input; - gint16 *dataOut = (gint16 *) output; - size_t i; - - if (!output || !outputSizeBytes) { - return inputSizeBytes * 2; - } - - for (i = 0; i < inputSizeBytes; i++) - { - dataOut[i] = alaw_exp_table[dataIn[i]]; - } - - *outputSizeBytes = inputSizeBytes * 2; - return inputSizeBytes * 2; -} - -/* - * 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/G711a/G711adecode.h b/codecs/G711a/G711adecode.h deleted file mode 100644 index 8d24110e27..0000000000 --- a/codecs/G711a/G711adecode.h +++ /dev/null @@ -1,34 +0,0 @@ -/* G711adecode.h - * Definitions for A-law G.711 codec - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef __CODECS_G711ADECODE_H__ -#define __CODECS_G711ADECODE_H__ - -void *codec_g711a_init(void); -void codec_g711a_release(void *ctx); -unsigned codec_g711a_get_channels(void *ctx); -unsigned codec_g711a_get_frequency(void *ctx); -size_t codec_g711a_decode(void *ctx, const void *input, size_t inputSizeBytes, void *output, - size_t *outputSizeBytes); - -#endif /* G711adecode.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: - */ diff --git a/codecs/G711a/G711atable.h b/codecs/G711a/G711atable.h deleted file mode 100644 index 79b812f80c..0000000000 --- a/codecs/G711a/G711atable.h +++ /dev/null @@ -1,57 +0,0 @@ -/* G711atable.h - * Exponent table for A-law G.711 codec - * - * Wireshark - Network traffic analyzer - * By Gerald Combs <gerald@wireshark.org> - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -gint16 alaw_exp_table[256] = { - -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, - -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, - -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, - -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, - -22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944, - -30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136, - -11008,-10496,-12032,-11520, -8960, -8448, -9984, -9472, - -15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568, - -344, -328, -376, -360, -280, -264, -312, -296, - -472, -456, -504, -488, -408, -392, -440, -424, - -88, -72, -120, -104, -24, -8, -56, -40, - -216, -200, -248, -232, -152, -136, -184, -168, - -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, - -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, - -688, -656, -752, -720, -560, -528, -624, -592, - -944, -912, -1008, -976, -816, -784, -880, -848, - 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, - 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, - 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, - 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, - 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, - 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, - 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, - 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, - 344, 328, 376, 360, 280, 264, 312, 296, - 472, 456, 504, 488, 408, 392, 440, 424, - 88, 72, 120, 104, 24, 8, 56, 40, - 216, 200, 248, 232, 152, 136, 184, 168, - 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, - 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, - 688, 656, 752, 720, 560, 528, 624, 592, - 944, 912, 1008, 976, 816, 784, 880, 848}; - - -/* - * 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: - */ |