aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/easy_codec
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2007-12-03 09:59:18 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2007-12-03 09:59:18 +0000
commit4df43619aa5e750daad603bd374384f03cdac0c5 (patch)
tree9344e5aaec05e57d54c06d75283eafe84d719f7a /plugins/easy_codec
parent395a5add850117138e666794772403bcb3ca4dbc (diff)
Codec plugin example. The stub for ImTelephone libraries.
(It is not compiled by default.) svn path=/trunk/; revision=23699
Diffstat (limited to 'plugins/easy_codec')
-rw-r--r--plugins/easy_codec/Makefile.common42
-rw-r--r--plugins/easy_codec/Makefile.nmake64
-rw-r--r--plugins/easy_codec/ReadMe.txt13
-rw-r--r--plugins/easy_codec/codec-g722.c94
-rw-r--r--plugins/easy_codec/codec-g722.h41
-rw-r--r--plugins/easy_codec/codec-g7231.c99
-rw-r--r--plugins/easy_codec/codec-g7231.h41
-rw-r--r--plugins/easy_codec/codec-g729a.c85
-rw-r--r--plugins/easy_codec/codec-g729a.h41
-rw-r--r--plugins/easy_codec/easy_codec_plugin.c47
-rw-r--r--plugins/easy_codec/moduleinfo.nmake28
-rw-r--r--plugins/easy_codec/plugin.rc.in34
12 files changed, 629 insertions, 0 deletions
diff --git a/plugins/easy_codec/Makefile.common b/plugins/easy_codec/Makefile.common
new file mode 100644
index 0000000000..f3e0142625
--- /dev/null
+++ b/plugins/easy_codec/Makefile.common
@@ -0,0 +1,42 @@
+# Makefile.common for stats tree plugin
+# Contains the stuff from Makefile.am and Makefile.nmake that is
+# a) common to both files and
+# b) portable between both files
+#
+# $Id$
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# the name of the plugin
+PLUGIN_NAME = easy_codec
+
+# the codec sources
+CODEC_SRC = \
+ easy_codec_plugin.c \
+ codec-g729a.c \
+ codec-g7231.c \
+ codec-g722.c
+
+CODEC_INCLUDES = \
+ codec-g729a.h \
+ codec-g7231.h \
+ codec-g722.h
+
+
+
diff --git a/plugins/easy_codec/Makefile.nmake b/plugins/easy_codec/Makefile.nmake
new file mode 100644
index 0000000000..3a8e2ac02d
--- /dev/null
+++ b/plugins/easy_codec/Makefile.nmake
@@ -0,0 +1,64 @@
+# Makefile.nmake
+# nmake file for codec_test plugin
+#
+# $Id$
+#
+
+include ..\..\config.nmake
+include moduleinfo.nmake
+
+include Makefile.common
+
+CFLAGS=/WX /DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
+ /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+
+CPPFLAGS = $(CFLAGS) -TP
+
+.c.obj::
+ $(CC) $(CPPFLAGS) -Fd$(PLUGIN_NAME).pdb -c $<
+
+LDFLAGS = $(PLUGIN_LDFLAGS)
+
+!IFDEF ENABLE_LIBWIRESHARK
+LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
+CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
+
+CODEC_OBJECTS = $(CODEC_SRC:.c=.obj)
+
+CODEC_LIBS = \
+ EasyG729A/EasyG729A.lib \
+ EasyG7231/EasyG7231.lib \
+ EasyG722/EasyG722.lib
+
+OBJECTS=$(CODEC_OBJECTS)
+
+RESOURCE=$(PLUGIN_NAME).res
+
+all: $(PLUGIN_NAME).dll
+
+$(PLUGIN_NAME).rc : moduleinfo.nmake
+ sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \
+ -e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \
+ -e s/@RC_VERSION@/$(RC_VERSION)/ \
+ -e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \
+ -e s/@PACKAGE@/$(PACKAGE)/ \
+ -e s/@VERSION@/$(VERSION)/ \
+ -e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \
+ < plugin.rc.in > $@
+
+$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
+ link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
+ $(GLIB_LIBS) $(CODEC_LIBS) $(RESOURCE)
+
+easy_codec_plugin.obj : easy_codec_plugin.c
+ $(CC) $(CFLAGS) -Fd$(PLUGIN_NAME).pdb -c easy_codec_plugin.c
+
+!ENDIF
+
+clean:
+ rm -f $(OBJECTS) $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).exp \
+ $(RESOURCE) $(PLUGIN_NAME).rc $(PLUGIN_NAME).lib *.pdb
+
+distclean: clean
+
+maintainer-clean: distclean
diff --git a/plugins/easy_codec/ReadMe.txt b/plugins/easy_codec/ReadMe.txt
new file mode 100644
index 0000000000..d403642a38
--- /dev/null
+++ b/plugins/easy_codec/ReadMe.txt
@@ -0,0 +1,13 @@
+Instructions on compiling the Easy Codecs
+=========================================
+
+1. Download the codec files from www.ImTelephone.com and install them in the following subdirectories.
+ EasyG722
+ EasyG7231
+ EasyG729A
+
+2. Build plugin.
+ Win32: nmake -f makefile.nmake
+ Linux: TO DO
+
+
diff --git a/plugins/easy_codec/codec-g722.c b/plugins/easy_codec/codec-g722.c
new file mode 100644
index 0000000000..22a56f91ca
--- /dev/null
+++ b/plugins/easy_codec/codec-g722.c
@@ -0,0 +1,94 @@
+/* codec-g722.c
+* Easy codecs stub for EasyG722
+* 2007 Ales Kocourek
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <glib.h>
+#include <memory.h>
+
+#include "codec-g722.h"
+
+#include "EasyG722/EasyG722.h"
+
+struct g722_context {
+ CODER_HANDLE handle;
+ short speach_buffer[L_G722_FRAME];
+};
+
+void *codec_g722_init(void) {
+ g722_context *ctx = 0;
+
+ ctx = (g722_context*)g_malloc0(sizeof(g722_context));
+ ctx->handle = EasyG722_init_decoder();
+ return ctx;
+}
+
+void codec_g722_release(void *context) {
+ g722_context *ctx = (g722_context*)context;
+
+ if (!ctx) return;
+ EasyG722_release_decoder(ctx->handle);
+ g_free(ctx);
+}
+
+int codec_g722_decode(void *context, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes) {
+ g722_context *ctx = (g722_context*)context;
+ const unsigned char *bitstream = (const unsigned char*)input;
+ short *speech = (short*)output;
+ int decodedBytes = 0;
+ int i;
+
+ if (!ctx) return 0;
+
+ if ((inputSizeBytes % L_G722_FRAME_COMPRESSED) != 0)
+ return 0;
+
+ if (!output)
+ return (inputSizeBytes / L_G722_FRAME_COMPRESSED) * L_G722_FRAME * sizeof(short);
+
+ while ((inputSizeBytes >= L_G722_FRAME_COMPRESSED) &&
+ ((*outputSizeBytes - decodedBytes) >= L_G722_FRAME * sizeof(short))) {
+ if (EasyG722_decoder(ctx->handle, (unsigned char*)bitstream, ctx->speach_buffer)) {
+ int write_index = 0;
+
+ for(i = 0; i < L_G722_FRAME * sizeof(short); i+=2) {
+ ctx->speach_buffer[write_index] = ctx->speach_buffer[i];
+ write_index++;
+ }
+ memcpy(speech, ctx->speach_buffer, L_G722_FRAME / 2 * sizeof(short));
+
+ speech += L_G722_FRAME / 2;
+ decodedBytes += L_G722_FRAME / 2 * sizeof(short);
+
+ }
+ bitstream += L_G722_FRAME_COMPRESSED;
+ inputSizeBytes -= L_G722_FRAME_COMPRESSED;
+ }
+
+ return decodedBytes;
+}
+
diff --git a/plugins/easy_codec/codec-g722.h b/plugins/easy_codec/codec-g722.h
new file mode 100644
index 0000000000..de41553909
--- /dev/null
+++ b/plugins/easy_codec/codec-g722.h
@@ -0,0 +1,41 @@
+/* codec-g722.h
+* Easy codecs stub for EasyG722
+* 2007 Ales Kocourek
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _CODEC_G722_H_
+#define _CODEC_G722_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *codec_g722_init(void);
+void codec_g722_release(void *ctx);
+int codec_g722_decode(void *ctx, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _CODEC_G729_H_ */ \ No newline at end of file
diff --git a/plugins/easy_codec/codec-g7231.c b/plugins/easy_codec/codec-g7231.c
new file mode 100644
index 0000000000..b1b2b7e1ac
--- /dev/null
+++ b/plugins/easy_codec/codec-g7231.c
@@ -0,0 +1,99 @@
+/* codec-g7231.c
+* Easy codecs stub for EasyG7231
+* 2007 Ales Kocourek
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <glib.h>
+#include <memory.h>
+
+#include "codec-g7231.h"
+
+#include "EasyG7231/EasyG7231.h"
+
+struct g7231_context {
+ CODER_HANDLE handle;
+ short speach_buffer[L_G7231_FRAME];
+};
+
+void *codec_g7231_init(void) {
+ g7231_context *ctx = 0;
+
+ ctx = (g7231_context*)g_malloc0(sizeof(g7231_context));
+ ctx->handle = -1;
+ return ctx;
+}
+
+void codec_g7231_release(void *context) {
+ g7231_context *ctx = (g7231_context*)context;
+
+ if (!ctx) return;
+ EasyG7231_release_decoder(ctx->handle);
+ g_free(ctx);
+}
+
+int codec_g7231_decode(void *context, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes) {
+ g7231_context *ctx = (g7231_context*)context;
+ const unsigned char *bitstream = (const unsigned char*)input;
+ short *speech = (short*)output;
+ int decodedBytes = 0;
+ static int L_G7231_FRAME_COMPRESSED = 0;
+
+ if (!ctx) return 0;
+
+ if ( ctx->handle == -1) {
+ if ( bitstream[0] & 0x03 ) {
+ ctx->handle=EasyG7231_init_decoder(FALSE);
+ L_G7231_FRAME_COMPRESSED = L_G7231_FRAME_COMPRESSED_53;
+ } else {
+ ctx->handle=EasyG7231_init_decoder(TRUE);
+ L_G7231_FRAME_COMPRESSED = L_G7231_FRAME_COMPRESSED_63;
+ }
+ }
+
+ if ((inputSizeBytes % L_G7231_FRAME_COMPRESSED) != 0)
+ return 0;
+
+ if (!output)
+ return (inputSizeBytes / L_G7231_FRAME_COMPRESSED) * L_G7231_FRAME * sizeof(short);
+
+
+ while ((inputSizeBytes >= L_G7231_FRAME_COMPRESSED) &&
+ ((*outputSizeBytes - decodedBytes) >= L_G7231_FRAME * sizeof(short))) {
+ if (EasyG7231_decoder(ctx->handle, (unsigned char*)bitstream, ctx->speach_buffer)) {
+
+ memcpy(speech, ctx->speach_buffer, L_G7231_FRAME * sizeof(short));
+ speech += L_G7231_FRAME;
+ decodedBytes += L_G7231_FRAME * sizeof(short);
+
+ }
+ bitstream += L_G7231_FRAME_COMPRESSED;
+ inputSizeBytes -= L_G7231_FRAME_COMPRESSED;
+ }
+
+ return decodedBytes;
+}
+
diff --git a/plugins/easy_codec/codec-g7231.h b/plugins/easy_codec/codec-g7231.h
new file mode 100644
index 0000000000..9000d33c08
--- /dev/null
+++ b/plugins/easy_codec/codec-g7231.h
@@ -0,0 +1,41 @@
+/* codec-g7231.h
+* Easy codecs stub for EasyG7231
+* 2007 Ales Kocourek
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _CODEC_G7231_H_
+#define _CODEC_G7231_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *codec_g7231_init(void);
+void codec_g7231_release(void *ctx);
+int codec_g7231_decode(void *ctx, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _CODEC_G729_H_ */ \ No newline at end of file
diff --git a/plugins/easy_codec/codec-g729a.c b/plugins/easy_codec/codec-g729a.c
new file mode 100644
index 0000000000..4ad739d955
--- /dev/null
+++ b/plugins/easy_codec/codec-g729a.c
@@ -0,0 +1,85 @@
+/* codec-g729a.c
+* Easy codecs stub for EasyG729A
+* 2007 Tomas Kukosa
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <glib.h>
+#include <memory.h>
+
+#include "codec-g729a.h"
+
+#include "EasyG729A/EasyG729A.h"
+
+struct g729a_context {
+ CODER_HANDLE handle;
+ short speach_buffer[L_G729A_FRAME];
+};
+
+void *codec_g729a_init(void) {
+ g729a_context *ctx = 0;
+
+ ctx = (g729a_context*)g_malloc0(sizeof(g729a_context));
+ ctx->handle = EasyG729A_init_decoder();
+ return ctx;
+}
+
+void codec_g729a_release(void *context) {
+ g729a_context *ctx = (g729a_context*)context;
+
+ if (!ctx) return;
+ EasyG729A_release_decoder(ctx->handle);
+ g_free(ctx);
+}
+
+int codec_g729a_decode(void *context, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes) {
+ g729a_context *ctx = (g729a_context*)context;
+ const unsigned char *bitstream = (const unsigned char*)input;
+ short *speech = (short*)output;
+ int decodedBytes = 0;
+
+ if (!ctx) return 0;
+
+ if ((inputSizeBytes % L_G729A_FRAME_COMPRESSED) != 0)
+ return 0;
+
+ if (!output)
+ return (inputSizeBytes / L_G729A_FRAME_COMPRESSED) * L_G729A_FRAME * sizeof(short);
+
+ while ((inputSizeBytes >= L_G729A_FRAME_COMPRESSED) &&
+ ((*outputSizeBytes - decodedBytes) >= L_G729A_FRAME * sizeof(short))) {
+ if (EasyG729A_decoder(ctx->handle, (unsigned char*)bitstream, ctx->speach_buffer)) {
+ memcpy(speech, ctx->speach_buffer, L_G729A_FRAME * sizeof(short));
+ speech += L_G729A_FRAME;
+ decodedBytes += L_G729A_FRAME * sizeof(short);
+ }
+ bitstream += L_G729A_FRAME_COMPRESSED;
+ inputSizeBytes -= L_G729A_FRAME_COMPRESSED;
+ }
+
+ return decodedBytes;
+}
+
diff --git a/plugins/easy_codec/codec-g729a.h b/plugins/easy_codec/codec-g729a.h
new file mode 100644
index 0000000000..ac75b62d03
--- /dev/null
+++ b/plugins/easy_codec/codec-g729a.h
@@ -0,0 +1,41 @@
+/* codec-g729a.h
+* Easy codecs stub for EasyG729A
+* 2007 Tomas Kukosa
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _CODEC_G729A_H_
+#define _CODEC_G729A_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *codec_g729a_init(void);
+void codec_g729a_release(void *ctx);
+int codec_g729a_decode(void *ctx, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _CODEC_G729A_H_ */ \ No newline at end of file
diff --git a/plugins/easy_codec/easy_codec_plugin.c b/plugins/easy_codec/easy_codec_plugin.c
new file mode 100644
index 0000000000..6ef0b76b10
--- /dev/null
+++ b/plugins/easy_codec/easy_codec_plugin.c
@@ -0,0 +1,47 @@
+/* easy_codec_plugin.c
+* Easy codecs plugin registration file
+* 2007 Tomas Kukosa
+*
+* $Id$
+*
+* Wireshark - Network traffic analyzer
+* By Gerald Combs <gerald@wireshark.org>
+* Copyright 1998 Gerald Combs
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef ENABLE_STATIC
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gmodule.h>
+#include <epan/codecs.h>
+
+#include "codec-g7231.h"
+#include "codec-g729a.h"
+#include "codec-g722.h"
+
+G_MODULE_EXPORT const gchar version[] = "0.0.1";
+
+G_MODULE_EXPORT void register_codec_module(void)
+{
+ register_codec("g723", codec_g7231_init, codec_g7231_release, codec_g7231_decode);
+ register_codec("g729", codec_g729a_init, codec_g729a_release, codec_g729a_decode);
+ register_codec("g722", codec_g722_init, codec_g722_release, codec_g722_decode);
+}
+
+#endif
diff --git a/plugins/easy_codec/moduleinfo.nmake b/plugins/easy_codec/moduleinfo.nmake
new file mode 100644
index 0000000000..1f442288f9
--- /dev/null
+++ b/plugins/easy_codec/moduleinfo.nmake
@@ -0,0 +1,28 @@
+#
+# $Id$
+#
+
+# The name
+PACKAGE=codec_test
+
+# The version
+MODULE_VERSION_MAJOR=0
+MODULE_VERSION_MINOR=0
+MODULE_VERSION_MICRO=1
+MODULE_VERSION_EXTRA=0
+
+#
+# The RC_VERSION should be comma-separated, not dot-separated,
+# as per Graham Bloice's message in
+#
+# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
+#
+# "The RC_VERSION variable in config.nmake should be comma separated.
+# This allows the resources to be built correctly and the version
+# number to be correctly displayed in the explorer properties dialog
+# for the executables, and XP's tooltip, rather than 0.0.0.0."
+#
+
+MODULE_VERSION=$(MODULE_VERSION_MAJOR).$(MODULE_VERSION_MINOR).$(MODULE_VERSION_MICRO).$(MODULE_VERSION_EXTRA)
+RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA)
+
diff --git a/plugins/easy_codec/plugin.rc.in b/plugins/easy_codec/plugin.rc.in
new file mode 100644
index 0000000000..72b4de0775
--- /dev/null
+++ b/plugins/easy_codec/plugin.rc.in
@@ -0,0 +1,34 @@
+#include "winver.h"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @RC_MODULE_VERSION@
+ PRODUCTVERSION @RC_VERSION@,0
+ FILEFLAGSMASK 0x0L
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_PRERELEASE+VS_FF_DEBUG
+#else
+ FILEFLAGS VS_FF_PRERELEASE
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "The Wireshark developer community, http://www.wireshark.org/\0"
+ VALUE "FileDescription", "@PACKAGE@ dissector\0"
+ VALUE "FileVersion", "@MODULE_VERSION@\0"
+ VALUE "InternalName", "@PACKAGE@ @MODULE_VERSION@\0"
+ VALUE "LegalCopyright", "Copyright © 1998 Gerald Combs <gerald@wireshark.org>, Gilbert Ramirez <gram@alumni.rice.edu> and others\0"
+ VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0"
+ VALUE "ProductName", "Wireshark\0"
+ VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "Comments", "Build with @MSVC_VARIANT@\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END