Commit Graph

106 Commits

Author SHA1 Message Date
j.novak@netsystem.cz e67c71faba RTP Player: Fix: Playback marker do not move after resume with Qt6 2022-11-24 15:32:36 +00:00
j.novak@netsystem.cz 2c56c0bad6 RTP Player: Fix: Only silence played on Windows with Qt 6.x 2022-10-08 09:30:52 +00:00
j.novak@netsystem.cz bb4de1a046 RTP dialogs: Fix: Coloring of QTreeWidgetItem do not work 2022-09-27 09:48:40 +00:00
Jirka Novak 476eb0e627 RTP player: fixed issue with no audio card available in Qt6 2022-07-21 20:09:52 +00:00
Jirka Novak ea91c5785a Qt6: Audio code review
Changes:
- audio rates are fixed, I selected common ones
- fixed signal names - they didn't matched expected autogenerated ones
- first play notification delay on Qt6 compensated
2022-07-21 20:09:52 +00:00
Gerald Combs b8d85227f6 Qt: Update the RTP stream UI to support Qt6Multimedia.
Fixes #18115
2022-07-21 20:09:52 +00:00
Tomasz Moń d1f7aa5acb
Qt: Do not spin new event loop on menu show
There is no need for nesting event loops when showing menus. Show menus
asynchronously to limit possibilities of hard to debug problems related
to re-entering event loop.
2022-07-03 13:41:30 +02:00
Gerald Combs 9c19f47394 Qt: Fix a couple of slot names.
QComboBox emits currentTextChanged with a QString argument, not
currentIndexChanged.

Switch to new-style connections where we can.
2022-06-21 12:20:02 -07:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
Jirka Novak 411b3c1d78 Fix: Fixed issue with deadlock when same RTP dialog opened twice
RTP dialogs can stay opened, therefore calls of its functions are
protected by locks. There was issue that same mutex was used during
construction of the dialog and calling functions. It created possible
deadlock.
Change separates lock used for dialog creation and lock for function calls.
When function call lock is locked, new calls are ignored and warning is
printed to STDERR. Showing a dialog with warning looks too intrusive to me.

Fixes #18025
2022-04-06 07:16:59 +00:00
Gerald Combs 80de95ca71 Qt: Split MainApplication out from WiresharkApplication.
Move WiresharkApplication.{cpp,h} to MainApplication.{cpp,h}. Add back
WiresharkApplication as a thin superclass of MainApplication, similar to
LogsharkApplication. Change all of our wsApp references to mainApp. We
will likely have to change many or most of them back, but that's a
commit for another time.
2022-04-04 09:39:27 -07:00
Roland Knall f0e4cedd69 Qt: Fix most of Qt6 compile warnings and issues 2022-03-25 11:16:18 -07:00
Gerald Combs ea11891f21 Qt: QMouseEvent::globalPos() is deprecated in Qt6.
Fix

ui/qt/tcp_stream_dialog.cpp:1669:31: error: 'globalPos' is deprecated: Use globalPosition() [-Werror,-Wdeprecated-declarations]
        ctx_menu_.exec(event->globalPos());
                              ^

and similar warnings.
2022-03-23 09:16:00 +00:00
Tomasz Moń 890555b8bd Qt: Qt6.2 compatibility fixes
Wireshark successfully compiles on Windows with Qt6.2 with following
cmake options:
  -DUSE_qt6=ON -DDISABLE_ERROR=ON

QCustomPlot QT 6.2 patch is taken from QCustomPlot forum post by miccs.
2021-11-29 04:55:12 +00:00
Joerg Mayer fe01f0109d Readd feature to make QtXMultimedia optional again
In order to be able to defer solving all Qt6 API differences at once
I tried to reactivate the QT_MULTIMEDIA_LIB feature. I managed to fix
most problems but one problem remains in both Qt5 and Qt6 builds.
Without Qt[56]Multimedia, the following error exceeds my non-existing
C++ knowledge:

jmayer/work/wireshark/git/ui/qt/rtp_player_dialog.cpp:154:18: error: out-of-line definition of 'RtpPlayerDialog' does not match any declaration in 'RtpPlayerDialog'
RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_running) :
                 ^~~~~~~~~~~~~~~
2021-11-24 10:31:16 +00:00
João Valverde b30a2112e8 regex: Prefer C99/POSIX types
Replace 'gssize' with 'ssize_t'.

Add a CMake configure check for ssize_t.

Fix missing "config.h" includes.
2021-11-15 02:41:59 +00:00
Jirka Novak c01456b77e VoIP Dialogs: Refactoring of singleton windows to factory methods
Singletons moved from main_window to each class's static open<NameOfClass>
method:
- RtpPlayerDialog
- RtpStreamDialog
- VoipCallsDialog
- RtpAnalysisDialog

Fixed issue with selecting RTP stream in sequence dialog. When user
selected a stream and moved mouse to Rtp Player button and pressed it,
incorrect RTP stream was sent to it.
2021-05-22 03:08:46 +00:00
Jirka Novak 6d6b376b43 VoIP dialogs: Default actions for buttons works as before
When button is pressed or triggered by shortcut, it opens same
window as before.
User can click small arrow next to button and it open menu with all
new actions e.g. Set/Add/Remove for RTP Player.
Documentation updated.
2021-05-04 20:45:35 +00:00
Jirka Novak 4c7c377d42 RTP Player: Player is able to skip silence during playback
Code is NOT able to do VAD (Voice Activity Detection) so audio silence
(sequence of equal samples) nor noise are not recognized as silence. Just
missing RTP (Confort Noise, interupted RTP, ...) and muted streams are
recognized as silence for this feature.
User can control duration of shortest silence to skip.
Updated documentation.
2021-05-03 21:38:48 +00:00
Jirka Novak 21b334fd82 RTP Player: Export of audio can start at position of play cursor
Added additional option for audio exporting 'From cursor'.
Documentation updated.
2021-04-28 20:29:02 +00:00
Jirka Novak 02107e6abe RTP Player: Fixed issue when keys were not processed till mouse clicked 2021-04-27 18:08:28 +02:00
Jirka Novak 54b7886a5e RTP Player: Memory consumption improvements
Audio for play is now decoded and stored without silence parts.

Changes:
- ui/qt/utils/rtp_audio_file.cpp created to handle silence skipping
- ui/qt/rtp_audio_stream.cpp refactored to support it
- Fixed issue with exporting streams: File synchronized export was missing
leading silence.
- No line is shown in waveform graph if there is silence
2021-04-25 19:34:52 +02:00
j.novak@netsystem.cz 0048142ea1 RTP Player: Added button 'Refresh streams' for live capture 2021-04-22 19:33:11 +00:00
Jirka Novak 9bb2af76d9 RTP Stream: Small code cleanup 2021-04-20 06:37:43 +00:00
Jirka Novak f460e7b18f Fix: RTP Player might crash when audio routing touched during play 2021-04-15 23:54:06 +02:00
Jirka Novak c8479e41ae VoIP dialogs: Improvements and new functions
Changes:
- RTP Player added to Telephony/RTP menu.
- When openning RTP Analysis or RTP Player from RTP menu, just selected
  stream is added. When Ctrl is hold during opening, reverse stream is
searched and added too.
- RTP Player: Added tool to select/deselect all inaudible streams
- RTP Player: Added Prepare Filter button
- RTP Player: Added Analyze button
- RTP Analysis: Added Prepare Filter button
- documentation updated

Code changes:
- RTP Player::rescanPacket() is not fired multiple times during rate change and during dialog creation
- Error shown in RTP player is cleared after every new decode of streams
- RTP Player handles case when Qt do not emit stop stream event
- "Select" menu code unified between dialogs>
- RTP Player: Audio routing menu unified
- buttons are connected to actions by signals()
- Analyze dialog is called by list of rtpstream_id, not rtpstream_info
2021-04-15 21:19:51 +00:00
Jirka Novak c7f5646249 VoIP dialogs: Performance improvements
Retap and UI response are much faster when many RTP streams are
processed. RTP Streams/Analyse 1000+, RTP Player 500+.

Changes:
- RTP streams are searched with hash, not by iterating over list.
- UI operations do not redraw screen after every change, just after all
  changes. UI is locked when rereading packets.
- Sample list during RTP decoding is stored in memory so wireshark uses
  just half of opened files for audio decoding than before.
- Analysis window checkbox area is limited in height
- Dialogs shows shows count of streams, count of selected streams and
  count of unmuted streams
- Documentation extended with chapter about RTP decoding parameters
- Documentation extended with performance estimates
2021-04-14 14:02:58 +00:00
Pascal Quantin 6ab7435af8 RTP player: fix compilation on Windows 2021-04-13 21:05:12 +02:00
Jirka Novak bc96d375ab RTP Player: Parallel playlist operations avoided
Changes:
- UI is locked during adding new streams
- When decoding of stream fails, it is reported in UI
2021-04-13 13:42:57 +02:00
Jirka Novak 2c82ed9a97 WSUG: Added description of new features of telephony dialogs
Changes:
- Added description of playlist idea and related operations
- Added description of RTP Player dialog
- Added description of VoIP Calls dialog
- Added description of Flow Graph dialog
- Added help link to Flow Graph dialog
- Added description of RTP Streams window
- Added description of RTP Stream Analysis window
- Updated related past images
2021-04-11 15:46:48 +00:00
j.novak@netsystem.cz 8c6a7c13f9 RTP Player: Fix of opening of multiple dialogs 2021-04-10 08:48:40 +00:00
Jirka Novak e462b2b1c2 RTP Player: Fixed issue with hanging the player at end of play on Windows
Changes:
- Fixed issue with hanging the player. The issue is in Qt - internal
  Mutex is locked when Qt calls outputStateChanged() and you can't call
  any other action on the audio object
- Fixed issue when play marker stream was running forever
- Removed !1855 because it introduces delay on play on Windows platform
2021-04-08 12:01:38 +00:00
j.novak@netsystem.cz 2b072b8e76 RTP Stream Analysis: Process more streams than two, audio save removed 2021-04-07 05:40:09 +00:00
j.novak@netsystem.cz fe98c68224 RTP Player: UI improvements 2021-04-06 11:23:00 +00:00
j.novak@netsystem.cz 4e5f0456c6 RTP Player: Added ability to save streams as .au and .wav
Features:
- saves multiple streams (all selected and unmuted)
- saves streams same way they are played (jitter buffer, sampling, ...)
- only streams with audio (play rate >0) are exported
  - streams with play rate == 0 are silently ignored even selected for
    export
- all exported streams must use same play rate (user can change it
  before save)
2021-04-01 08:07:22 +00:00
j.novak@netsystem.cz 7e39f4eb86 RTP Player: Added ability to save streams as .au and .wav
Features:
- saves multiple streams (all selected and unmuted)
- saves streams same way they are played (jitter buffer, sampling, ...)
- only streams with audio (play rate >0) are exported
  - streams with play rate == 0 are silently ignored even selected for
    export
- all exported streams must use same play rate (user can change it
  before save)
2021-03-31 14:52:06 +00:00
Jirka Novak 7445635fdc RTP Player: Allow a user to select output rate
Tool allows a user to replay at specific rate when there is any issue
with autodetected rate by payloads.
Offered rates are provided by selected audio device.
2021-03-30 19:17:28 +00:00
Jirka Novak 58ec37f093 RTP Player: Added play rate of decoded audio
It shows which rate wireshark really decoded the stream and how it will
be played.
2021-03-30 08:19:55 +00:00
Jirka Novak 47862d8fce RTP Player: Dialog is nonmodal now and can be called multiple ways
Changes:
- refactored main_dialog handling of telephony dialogs
- RTP Player dialog is nonmodal now and can be left open
- it is possible to issue three actions on RTP Player dialog from other
  dialogs (other dialog have selected set of RTP streams before action)
  - replace - removes existing streams from RTP dialog and shows new set
  - add - adds new set to existing list in RTP dialog
  - remove - remove streams in set from list in RTP dialog
- Sequence Dialog:
  - was modified to hold rtpstream_info_t for RTP streams
  - added Play button
  - VoIP features (RTP Play button, select/deselect RTP stream) are
    disabled after creation and must be enabled. It handles that RTP
Play button is not shown e.g. in TCP sequence show
2021-03-30 07:57:22 +00:00
Jirka Novak 1c59f7d9ac RTP Player: Decoding of audio improved
Changes:
In nearly all cases decoding match content of capture. The exception is #2270,
where timestamps do not match recorded time which causes discrepancy in
decoding.
Decoding of audio correctly follows different soundcard rates.
RTP Player shows first sample rate in each stream in place of rate of playing.
Fixed incorrect time axis calculation

Fixes #16837
Fixes #4960
Fixes #2270
2021-03-27 12:12:43 +00:00
Jirka Novak cd5b568233 RTP Player: Showing of setup frame for RTP stream fixed
When RTP stream has no setup frame, but is decoded by Decode as or
with rtp_udp active, setup frame was shown as SETUP <number>, but
correct is RTP <number>.
2021-03-27 08:45:22 +00:00
Jirka Novak f10ebb959d VoIP UI: Added shortcuts for dialog buttons
VoIP/SIP Calls, Sequence, RTP Streams, RTP Player and RTP Analysis
dialogs have shortcuts assigned. Shortcuts are same over all dialogs.
2021-03-24 20:02:41 +00:00
Jirka Novak 2a4859bd14 RTP Player: UI improvements
Changes:
- all waveforms has common scale therefore louder/quiter signal is visible
- when stream/streams are deleted from view, Y axis is rescaled and
  waveforms are rearranged to reuse empty space
2021-03-24 09:23:52 +00:00
Jirka Novak 030fbc7740 RTP Player: Fixed incorrect handling of legend in graph
Legend and it's elements were shown only when first waveform requires it.
Patch fixes it and all legend elements are shown when required by any
waveform.
2021-03-22 12:33:43 +00:00
Jirka Novak 2e87c27ce1 Voice dialogs: Unified naming and order of buttons in dialogs
Dialogs has same order of buttons:
- dialog specific (Flow Sequence, Find Reverse, Analyze, Reset Diagram)
- common voice functions (Prepare Filter, Play Streams)
- exports (Copy, Export)
- Close of dialog

Names were unified:
- Copy really copying to clipboard
- Save/Export was unified to Export
2021-03-14 19:08:45 +01:00
Jirka Novak 006f0ab571 Voice dialogs: Added Select All/None/Invert to all of it 2021-03-14 13:14:53 +00:00
Jirka Novak 24d59017a6 RTP Player: Added additional shortcuts
Added shortcuts:
- Mute/Unmute/Invert Mute
- Play/Pause/Stop

Removed outdated help in tooltip text. It makes no sense to use it, all
actions are available in context menu.
2021-03-11 12:44:48 +00:00
Jirka Novak 649eab2dfe RTP player: It is possible to select SETUP packet related to RTP stream
When SETUP (or related signalling packet) exists, it is selected by
Shift+G. If RTP stream is "alone", first RTP packet of the stream is
selected.
2021-03-10 15:45:12 +00:00
Jirka Novak ce786ed265 Rtp player: It is possible to select multiple rows in stream's list and graph
Changes:
- It is possible to select multiple streams in list and in graph
- Select All/None/Invert implemented in list of streams and in graph
- Indication of "Selected" stream redesigned in graph
- Mouse hovering shows related row/wave
- All operations adapted to multiselection
2021-03-09 16:49:09 +00:00
Gerald Combs d3f17ee08a Remove modelines in ui/qt.
Remove the editor modeline blocks from most of the source files in ui/qt
by running

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

then cleaning up the remaining files by hand.

This *shouldn't* affect anyone since

- All of the source files in ui/qt use 4 space indentation, which
  matches 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-03-08 18:11:32 +00:00