Show codec information in About dialog
authorPeter Wu <peter@lekensteyn.nl>
Mon, 28 Nov 2016 23:58:40 +0000 (00:58 +0100)
committerPeter Wu <peter@lekensteyn.nl>
Sun, 4 Dec 2016 17:29:24 +0000 (17:29 +0000)
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>
codecs/codecs.c
codecs/codecs.h
debian/libwscodecs0.symbols
ui/gtk/main.c
wireshark-qt.cpp

index e8987bd44748f93198707f3cbd0f715383ff51f0..8b6fcb3efcf4ca03796fce45e36abd46d58477cf 100644 (file)
@@ -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
  *
index 8825d9e6856198452795175066e01bc86812f312..10aceae0d7bb10ad7c82252f2d899b8919922ccf 100644 (file)
@@ -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;
 
index e6d8136b316e35707b6d08f5f40166b6b45e314d..522525c5e349ca6f826b06a6a46d57b02a79fc00 100644 (file)
@@ -8,6 +8,7 @@ libwscodecs.so.0 libwscodecs0 #MINVER#
  deregister_codec@Base 2.1.0
  find_codec@Base 2.1.0
  register_all_codecs@Base 2.1.0
+ codec_get_compiled_version_info@Base 2.3.0
  register_codec@Base 2.1.0
  ws_codec_resampler_destroy@Base 2.1.0
  ws_codec_resampler_get_input_latency@Base 2.1.0
index eae76e4d4767b03c4c0c1bcab6e6b67ab60e5adb..041428099de23320083384ebc5feaa928fe35d50 100644 (file)
@@ -1875,6 +1875,8 @@ get_gui_compiled_info(GString *str)
 #else
     g_string_append(str, "without AirPcap");
 #endif
+
+    codec_get_compiled_version_info(str);
 }
 
 void
index 3fa5fad9f96e4378aa519d45f3abf07581337aa4..0cc8664140de22a32af804715d846e6aa3668cba 100644 (file)
@@ -216,6 +216,8 @@ get_gui_compiled_info(GString *str)
 #else
     g_string_append(str, "without AirPcap");
 #endif
+
+    codec_get_compiled_version_info(str);
 }
 
 // xxx copied from ../gtk/main.c