nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* codecs.h |
2 | * codecs interface 2007 Tomas Kukosa |
||
3 | * |
||
4 | * Wireshark - Network traffic analyzer |
||
5 | * By Gerald Combs <gerald@wireshark.org> |
||
6 | * Copyright 1998 Gerald Combs |
||
7 | * |
||
8 | * This program is free software; you can redistribute it and/or |
||
9 | * modify it under the terms of the GNU General Public License |
||
10 | * as published by the Free Software Foundation; either version 2 |
||
11 | * of the License, or (at your option) any later version. |
||
12 | * |
||
13 | * This program is distributed in the hope that it will be useful, |
||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
16 | * GNU General Public License for more details. |
||
17 | * |
||
18 | * You should have received a copy of the GNU General Public License |
||
19 | * along with this program; if not, write to the Free Software |
||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||
21 | */ |
||
22 | |||
23 | #ifndef _CODECS_H_ |
||
24 | #define _CODECS_H_ |
||
25 | |||
26 | #include <config.h> |
||
27 | |||
28 | #include <epan/epan.h> |
||
29 | #include "ws_symbol_export.h" |
||
30 | |||
31 | #ifdef __cplusplus |
||
32 | extern "C" { |
||
33 | #endif /* __cplusplus */ |
||
34 | |||
35 | #ifdef HAVE_PLUGINS |
||
36 | WS_DLL_PUBLIC void codec_register_plugin_types(void); |
||
37 | WS_DLL_PUBLIC void register_all_codecs(void); |
||
38 | #endif |
||
39 | |||
40 | struct codec_handle; |
||
41 | typedef struct codec_handle *codec_handle_t; |
||
42 | |||
43 | typedef void *(*codec_init_fn)(void); |
||
44 | typedef void (*codec_release_fn)(void *context); |
||
45 | typedef unsigned (*codec_get_channels_fn)(void *context); |
||
46 | typedef unsigned (*codec_get_frequency_fn)(void *context); |
||
47 | typedef size_t (*codec_decode_fn)(void *context, const void *input, size_t inputSizeBytes, |
||
48 | void *output, size_t *outputSizeBytes); |
||
49 | |||
50 | WS_DLL_PUBLIC gboolean register_codec(const char *name, codec_init_fn init_fn, |
||
51 | codec_release_fn release_fn, codec_get_channels_fn channels_fn, |
||
52 | codec_get_frequency_fn frequency_fn, codec_decode_fn decode_fn); |
||
53 | WS_DLL_PUBLIC gboolean deregister_codec(const char *name); |
||
54 | WS_DLL_PUBLIC codec_handle_t find_codec(const char *name); |
||
55 | WS_DLL_PUBLIC void *codec_init(codec_handle_t codec); |
||
56 | WS_DLL_PUBLIC void codec_release(codec_handle_t codec, void *context); |
||
57 | WS_DLL_PUBLIC unsigned codec_get_channels(codec_handle_t codec, void *context); |
||
58 | WS_DLL_PUBLIC unsigned codec_get_frequency(codec_handle_t codec, void *context); |
||
59 | WS_DLL_PUBLIC size_t codec_decode(codec_handle_t codec, void *context, const void *input, |
||
60 | size_t inputSizeBytes, void *output, size_t *outputSizeBytes); |
||
61 | |||
62 | #ifdef __cplusplus |
||
63 | } |
||
64 | #endif /* __cplusplus */ |
||
65 | |||
66 | #endif /* _CODECS_H_ */ |
||
67 | |||
68 | /* |
||
69 | * Editor modelines - http://www.wireshark.org/tools/modelines.html |
||
70 | * |
||
71 | * Local variables: |
||
72 | * c-basic-offset: 4 |
||
73 | * tab-width: 8 |
||
74 | * indent-tabs-mode: nil |
||
75 | * End: |
||
76 | * |
||
77 | * vi: set shiftwidth=4 tabstop=8 expandtab: |
||
78 | * :indentSize=4:tabSize=8:noTabs=true: |
||
79 | */ |