aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_player_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
8 daysQt: RTP Player silent crash if codec not loadedChuck Craft1-1/+1
Playing amr file before !17335 crashed when skipSilenceButton clicked.
2024-07-18Remove break after returnStig Bjørlykke1-1/+0
A break after return is not needed. Solaris would give a "statement not reached" warning.
2024-07-05Don't call g_string_free() with bool - it takes gbooleanStig Bjørlykke1-1/+1
2024-05-13Qt: Fix RTP Player crashJohn Thacker1-2/+4
marker_stream_ might not exist when playFinished is called. In particular, deleting the RtpAudioStreams might cause playFinished to be called when the audio streams delete their audio output in certain cases, such as if they are paused. (The behavior might be slightly different on Qt6, where QAudioSink is used vs. Qt5 where QAudioOutput is used.) Fix #19596
2024-05-08Fix some spelling errorsMartin Mathieson1-2/+2
2024-05-05Qt: Use customContextMenuRequest signal with QCustomPlotJohn Thacker1-8/+9
This also allows us to remove some QT Version checks.
2024-04-03ui: Convert our remaining UI code to C99 typesGerald Combs1-13/+13
Ping #19116
2024-03-15Qt: Limit on how often mouse moves update the RTP Player graphJohn Thacker1-1/+20
The work done when updating the graph from moving the mouse calls QCP plottableAt() multiple times. That calls pointDistance(), which is particularly slow on graphs that have many lines (like the audio plots), as it computes the distance between each line on the graph to the point. That's time-consuming because it doesn't rule out any line, because line segments can pass close to the test point even if the two endpoints of the line aren't particularly close. While on my tests on Windows, I can't get a QMouseEvent to be issued any more often than 10 ms, on Linux with mouse movement over the graph I can get a QMouseEvent every 25 μs (at least, if the ponderous calculations are disabled). As mouse tracking is on, this means that the GUI becomes unresponsive whenever the mouse is moved over the graph, constantly calculating distances between points on the graph where the mouse was in the recent past and all the lines on the graph. Set a QTimer and keep the actual calculations to some kind of sane interval, just remembering the latest position if the timer is active.
2023-11-29Qt: Save GeometryStateDialog splitter statesJohn Thacker1-0/+2
Save the state of QSplitters in GeometryStateDialogs to the recent settings. (Per-profile, because the desired splitter setting can depend on the preference for the packet dialog, or the number of IO graphs loted for the IO Graph dialog, etc., which are stored per-profile.) Don't restore the splitter state for the Preferences Dialog, because the calculations done to set the minimize size of the protocol column make it difficult to shrink the splitter below the size of the longest protocol once it gets set larger. Fix #18121
2023-11-12Work around macOS running applications in /.Guy Harris1-2/+2
If an application is launched from the Finder, it appears to get / as its current directory. This causes Wireshark open/save dialogs to open up / if the user hasn't already opened a file in another directory, so that there's no "last open directory" in the recent file. Have get_persdatafile_dir(), on UN*X, cache the personal data directory just as it does on Windows and, if nothing's been cached, have it fetch the current directory and, if that succeeds *and* it's not the root directory, use that. Otherwise, use the user's home directory. Fixes #9862. In addition, separate the notion of "last open directory" and "open dialog initial directory", where the latter is the last open directory *if* a file has been opened in this session or the recent file has the last open directory from a previous session, otherwise it's the user's personal data directory. Use the latter notion in file open/save dialogs; use the former notion when reading from and writing to the recent file. This means we don't need to set the "last open directory" at startup time. That way, running Wireshark without opening a file won't cause the "last open directory" to be set, so that if a user runs it from a directory, the "open dialog initial directory" won't be the last directory from which Wireshark was run.
2023-05-15Qt: Ensure the AudioSilenceGenerator is freedJohn Thacker1-1/+1
Have AudioSilenceGenerator inherit the QIODevice constructor that takes a parent, and pass the parent into the constructor when creating it in RtpPlayerDialog. This ensures that it is deleted appropriately when marker_stream_ is deleted.
2023-04-06RTP Player: Improve sync of audible sound with waveform on Qt 6.xj.novak@netsystem.cz1-1/+1
2023-02-27Qt: Fix some leaks in RTP Analysis windowsJohn Thacker1-1/+1
Parent the QActions that are created for Analyze and Play buttons for each RTP window, so that they are deleted when the button is deleted.
2022-11-24RTP Player: Fix: Playback marker do not move after resume with Qt6j.novak@netsystem.cz1-1/+3
2022-10-08RTP Player: Fix: Only silence played on Windows with Qt 6.xj.novak@netsystem.cz1-2/+7
2022-09-27RTP dialogs: Fix: Coloring of QTreeWidgetItem do not workj.novak@netsystem.cz1-0/+1
2022-07-21RTP player: fixed issue with no audio card available in Qt6Jirka Novak1-21/+29
2022-07-21Qt6: Audio code reviewJirka Novak1-4/+37
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-21Qt: Update the RTP stream UI to support Qt6Multimedia.Gerald Combs1-12/+108
Fixes #18115
2022-07-03Qt: Do not spin new event loop on menu showTomasz Moń1-3/+3
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-06-21Qt: Fix a couple of slot names.Gerald Combs1-22/+14
QComboBox emits currentTextChanged with a QString argument, not currentIndexChanged. Switch to new-style connections where we can.
2022-06-10tap: Adding flags for tap_packetRoland Knall1-1/+1
This allows flags to be passed by the registering listener to the collection of information
2022-04-06Fix: Fixed issue with deadlock when same RTP dialog opened twiceJirka Novak1-56/+71
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-04Qt: Split MainApplication out from WiresharkApplication.Gerald Combs1-13/+13
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-03-25Qt: Fix most of Qt6 compile warnings and issuesRoland Knall1-1/+1
2022-03-23Qt: QMouseEvent::globalPos() is deprecated in Qt6.Gerald Combs1-0/+4
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.
2021-11-29Qt: Qt6.2 compatibility fixesTomasz Moń1-3/+0
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-24Readd feature to make QtXMultimedia optional againJoerg Mayer1-1/+3
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-15regex: Prefer C99/POSIX typesJoão Valverde1-0/+2
Replace 'gssize' with 'ssize_t'. Add a CMake configure check for ssize_t. Fix missing "config.h" includes.
2021-05-22VoIP Dialogs: Refactoring of singleton windows to factory methodsJirka Novak1-0/+29
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-04VoIP dialogs: Default actions for buttons works as beforeJirka Novak1-10/+30
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-03RTP Player: Player is able to skip silence during playbackJirka Novak1-1/+57
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-04-28RTP Player: Export of audio can start at position of play cursorJirka Novak1-14/+43
Added additional option for audio exporting 'From cursor'. Documentation updated.
2021-04-27RTP Player: Fixed issue when keys were not processed till mouse clickedJirka Novak1-0/+1
2021-04-25RTP Player: Memory consumption improvementsJirka Novak1-5/+34
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-22RTP Player: Added button 'Refresh streams' for live capturej.novak@netsystem.cz1-85/+149
2021-04-20RTP Stream: Small code cleanupJirka Novak1-9/+0
2021-04-15Fix: RTP Player might crash when audio routing touched during playJirka Novak1-0/+6
2021-04-15VoIP dialogs: Improvements and new functionsJirka Novak1-56/+123
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-14VoIP dialogs: Performance improvementsJirka Novak1-21/+56
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-13RTP player: fix compilation on WindowsPascal Quantin1-2/+2
2021-04-13RTP Player: Parallel playlist operations avoidedJirka Novak1-55/+129
Changes: - UI is locked during adding new streams - When decoding of stream fails, it is reported in UI
2021-04-11WSUG: Added description of new features of telephony dialogsJirka Novak1-3/+3
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-10RTP Player: Fix of opening of multiple dialogsj.novak@netsystem.cz1-4/+0
2021-04-08RTP Player: Fixed issue with hanging the player at end of play on WindowsJirka Novak1-10/+26
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-07RTP Stream Analysis: Process more streams than two, audio save removedj.novak@netsystem.cz1-0/+1
2021-04-06RTP Player: UI improvementsj.novak@netsystem.cz1-17/+30
2021-04-01RTP Player: Added ability to save streams as .au and .wavj.novak@netsystem.cz1-22/+100
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-31RTP Player: Added ability to save streams as .au and .wavj.novak@netsystem.cz1-0/+338
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-30RTP Player: Allow a user to select output rateJirka Novak1-0/+30
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.