summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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 /CMakeLists.txt
parentd8cdb550445a1bc86626bd9d45da1ce958d1592b (diff)
downloadwireshark-f5e22a14877922aa7b907d2e434958c86efd6875.tar.gz
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 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 446657c950..48ff874ae8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -858,6 +858,10 @@ if(ENABLE_SBC)
set(PACKAGELIST ${PACKAGELIST} SBC)
endif()
+if(ENABLE_SPANDSP)
+ set(PACKAGELIST ${PACKAGELIST} SPANDSP)
+endif()
+
# Capabilities
if(ENABLE_CAP)
set(PACKAGELIST ${PACKAGELIST} CAP SETCAP)
@@ -966,6 +970,9 @@ endif()
if(HAVE_LIBSBC)
set(HAVE_SBC 1)
endif()
+if(SPANDSP_FOUND)
+ set(HAVE_SPANDSP 1)
+endif()
if(EXTCAP_ANDROIDDUMP_LIBPCAP)
set(ANDROIDDUMP_USE_LIBPCAP 1)
endif()
@@ -1335,6 +1342,7 @@ endforeach()
include(FeatureSummary)
#SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ])
SET_FEATURE_INFO(SBC "SBC Codec for Bluetooth A2DP stream playing" "www: http://git.kernel.org/cgit/bluetooth/sbc.git" )
+SET_FEATURE_INFO(SPANDSP "Support for G.722 and G.726 codecs in RTP player" "http://www.soft-switch.org/" )
SET_FEATURE_INFO(LIBSSH "libssh is library for ssh connections and it is needed to build sshdump/ciscodump" "www: https://www.libssh.org/get-it/" )
FEATURE_SUMMARY(WHAT ALL)
@@ -1607,6 +1615,13 @@ if(WIN32)
"${_dll_output_dir}"
)
endif(SBC_FOUND)
+ if (SPANDSP_FOUND)
+ add_custom_command(TARGET copy_cli_dlls PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${SPANDSP_DLL_DIR}/${SPANDSP_DLL}"
+ "${_dll_output_dir}"
+ )
+ endif(SPANDSP_FOUND)
if (SMI_FOUND)
# Wireshark.nsi wants SMI_DIR which is the base SMI directory
get_filename_component(SMI_DIR ${SMI_DLL_DIR} DIRECTORY)