Commit Graph

24 Commits

Author SHA1 Message Date
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +00:00
Moshe Kaplan 3953ddcf57 Add UI header files to Doxygen
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
2021-11-30 08:01:36 -05:00
João Valverde 39df3ae3c0 Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
Gerald Combs 9222bd77cd Remove unneeded modelines in ui.
Remove the editor modeline blocks from the source files in ui that use 4
space indentation by running

perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -l shiftwidth=4 $( ag -g '\.(c|cpp|h|m|mm)') )

This gives us one source of indentation truth for these files, and it
*shouldn't* affect anyone since

- These files match the default in our top-level .editorconfig.

- The one notable editor that's likely to be used on these files and
*doesn't* support EditorConfig (Qt Creator) defaults to 4 space
indentation.
2021-04-20 07:43:39 +00:00
Guy Harris 2820156fbd Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 13:50:13 -07:00
Michal Ruprich c8246c9973 Moving glib.h out of extern C 2021-02-10 17:49:09 +00:00
Jirka Novak 2a5c96a799 Voice dialogs: Added option to apply display filter in VoIP/RTP dialogs
VoIP Calls dialog and RTP Streams dialog has now option to apply display
filter dialog during processing packets.
Filter checkbox is activated during dialog open when display filter is active.

New field apply_display_filter had to be added to voip_calls_tapinfo_t and
_rtpstream_tapinfo/rtpstream_tapinfo_t structures.
2021-01-01 19:06:58 +00:00
Jirka Novak 41bf14a39d VoIP Calls Dialog: List of calls is not cleared/refilled on retaps
!1257 solved issue with duplication of information, but removed all
calls from VoIP Calls dialog. This patch solves the issue.
It was tested with many samples and provides same output as 3.4 branch.
2020-12-31 07:41:36 +00:00
j.novak@netsystem.cz 396baef3e5 voip_calls_dialog/voip_calls: Fix for #16952
The fix solves issue #16952. It reverts commit 88813716 which introduced memory leak which causes the issue. The original issue with duplicating entries is solved too.
Because commit was cherry picked to 3.4.0 (might be in more branches), this patch should be cherry picked too.
2020-12-30 08:51:00 +00:00
Jiri Novak 9f8c332c59 RTP: code cleanup 3
*rtp_stream* -> rtpstream to follow common name

Change-Id: I381bc1cdb8206c5cfe67e94dd7fb1a5cb25f9c16
Reviewed-on: https://code.wireshark.org/review/28394
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-23 10:03:54 +00:00
Gerald Combs 1d030928ef Remove some GTK+-only code.
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:44:47 +00:00
Jaap Keuter ca7ac05cf0 Fix some source headers, reformat SPDX license lines in comment block.
Change-Id: Ibae6a64a9915003435a3fb17763535a3844143be
Reviewed-on: https://code.wireshark.org/review/25891
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 22:50:37 +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 e5f4ef0c42 ui: use SPDX identifiers.
Change-Id: I6b05399395bcc35e59b73b4030ba4a05711a7b1a
Reviewed-on: https://code.wireshark.org/review/25565
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:04 +00:00
Michael Mann 620d54b1e3 Complete move of tap-sequence-analysis.c functionality to sequence_analysis.c
Since dissectors are now populating the timestamp of the seq_analysis_item_t
structure within the tap function, don't have the sequence_anaylsis redo it
when writing an ASCII file.  This removes the need for the capture_file
parameter and simplifies the logic a bit.

Also just have GUI register the tap itself.  It will provide for some more
flexibility in the future.

Change-Id: I55b2f951b977ea70ac9f7eb4929245b0779e5f0e
Reviewed-on: https://code.wireshark.org/review/23650
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-21 22:16:09 +00:00
Pascal Quantin afaf929d0d Qt: various fixes to VoIP calls / RTP player windows
- Flush any remaining tapped packets before emitting captureFileRetapFinished().
  This ensures that all packets have been treated before returning from retapPackets().
- Remove VoIP tap listeners when captureFileRetapFinished() is emitted.
  This avoid summing stats each time the RTP player is opened, leading to wrong
  information in VoIP calls window
- Change voip_calls_tapinfo_t redraw member from a boolean to bitmap so as to identify
  which tap should call the tapinfo->tap_draw() callback. This allows fixing a race condition
  where the RTP player can be empty in Qt UI
- Reset some more statistics in voip_calls_reset_all_taps()

Change-Id: Ie7681702c81d338185c1813f2d340a437edf3a04
Reviewed-on: https://code.wireshark.org/review/12474
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: Anders Broman <a.broman58@gmail.com>
2015-12-09 16:54:33 +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 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
Michal Pazdera c711a63e48 Avoid duplicate SIP and Q.931 calls in VoIP Calls list in case of Q.931
transported over SIP as described in RFC 3204, 3.2 QSIG Media Type.

Change-Id: Ida30a7b115e60fa64d30cfc1f4b7c11be724f8ee
Reviewed-on: https://code.wireshark.org/review/9479
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-26 07:32:34 +00:00
Bill Meier 9c866ff971 Replace tabs by spaces when editor modelines has "expandtab"
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7
Also: tabs-stops should be 8
Reviewed-on: https://code.wireshark.org/review/7100
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 17:34:53 +00:00
Gerald Combs 2bb8255e29 Consolidate RTP stream structs.
Consolidate the three different RTP stream structs in ui/rtp_stream.h,
ui/gtk/rtp_player.c, and ui/voip_calls.c into one. Make the member names
a bit more consistent. Document what each GList contains. Use nstime_t
for timestamps since that's what we get from the frame data. Use g_new0
to initialize our structs.

Change-Id: I2b3f8f2051394a6a98a5c7bc49c117f07161d031
Reviewed-on: https://code.wireshark.org/review/5843
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 16:49:05 +00:00
Gerald Combs 4921e55990 Qt: Initial VoIP Calls dialog.
Add Telephony menu items for VoIP Calls and SIP Flows. Put VoIP Calls at
the top, since that seems to be the primary item.

Add configure-time checks for QtMultimediaWidgets in anticipation of
adding a VoIP playback dialog.

Add an icon for the playback button. (Yes, I've been avoiding
GNOME-level gratuitous icons so far but this is one of the rare
occiasions where it makes sense.)

Add a help link define for the VoIP calls dialog.

Change-Id: I5d0799685c598ad9af76fe9667f8ea7d14b66050
Reviewed-on: https://code.wireshark.org/review/5674
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-09 21:25:33 +00:00
Gerald Combs 06dc2a7537 voip_calls: Fix tap callbacks.
We don't need to call the VoIP tap reset and draw callbacks repeately.
Do so only once from the RTP tap. Packet callbacks should return a
gboolean.

Clean up some function names and make some static.

Change-Id: I5c934ce8ce7f279861e8cc73235bbfc27d7fe622
Reviewed-on: https://code.wireshark.org/review/5396
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-19 17:14:52 +00:00
Gerald Combs 1dec509a88 voip_calls: Move to ui.
Move voip_calls.[ch] to ui. Add callbacks to voip_calls_tapinfo_t.
Remove unused function definitions.

Change-Id: Ib12db7053d53afa81ef2a66dc0cfe681bc624dd2
Reviewed-on: https://code.wireshark.org/review/5379
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-18 00:48:34 +00:00