path: root/configure.ac
diff options
authorPeter Wu <peter@lekensteyn.nl>2016-11-24 00:27:14 +0100
committerPeter Wu <peter@lekensteyn.nl>2016-12-06 17:51:47 +0000
commitf5e22a14877922aa7b907d2e434958c86efd6875 (patch)
tree33439d1a8cd3322faa9ce8b0f6b12a08427d47fb /configure.ac
parentd8cdb550445a1bc86626bd9d45da1ce958d1592b (diff)
codecs: Add support for G.722 and G.726
Integrate the Spandsp library for G.722 and G.726 support. Adds support for G.722 and all eight variants of G.726. Note: this also fixes a crash in Qt (buffer overrun, reading too much data) caused by confusion of the larger output buffer (resample_buff) with the smaller input buffer (decode_buff). It was not triggered before because the sample rate was always 8k, but with the addition of the new codecs, a different sample rate became possible (16k). Fix also a crash which occurs when the RTP_STREAM_DEBUG macro is enabled and the VOIP Calls dialog is opened (the begin frame, start_fd, is not yet known and therfore a NULL dereference could occur). Passes testing (plays normally without bad RTP timing errors) with SampleCaptures files: sip-rtp-g722.pcap and sip-rtp-g726.pcap. Tested with cmake (Qt), autotools (Qt and GTK+) with ASAN enabled. Bug: 5619 Change-Id: I5661908d193927bba50901079119eeff0c04991f Reviewed-on: https://code.wireshark.org/review/18939 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 'configure.ac')
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d39c3746d6..6510b983fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2538,6 +2538,27 @@ else
AM_CONDITIONAL(HAVE_SBC, test "x$have_sbc" = "xyes")
+# Check Spandsp library for RTP Player
+# http://www.soft-switch.org/
+ AC_HELP_STRING( [--with-spandsp=@<:@yes/no@:>@],
+ [use Spandsp to play G.722/G.726 codecs @<:@default=yes, if available@:>@]),
+ with_spandsp="$withval"; want_spandsp="yes", with_spandsp="yes")
+PKG_CHECK_MODULES(SPANDSP, spandsp, [have_spandsp=yes], [have_spandsp=no])
+if test "x$with_spandsp" != "xno"; then
+ if (test "${have_spandsp}" = "yes"); then
+ AC_DEFINE(HAVE_SPANDSP, 1, [Define if you have the spandsp library])
+ elif test "x$want_spandsp" = "xyes"; then
+ # Error out if the user explicitly requested the spandsp library
+ AC_MSG_ERROR([Spandsp library was requested, but is not available])
+ fi
+ have_spandsp=no
+AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes")
dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.ac
@@ -3151,6 +3172,7 @@ echo " Use libssh library : $libssh_message"
echo " Have ssh_userauth_agent : $ssh_userauth_agent_message"
echo " Use nl library : $libnl_message"
echo " Use SBC codec library : $have_sbc"
+echo " Use Spandsp library : $have_spandsp"
echo " Use nghttp2 library : $nghttp2_message"
echo " Use LZ4 library : $have_lz4"
echo " Use Snappy library : $have_snappy"