Commit Graph

90 Commits

Author SHA1 Message Date
Dario Lombardo fe71e26af2 spdx: more licenses converted.
Change-Id: I3861061ec261e63b23621799e020e811ed78a343
Reviewed-on: https://code.wireshark.org/review/26333
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 15:56:44 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Dario Lombardo 016e407702 codex: use SPDX identifiers.
Change-Id: I02f43e660484e9c0ebce96b42dbdd7b4229a1198
Reviewed-on: https://code.wireshark.org/review/25560
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:38:26 +00:00
Jaap Keuter 8342e5f97b codecs: register SBC codec once.
Somehow the registration of the SBC codec was duplicated, which does not
(yet) cause an error message, but also doesn't work.
Remove the duplicate registration.

Change-Id: Ic22ba66fd65b326fb2688300dad8f9b81081c7e5
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25506
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-29 13:08:32 +00:00
Gerald Combs 5639b8014a Use an enum for plugin types.
Make plugins.c the source of truth for plugin names. Where plugins
reside and what they do are two different things, so split the plugin
directory and description into two separate elements.

CMake creates portable[1] builds on Windows and macOS. That is, the
build-time directory layout is the same as the installation directory
layout. Adjust various plugin paths macOS accordingly.

[1] You have to run osx-app.sh on macOS to prepare the application
bundle, but the goal is to create a directory/bundle that can be moved
or copied to a different system and run in the new location.

Change-Id: Icf9d02e61918fdf1404468baf52542910edf2743
Reviewed-on: https://code.wireshark.org/review/25166
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-11 00:58:43 +00:00
João Valverde 995812c5f1 Refactor plugin registration and loading
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.

Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).

The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.

Currently we only distribute "epan" (libwireshark) plugins.

Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 08:43:57 +00:00
João Valverde 262a84c384 Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support
libraries only.

Before the patch:

Static plugins don't work with CMake and autotools.

autotools static build is broken, and most likely will always be, as
building Wireshark all-static is difficult and time-consuming.

After the patch:

For CMake Wireshark will be built with static or shared libraries and
dynamic plugins. Everything just works. CMake apparently doesn't want
you building static and shared libraries at the same time.

For autotools Wireshark will be built with shared libraries by default.
--disable-shared and --enable-static options work as usual. Dlopened
plugins are not built if --disable-shared is given to configure (to
disable shared libraries). This is a limitations imposed by libtool.

Tested on Linux. This removes broken support for building plugins
statically.

Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c
Reviewed-on: https://code.wireshark.org/review/24241
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-19 20:16:50 +00:00
João Valverde 1097e8020a autotools: Library build products don't need explicit cleaning
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff
Reviewed-on: https://code.wireshark.org/review/24484
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-18 22:29:41 +00:00
João Valverde 9764cd0a83 autotools: make maintainer-clean should allow rerunning 'configure'
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d
Reviewed-on: https://code.wireshark.org/review/23928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 14:17:20 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).

Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.

Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.

Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-13 21:32:18 +00:00
João Valverde 221a2bcbd0 Move some DIAG_OFFs to make code less ugly
Change-Id: I0f343ab69a6592a466e12e5d258f0878b9c32c25
Reviewed-on: https://code.wireshark.org/review/23752
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-26 17:28:10 +00:00
João Valverde 85c0a78073 plugins: Use g_slist_prepend() instead.
Change-Id: If145137bfd44025ccab762b67960072777efd302
Reviewed-on: https://code.wireshark.org/review/23750
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-26 13:54:34 +00:00
João Valverde dcf52a1695 Install libwiretap and libwscodecs headers
Change-Id: Ie7376ac5fd8a950e3c1c744ce4701b14ee1849ea
Reviewed-on: https://code.wireshark.org/review/23664
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-24 10:23:53 +00:00
João Valverde d0a91b27f2 plugins: config.h must not be included by public headers
For a sane plugin build environment. Include config.h as the first
header in the .c file instead.

Fix by moving required compiler attribute macros to a new
"ws_attributes.h" API header.

Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1
Reviewed-on: https://code.wireshark.org/review/23400
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-06 08:10:56 +00:00
Pascal Quantin 3e54cabf81 Add G.729 decoding based on bcg729 library
Bug: 13635
Change-Id: Ic22a0719a59da13e51425aeb747e88caca0d6512
Reviewed-on: https://code.wireshark.org/review/22808
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-30 05:22:35 +00:00
Pascal Quantin fc4bb7eb74 Change SpanDSP capitalization
Many capitalization can be found for this library (spandsp, Spandsp, SpanDSP),
let's use the one found in the library README and in its spec file.

Change-Id: Ia66b723e5d582a6218da1b6366b7d4859272f80c
Reviewed-on: https://code.wireshark.org/review/19122
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-07 00:51:14 +00:00
Peter Wu f5e22a1487 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>
2016-12-06 17:51:47 +00:00
Peter Wu 51d23c6959 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>
2016-12-04 17:29:24 +00:00
Peter Wu 98efddc6c2 codecs: allow it to be used without plugins
Not all codecs require the plugin infrastructure. For example, G.711U/A
is a built-in codec. Allow such functionality to be registered even if
plugin support is disabled.

Change-Id: I2505cc9955e7953268ec0739531278921f70a771
Reviewed-on: https://code.wireshark.org/review/18977
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-04 17:29:11 +00:00
João Valverde 640382c743 CMake: Allow setting per target compiler warnings
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow
using different flags per target.

Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS
and using the COMPILE_OPTIONS property to set them.

This change is just setting mechanism and there should be no difference
in generated warnings.

The check_X_compiler_flag cmake test is changed to test each flag individually.
We need a list, not a space separated string, and the aggregate test is not
significant.

Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25
Reviewed-on: https://code.wireshark.org/review/17150
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-23 21:33:09 +00:00
Dario Lombardo 3a7e3057e6 codecs/speex: add check in speex_resampler_init_frac/set_rate_frac (CID 1355648).
Add checks to avoid den_rate and num_rate to be set to 0.

Change-Id: Ia4880521e7ab73d0fdc44377f4badadb09365471
Reviewed-on: https://code.wireshark.org/review/16963
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-19 11:23:37 +00:00
João Valverde a16d401b25 Remove Makefile.common files
Now that nmake build system has been removed they are not needed anymore.

Change-Id: I88075f955bb4349185859c1af4be22e53de5850f
Reviewed-on: https://code.wireshark.org/review/16050
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-06-30 11:04:17 +00:00
Pascal Quantin df231d9c52 libcodecs and libwsutil are DLLs, not static libraries
Change-Id: I4486f35e07c72d4ca35d5649de25d0c9abd2a964
Reviewed-on: https://code.wireshark.org/review/16057
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-21 14:31:16 +00:00
Pascal Quantin 6baa1b544c Remove Nmake build system
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61
Reviewed-on: https://code.wireshark.org/review/15777
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15 19:21:57 +00:00
João Valverde bb0ec15bd9 speex: Fix unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
Change-Id: Ia6c5d2c19d991ee3ca3b1525b93121ee7cf15b1e
Reviewed-on: https://code.wireshark.org/review/13919
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-05-22 05:39:36 +00:00
João Valverde 9f8fc21b62 autotools: Check for SpeexDSP system library
Change-Id: Ie07f49ec5a563f3b43a2442e05646c6a0b51ca41
Reviewed-on: https://code.wireshark.org/review/15349
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-05-16 14:16:41 +00:00
João Valverde 8e0a9dc8ba codecs: Move noinst_HEADERS to Makefile.am
It's not common code and because it is only required for make dist
placing it in Makefile.am provides better automake readability.

Also noinst_HEADERS is not necessary in _SOURCES.

Change-Id: I5269b79b62141efbc3151e69c5584643e5ebec47
Reviewed-on: https://code.wireshark.org/review/15399
Reviewed-by: João Valverde <j@v6e.pt>
2016-05-12 12:44:11 +00:00
Graham Bloice 2e23b506c7 Add checkAPI calls to CMake.
This generates a top level target, checkAPI, that is
excluded from the ALL build target, so must be run separately.

On Windows using a Visual Studio generator, call
msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj

Change-Id: I44a57c564dcfc75499463b942436f4b920a82478
Reviewed-on: https://code.wireshark.org/review/14873
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-05-02 12:01:24 +00:00
João Valverde ecb4dc396e Include ws_diag_control.h in config.h
Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317
Reviewed-on: https://code.wireshark.org/review/14749
Petri-Dish: João Valverde <j@v6e.pt>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-04 23:05:31 +00:00
João Valverde f0fb79d534 autotools: Use pkg-config autoconf macros for GLib/GTK
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset
of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add
dependency flags explicitly instead of using WS_CPPFLAGS.

Some minor improvements and fixes for missing/unnecessary variables (no impact
on our test builds).

Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671
Reviewed-on: https://code.wireshark.org/review/14005
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 07:51:55 +00:00
Guy Harris b32a5ee98c Don't add the wiretap directory to the list of include directories.
If you include something from the wiretap directory, always precede it
with wiretap/.

Fix some includes of files in the top-level directory to use a path
relative to the current directory, not relative to the wiretap
directory.

This makes it a bit clearer what's being included.

Change-Id: Ib99655a13c6006cf6c3112e9d4db6f47df9aff54
Reviewed-on: https://code.wireshark.org/review/13990
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-18 12:55:26 +00:00
João Valverde 387c8864bf autotools: Move SBC dependency to libwscodecs
Change-Id: I931961033798613b78f846c9176dffdb8385bf43
Reviewed-on: https://code.wireshark.org/review/13782
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07 23:23:16 +00:00
João Valverde aa37baec70 CMake: Avoid unnecessary link dependency with SBC and fix debian warnings
Fixes dpkg warnings:

  dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/wireshark-qt/usr/bin/wireshark was not linked against libsbc.so.1 (it uses none of the library's symbols)
  dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/wireshark-gtk/usr/bin/wireshark-gtk was not linked against libsbc.so.1 (it uses none of the library's symbols)
  dpkg-shlibdeps: warning: symbol sbc_decode used by debian/libwscodecs0/usr/lib/x86_64-linux-gnu/libwscodecs.so.0.0.0 found in none of the libraries
  dpkg-shlibdeps: warning: symbol sbc_init used by debian/libwscodecs0/usr/lib/x86_64-linux-gnu/libwscodecs.so.0.0.0 found in none of the libraries
  dpkg-shlibdeps: warning: symbol sin used by debian/libwscodecs0/usr/lib/x86_64-linux-gnu/libwscodecs.so.0.0.0 found in none of the libraries
  dpkg-shlibdeps: warning: symbol floorf used by debian/libwscodecs0/usr/lib/x86_64-linux-gnu/libwscodecs.so.0.0.0 found in none of the libraries
  dpkg-shlibdeps: warning: symbol floor used by debian/libwscodecs0/usr/lib/x86_64-linux-gnu/libwscodecs.so.0.0.0 found in none of the libraries
  dpkg-shlibdeps: warning: symbol sbc_finish used by debian/libwscodecs0/usr/lib/x86_64-linux-gnu/libwscodecs.so.0.0.0 found in none of the libraries

Change-Id: I71911513c348edd336cdc82ea358b6a05760b4b9
Reviewed-on: https://code.wireshark.org/review/13784
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-02-06 11:06:35 +00:00
João Valverde 265a41e14d autotools: Don't use "user variables" to set build flags
GNU coding standards recommend against it and automake is designed
around it.

This allows overriding the global build flags using AM_CFLAGS, etc.,
or per object flags, something that is difficult or impossible currently
because of automake precedence rules.

Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12
Reviewed-on: https://code.wireshark.org/review/13455
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-28 18:13:48 +00:00
Pascal Quantin 08527e9b85 codecs: add deregister_codec API
Change-Id: I83ecc7e4f8c827c83c2f6b62918f042d023daee4
Reviewed-on: https://code.wireshark.org/review/13575
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-28 14:10:39 +00:00
Pascal Quantin d8c794e16d codecs: fix libary name when compiling with CMake
Change-Id: I0ef328ac9a1fd7281267dbb7f9d1ace97ab41071
Reviewed-on: https://code.wireshark.org/review/12422
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-04 07:06:06 +00:00
Guy Harris 3a54b294df More libcodecs -> libwscodecs.
Change-Id: Ieb0bb131b6d141bf85997c9a0127e0eb11ea3a3b
Reviewed-on: https://code.wireshark.org/review/12420
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-04 00:10:28 +00:00
Pascal Quantin 651e0884b7 Change codecs from static to dynamic library
This allows to properly register codecs plugins.
See https://www.wireshark.org/lists/wireshark-dev/201511/msg00202.html for details.

Change-Id: Ibc13a19936abb7a2e81b86582a75fa424351565b
Reviewed-on: https://code.wireshark.org/review/12385
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-03 23:54:49 +00:00
Gerald Combs d487c8c7e7 SpeexDSP: Work around self assignments.
Disable -Wself-assign in speex/resample.c. Many macros (particularly
SATURATE32PSHR) simply return the first argument.

Change-Id: I3a8557833343e7b213031359e94af90d32d9f082
Reviewed-on: https://code.wireshark.org/review/12315
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-01 00:21:40 +00:00
Peter Wu 5b1d142f52 Fix warnings introduced by "Qt: Initial RTP playback"
Change-Id: I28ae077be535f32ef81ac370d6782033f219017d
Reviewed-on: https://code.wireshark.org/review/10777
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05 03:21:46 +00:00
Gerald Combs e7c0e5bd1e Add another speex cast.
Change-Id: Ic46823788fa240ebadd44ec2c6d332980af597be
Reviewed-on: https://code.wireshark.org/review/10755
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 22:50:49 +00:00
Gerald Combs 93d8bbd586 Add casts to the speex resampler.
Try to fix

speex/resample.c:294: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:294: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:324: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:419: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:536: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:632: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:638: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:645: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:697: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:699: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:817: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:818: warning: implicit conversion shortens 64-bit value into a 32-bit value
speex/resample.c:819: warning: implicit conversion shortens 64-bit value into a 32-bit value

on the 64-bit OS X builder.

Change-Id: Ifad32f5cd6ffe1186c8f9db593cc1c34e67357ce
Reviewed-on: https://code.wireshark.org/review/10752
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 20:25:01 +00:00
Gerald Combs 4d10e817b5 Distcheck fixes.
Add more speex files to the distribution.

Comment out a for-now-unused variable.

Change-Id: Iea3a0fad81e2cb599209e1c30ecbdbdb153d1328
Reviewed-on: https://code.wireshark.org/review/10749
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 19:38:39 +00:00
Gerald Combs 3687d39304 Qt: Initial RTP playback.
Note the "initial". This is woefully incomplete.  See the "to do" lists
below and in the code.

This differs a bit from the GTK+ version in that you specify one or more
streams to be decoded.

Instead of showing waveforms in individual widgets, add them all to a
single QCustomPlot. This conserves screen real estate and lets us more
easily take advantage of the QCP API. It also looks better IMHO.

Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We
probably won't use the widgets until we make 5.0 our minimum Qt
version and plain old QtMultimedia lets us support Qt 4 more easily
(in theory at least).

Add resampling code from libspeex. I initially used this to resample
each packet to match the preferred rate of our output device, but this
resulted in poorer audio quality than expected. Leave it in and use to
create visual samples for QCP and to match rates any time the rate
changes. The latter is currently untested.

Add some debugging macros.

Note that both the RTP player and RTP analysis dialogs decode audio data
using different code.

Note that voip_calls_packet and voip_calls_init_tap appear to be dead
code.

To do:

- Add silence frames where needed.
- Implement the jitter buffer.
- Implement the playback timing controls.
- Tapping / scanning streams might be too slow.

Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4
Bug: 9007
Reviewed-on: https://code.wireshark.org/review/10458
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:26:05 +00:00
Dario Lombardo ecc62d8706 codecs/gtk: fix int to size_t
Change-Id: I8f467f09375c8227c4b70aef47ff3a590a0c00d7
Reviewed-on: https://code.wireshark.org/review/10413
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-09 17:53:08 +00:00
Graham Bloice a7a17047eb Minor CMake updates to better group build artefacts
Move capchild, caputils, codecs and wsutil into a Libs group
Move gtkui into UI group
Move update-sminmpec into tools group

Change-Id: Iaf2bfe4697265af2c3ed9c9d7de2d5d1ef3cafee
Reviewed-on: https://code.wireshark.org/review/6332
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-05 23:48:46 +00:00
Graham Bloice aad1a81b99 Fix out-of-tree build includes of config.h
If a file in the same directory as config.h, e.g. wireshark-qt.cpp
has a #include "config.h", or another header it includes also has
a #include "config.h", then an out-of-tree build, e.g. CMake will
pick up any in-tree config.h and odd things may happen.  The correct
form is #include <config.h> which will pick up the out-of-tree
version.

To find this, introduce a deliberate error and then make an out-of-tree
build, noting where it fails and fix that file.  If that file includes
other files that still cause the build to fail, set the compiler
to emit the pre-processed version so you can locate the include with
the next errant "config.h".  Repeat ad nauseum.

Possibly all includes of "config.h" should be changed to <config.h>

Revert "CMake: Clobber the top-level config.h before we build."

This reverts commit 1f3849ce61.

Ping-Bug: 10301
Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341
Reviewed-on: https://code.wireshark.org/review/6285
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-04 00:26:13 +00:00
Bill Meier 5c529c95c5 Add '*.nativecodeanalysis.xml' to 'clean' targets
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6
Reviewed-on: https://code.wireshark.org/review/6220
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 01:45:16 +00:00
Dario Lombardo 63ebe918d9 Removed duplicated #include lines
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c
Reviewed-on: https://code.wireshark.org/review/6065
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-28 00:02:39 +00:00
Gerald Combs 3147087de3 Fix ranlib "has no symbols" errors in the codecs directory.
Don't build the G.722 or G.726 codecs for now. Each are wrapped in
"#ifdef HAVE_SPANDSP", which we don't define.

Conditionally compile the SBC codec.

Change-Id: I5f09ff66514f967d4f0611c943b4e6a975b8994b
Reviewed-on: https://code.wireshark.org/review/5690
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-09 21:25:19 +00:00