Commit Graph

72 Commits

Author SHA1 Message Date
João Valverde ae14849864 Windows: Use SpeexDSP binary package
Remove bundled code and use vcpkg binary library instead.
2022-12-16 11:11:28 +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
Jirka Novak 476eb0e627 RTP player: fixed issue with no audio card available in Qt6 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
Gerald Combs e5bcf6b402 Qt: Use new-style signals+slots in more places. 2021-10-11 16:32:49 +00:00
Jirka Novak dd161ade12 RTP Player: Fix of resampling for visual waveform
When capture was longer (e.g. 800s), audio was decoded correctly, but
visual waveform was shown incorrectly. Reason was exceeding range of
guint32 during calculation. Calculation is now made in guint64 and then
put back to guint32.
2021-08-21 07:20:33 +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 c1084fe97e RTP Player: Settings for enabling use of disk as temporarly store
New advanced settings are created:
- rtp_player_use_disk1 - controls if decoded samples are stored in
  memory or on disk.
- rtp_player_use_disk2 - controls if dictionary for decoded samples
is stored in memory or on disk.
- documentation updated
2021-04-26 10:57:22 +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 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
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 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 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 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
Dario Lombardo ea929d6401 wsutils: add local implementation of g_memdup2.
g_memdup() was deprecated and replaced with g_memdup2() in GLib 2.68,
we provide our own copy of g_memdup2() for older GLib versions.
2021-03-25 09:38:10 +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 a123578fd5 RTP Player: Visual waveform shows what is really played
Visual waveform is derived from decoded audio. When audio is decoded
incorrectly, waveform now shows it.
E.g. on issue 14401 is now audio play aligned with waveform, but it
exhibits that decoded audio is incorrect - about two times longer than
pcap!

Changes:
- samplefile_ renamed to sample_file_
- tempfile_ is renamed to temp_file_
- decode() is separated to decodeAudio and decodeVisual
- Frame info stores frame len and frame_num for every frame. We must hold
it per frame as it may change in time. Info is stored in separate temp file
as waveform samples.
2021-03-22 04:43:30 +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
Jirka Novak 7e063b6070 RTP Player dialog improved
Functional changes:
  Audio routing information is now stored in audio stream and not in table. It
is handled by separate utils/rtp_audio_routing.cpp class which is able to
convert it between mono/stereo etc.
  There is new utils/rtp_audio_routing_filter.cpp class which is able to
route mono audio stream to any audio channel.
  Sample file separated from audio stream file - sample file is generated only
during recap. So when we need new waveform, we just use existing sample file
and no recap required - it is much faster.
  Audio stream exports just mono audio. Mono audio is then expanded to stereo
and correct channel by AudioRoutingFilter during play as required. So when
audio routing is changed, no recap and no audio export is required.
  When audio stream is muted, no audio is produced nor played.
  Most of signals between RtpPlayerDialog and RtpAudioStream were removed.
Start/Pause/Stop is processed in RtpPlayDialog (just for non muted streams).
Play possition is not received from every playing stream but from independent
silence stream.
  Added Mute/Unmute function.

Optimalization:
  When audio routing is changed, just graphs are updated. No retap nor audio
decoding is required.
  When TOD is changed, just graphs are updated. No retap nor audio decoding is
required.
2021-02-09 18:10:14 +00:00
Jirka Novak 40c1929115 Refactored: Moved sample_bytes_ to rtp_media.h as SAMPLE_BYTES 2021-02-08 17:05:59 +00:00
Jirka Novak 80760302c9 RTP player: Doubled buffer for replay to avoid play stop caused by underruns
Patch solves issue for case when QT plays audio faster than reads it from file.
The change looks strange because there is no way how to get buffer size before
starting the play. So code start the play, reads buffer and stop it. Then
increases buffer size and start play again.

Note: You still can receive ALSA notifications like:
ALSA lib pcm.c:8545:(snd_pcm_recover) underrun occurred
but it do not stop audio replay.
2021-01-31 15:21:34 +00:00
Jirka Novak 5a7f249edb RTP player: Added pause button
Pause button added. Button is visible only when media are played.
2020-12-29 14:41:14 +01:00
Gerald Combs 7ab6440416 Tools: Clean up checkAPI and add ui/qt.
Remove the --check-addtext and --build flags. They were used for
checkAddTextCalls, which was removed in e2735ecfdd.

Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in
main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp.

Rename "index"es in packet-usb-hid.c.
2020-09-05 07:41:29 +00:00
Dario Lombardo c544f7e3f4 Qt: initialize members (CID: 1457926).
Change-Id: I4c890db567a3668525bcf9915cb5687e2019c5c1
Reviewed-on: https://code.wireshark.org/review/36125
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-17 20:52:43 +00:00
Dario Lombardo a20fea02fc Qt: add initializers.
CID: 1457926, 1446253.

Change-Id: Ia9e727fd9d030b6a5db74aa5a9343c66df8c5e9b
Reviewed-on: https://code.wireshark.org/review/36065
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-09 17:27:48 +00:00
Jirka Novak 3b781dbab5 rtp_player_dialog: Route audio for a stream to left/right speaker in RTP player
Column 'Play' added to player. Double click on a stream in the column changes
audio routing for the stream.
When soundcard supports only one channel, there are Mute/Play option. When
soundcard supports two or more channels, there are Mute/L/L+R/R options.
Muted channel is drawn with dotted line.

Change-Id: If120c902195da46f98a1663c589f20c6a1da0ba7
Reviewed-on: https://code.wireshark.org/review/35687
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-08 11:50:16 +00:00
Jirka Novak 71fb8bebfe rtp_player: Player is able to set start of audio play by double click
Patch adds ability to set start of audio play by double clicking on waveform.
Patch fixes unreported issue with placing waveform at incorrect place when switched relative/absolute time mode (check/uncheck Time of Day).

Change-Id: Ib8ce24aea870e2443e033afbb6d6e9fbcf222431
Reviewed-on: https://code.wireshark.org/review/35621
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 09:38:14 +00:00
Orgad Shaneh 0442f7a2c3 UI: Fix compilation with Qt 5.14
Change-Id: I8adae4609ff2857cb12bc803839ebb2c6afbd264
Reviewed-on: https://code.wireshark.org/review/35517
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-21 20:25:51 +00:00
Jirka Novak c0cec58564 RTP: rtp_audio_stream.cpp: fixed excess silence in visualisation on waveform
When silence is inserted to waveform (VaD, no RTP, ...), waveform is shifted to correct time in visualisation. Code was inserting silence to audio waveform too therefore following audio was shifted twice.
This patch fixes it.

Change-Id: I4f3e02328662f92b1dabec80ce9da31d0a839046
Reviewed-on: https://code.wireshark.org/review/34917
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-05 11:50:09 +00:00
João Valverde 186f985793 CMake: Check for and use system SpeexDSP library
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25
Reviewed-on: https://code.wireshark.org/review/31857
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-02 21:12:01 +00:00
Jiri Novak 87973bf516 RTP: Common functions for allocation/deallocation of rtpstream_info_t
Change-Id: I9a0a11d238473a7c57d85547dca0713ed421a500
Reviewed-on: https://code.wireshark.org/review/28417
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-25 14:16:26 +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
Jiri Novak 1b4b5e59e9 RTP: Encapsulation of comparsion of two rtpstreams
Changes:
- rtpstream_id_t is introduced and its related functions. It encapsulates comparsion of two rtpstreams.
- dest_* renamed to dst_*
- src_port and dst_port are 16bits only.
- sharkd_session.c use common id functions
- IAX2 part related to RTP updated to common *id* function

Change-Id: Id38728a4e5d80363480c7ce42ff9c6eaad069686
Reviewed-on: https://code.wireshark.org/review/28340
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-20 08:26:31 +00:00
Jiri Novak 27a1906c58 RTP: Code clean up
Changes:
- rtpstream_packet renamed to rtpstream_packet_cb to follow *_cb pattern
- variables/types used in iax2_analysis_dialog were created as copy of *rtp* ones, but names were left as *rtp* -> *iax2*
- struct _rtp_stream_info replaced with rtp_stream_info_t
- there was tap-rtp-analysis.h, but no tap-rtp-analysis.c - related content was moved from tap-rtp-common.c
- *rtp_stream* functions renamed to *rtpstream*
- renamed rtp_stream_info_t to rtpstream_info_t to follow *rtpstream* pattern.
- renamed ui/rtp_stream.c rtpstream_draw -> rtpstream_draw_cb

Change-Id: Ib11ff5367cc464ea1b0c73432bc50b0eb9cd203e
Reviewed-on: https://code.wireshark.org/review/28299
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-19 15:05:12 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56: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 e52172c775 Qt: use SPDX identifiers.
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3
Reviewed-on: https://code.wireshark.org/review/25563
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:36 +00:00
Gerald Combs 28dce11948 Qt RTP: Add the default device and adjust sample rates.
In the RTP player dialog, list the default audio device first, ensure
it's selected by default and ensure that the list items are unique.
According to

http://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp?h=5.9

the default device on Windows uses the special WAVE_MAPPER id, which
appears to support various sample rates even when the underlying
hardware doesn't.

Ensuring the names are unique fixes an issue I'm seeing on a test
machine here.

When decoding, check to see if our sample rate is supported by our
output device and adjust accordingly.

Bug: 13906
Change-Id: Iddc0beb2459bfac42276ff29d227c2619b0a8d90
Reviewed-on: https://code.wireshark.org/review/22756
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-07-21 21:09:26 +00:00
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X
10.0", for example.  It was "Mac OS X" until 10.8 (although 10.7 was
sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS
X" from 10.8 to 10.11.

Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3
Reviewed-on: https://code.wireshark.org/review/20933
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05 19:16:22 +00:00
Peter Wu 6e29d874f8 Qt: fix crash on undecodable RTP stream
When the sample rate is zero, a floating point exception (FPE) occurs in
QAudioDeviceInfo::nearestFormat. Detect the error condition instead and
show an error.

Change-Id: Ie2eaa57847938fe15607fa26d0f4e08e7ddd23d1
Fixes: v2.3.0rc0-1664-gd59653f8d5 ("Qt: Make the RTP player output device selectable.")
Reviewed-on: https://code.wireshark.org/review/19569
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: Michael Mann <mmann78@netscape.net>
2017-01-08 02:48:41 +00:00
Guy Harris c65e5851b2 Make some items that don't need to be size_t guint.
Those sizes are limited by the packet sizes we support, and we only
support a maximum packet size of 2^32.

This squelches some compiler warnings.

Remove some casts that this renders unnecessary.

Change-Id: Id9a7bcf8c2ce30bbed7be6c0e28deb9cf38002e0
Reviewed-on: https://code.wireshark.org/review/19279
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-15 11:52:49 +00:00
Gerald Combs d59653f8d5 Qt: Make the RTP player output device selectable.
Add a combobox for selecting the output device and populate it with our
available devices. Let the user know if our output format isn't
supported.

Ping-Bug: 13105
Change-Id: I299c7d0f191bb66d93896338036000e2c377781f
Reviewed-on: https://code.wireshark.org/review/19046
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-12-06 22:36:55 +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 9887cd7feb Qt: fix crash when closing RTP player while playing
For some time, the RTP Player has been crashing for me (Arch Linux, Qt
5.7.0) when the RTP Player is active (affects also Wireshark 2.0.5).

This call trace was observed:

    + RtpPlayerDialog::reject (closing dialog via Escape / Close button)
      + RtpAudioStream::stopPlaying
        + RtpAudioStream::outputStateChanged(QAudio::StoppedState)
          + QAudioOutput::deleteLater   // problematic!
      + RtpPlayerDialog::~RtpPlayerDialog
        + RtpAudioStream::~RtpAudioStream

As the QAudioOutput instance is a child of RtpAudioStream, it is also
destroyed after that. QAudioOutput's destructor somehow invokes (via
libqtmedia_pulse.so) a main loop iteration which invokes the previously
scheduled deleteLater call.

As QAudioOutput was already being destructed, this results in a crash.
Workaround this by removing this child from RtpAudioStream (no cruelty
intended).

Change-Id: I88f2e929ac566534be5d2270e2e0b194685533eb
Reviewed-on: https://code.wireshark.org/review/18970
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-11-30 19:52:55 +00:00
Jeff Morriss fea6e738bb RTP player: increase the maximum number of silence frames to 30 minutes worth.
The BadAlloc X11 crash I reported in bug 4119 (which is why the limit was as
low as it was) has long since been fixed thanks to
bug 2630/I71e1bd2f9a62792db06ce887e2bbe7a96d110e0a so we can now deal with
more silence frames.

Change-Id: I0127381e71e497560e0f23af04f9d96af1ed6335
Ping-Bug: 5902
Ping-Bug: 4119
Ping-Bug: 2270
Reviewed-on: https://code.wireshark.org/review/16003
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-23 03:30:39 +00:00