summaryrefslogtreecommitdiff
path: root/codecs
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-11-29 00:58:40 +0100
committerPeter Wu <peter@lekensteyn.nl>2016-12-04 17:29:24 +0000
commit51d23c6959edfbf45033ba26237820fa2914ff77 (patch)
tree7f1b21fcf2f17529a25107a591726213ffa7a728 /codecs
parent98efddc6c26313809b6f9326f09f76c390d21676 (diff)
downloadwireshark-51d23c6959edfbf45033ba26237820fa2914ff77.tar.gz
Show codec information in About dialog
Show codec libraries in About dialog, this should give the user a clue of what codecs are available. SBC is already supported, Spandsp (for G.722/G.726) is work in progress. Change-Id: Iebc4d9c9fae619a442e06c8afc780a420aa3971b Reviewed-on: https://code.wireshark.org/review/18978 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'codecs')
-rw-r--r--codecs/codecs.c20
-rw-r--r--codecs/codecs.h5
2 files changed, 25 insertions, 0 deletions
diff --git a/codecs/codecs.c b/codecs/codecs.c
index e8987bd447..8b6fcb3efc 100644
--- a/codecs/codecs.c
+++ b/codecs/codecs.c
@@ -216,6 +216,26 @@ size_t codec_decode(codec_handle_t codec, void *context, const void *input, size
return (codec->decode_fn)(context, input, inputSizeBytes, output, outputSizeBytes);
}
+/**
+ * Get compile-time information for libraries used by libwscodecs.
+ */
+void codec_get_compiled_version_info(GString *str)
+{
+ /* SBC */
+#ifdef HAVE_SBC
+ g_string_append(str, ", with SBC");
+#else
+ g_string_append(str, ", without SBC");
+#endif
+
+ /* Spandsp (G.722, G.726) */
+#ifdef HAVE_SPANDSP
+ g_string_append(str, ", with Spandsp");
+#else
+ g_string_append(str, ", without Spandsp");
+#endif
+}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/codecs/codecs.h b/codecs/codecs.h
index 8825d9e685..10aceae0d7 100644
--- a/codecs/codecs.h
+++ b/codecs/codecs.h
@@ -41,6 +41,11 @@ WS_DLL_PUBLIC void codec_register_plugin_types(void);
*/
WS_DLL_PUBLIC void register_all_codecs(void);
+/**
+ * Get compile-time information for libraries used by libwscodecs.
+ */
+WS_DLL_PUBLIC void codec_get_compiled_version_info(GString *str);
+
struct codec_handle;
typedef struct codec_handle *codec_handle_t;