forked from osmocom/wireshark
f5e22a1487
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>
87 lines
2.9 KiB
Bash
Executable file
87 lines
2.9 KiB
Bash
Executable file
#!/bin/sh
|
|
# Setup development environment on Debian and derivatives such as Ubuntu
|
|
#
|
|
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
#
|
|
# We drag in tools that might not be needed by all users; it's easier
|
|
# that way.
|
|
#
|
|
|
|
for op in $@
|
|
do
|
|
if [ "$op" = "--install-optional" ]
|
|
then
|
|
ADDITIONAL=1
|
|
else
|
|
OPTIONS="$OPTIONS $op"
|
|
fi
|
|
done
|
|
|
|
BASIC_LIST="libgtk2.0-dev libpcap-dev bison flex make automake \
|
|
libtool python perl"
|
|
|
|
ADDITIONAL_LIST="libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \
|
|
libc-ares-dev libkrb5-dev libqt5svg5-dev lynx libsmi2-dev \
|
|
portaudio19-dev asciidoc libgcrypt-dev libsbc-dev libgeoip-dev \
|
|
qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \
|
|
libparse-yapp-perl qt5-default cmake libcap-dev \
|
|
liblz4-dev libsnappy-dev libspandsp-dev"
|
|
|
|
# Adds package $2 to list variable $1 if the package is found
|
|
add_package() {
|
|
local list="$1" pkgname="$2"
|
|
|
|
# fail if the package is not known
|
|
[ -n "$(apt-cache show "$pkgname" 2>/dev/null)" ] || return 1
|
|
|
|
# package is found, append it to list
|
|
eval "${list}=\"\${${list}} \${pkgname}\""
|
|
}
|
|
|
|
# only needed for newer distro versions where "libtool" binary is separated.
|
|
# Debian >= jessie, Ubuntu >= 16.04
|
|
add_package BASIC_LIST libtool-bin
|
|
|
|
# Debian >= wheezy-backports, Ubuntu >= 16.04
|
|
add_package ADDITIONAL_LIST libnghttp2-dev ||
|
|
echo "libnghttp2-dev is unavailable" >&2
|
|
|
|
# libssh-gcrypt-dev: Debian >= jessie, Ubuntu >= 16.04
|
|
# libssh-dev (>= 0.6): Debian >= jessie, Ubuntu >= 14.04
|
|
add_package ADDITIONAL_LIST libssh-gcrypt-dev ||
|
|
add_package ADDITIONAL_LIST libssh-dev ||
|
|
echo "libssh-gcrypt-dev and libssh-dev are unavailable" >&2
|
|
|
|
# libgnutls-dev: Debian <= jessie, Ubuntu <= 16.04
|
|
# libgnutls28-dev: Debian >= wheezy-backports, Ubuntu >= 12.04
|
|
add_package ADDITIONAL_LIST libgnutls28-dev ||
|
|
add_package ADDITIONAL_LIST libgnutls-dev ||
|
|
echo "libgnutls28-dev and libgnutls-dev are unavailable" >&2
|
|
|
|
# Install basic packages
|
|
apt-get install $BASIC_LIST $OPTIONS
|
|
|
|
# Now arrange for optional support libraries
|
|
if [ ! $ADDITIONAL ]
|
|
then
|
|
echo "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n"
|
|
else
|
|
apt-get install $ADDITIONAL_LIST $OPTIONS
|
|
fi
|