forked from osmocom/wireshark
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) : ^~~~~~~~~~~~~~~
This commit is contained in:
parent
24a364f762
commit
fe01f0109d
|
@ -1251,7 +1251,8 @@ if(BUILD_wireshark)
|
||||||
Qt${qtver}Core
|
Qt${qtver}Core
|
||||||
Qt${qtver}Gui
|
Qt${qtver}Gui
|
||||||
Qt${qtver}LinguistTools
|
Qt${qtver}LinguistTools
|
||||||
Qt${qtver}Multimedia
|
# Our code currently does not compile with Qt6Multimedia
|
||||||
|
# Qt${qtver}Multimedia
|
||||||
Qt${qtver}PrintSupport
|
Qt${qtver}PrintSupport
|
||||||
Qt${qtver}Widgets
|
Qt${qtver}Widgets
|
||||||
)
|
)
|
||||||
|
@ -1268,6 +1269,7 @@ if(BUILD_wireshark)
|
||||||
set(MIN_MACOS_VERSION 10.14)
|
set(MIN_MACOS_VERSION 10.14)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
list(APPEND QT_PACKAGELIST Qt5Multimedia)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND QT_PACKAGELIST Qt5WinExtras)
|
list(APPEND QT_PACKAGELIST Qt5WinExtras)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1291,6 +1293,9 @@ if(BUILD_wireshark)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
ws_find_package(Sparkle ENABLE_SPARKLE HAVE_SOFTWARE_UPDATE)
|
ws_find_package(Sparkle ENABLE_SPARKLE HAVE_SOFTWARE_UPDATE)
|
||||||
endif()
|
endif()
|
||||||
|
if(Qt${qtver}Multimedia_FOUND)
|
||||||
|
set(QT_MULTIMEDIA_LIB 1)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# MaxMind DB address resolution
|
# MaxMind DB address resolution
|
||||||
|
|
|
@ -281,7 +281,7 @@
|
||||||
#cmakedefine HAVE_UNISTD_H 1
|
#cmakedefine HAVE_UNISTD_H 1
|
||||||
|
|
||||||
/* Define if we have QtMultimedia */
|
/* Define if we have QtMultimedia */
|
||||||
#define QT_MULTIMEDIA_LIB 1
|
#cmakedefine QT_MULTIMEDIA_LIB 1
|
||||||
|
|
||||||
/* Build androiddump with libpcap instead of wireshark stuff */
|
/* Build androiddump with libpcap instead of wireshark stuff */
|
||||||
#cmakedefine ANDROIDDUMP_USE_LIBPCAP 1
|
#cmakedefine ANDROIDDUMP_USE_LIBPCAP 1
|
||||||
|
|
|
@ -3576,8 +3576,10 @@ void MainWindow::on_actionTelephonyRtpPlayer_triggered()
|
||||||
QMessageBox::warning(this, tr("RTP packet search failed"),
|
QMessageBox::warning(this, tr("RTP packet search failed"),
|
||||||
err,
|
err,
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
|
#ifdef QT_MULTIMEDIA_LIB
|
||||||
} else {
|
} else {
|
||||||
openTelephonyRtpPlayerDialog()->addRtpStreams(stream_ids);
|
openTelephonyRtpPlayerDialog()->addRtpStreams(stream_ids);
|
||||||
|
#endif // QT_MULTIMEDIA_LIB
|
||||||
}
|
}
|
||||||
foreach(rtpstream_id_t *id, stream_ids) {
|
foreach(rtpstream_id_t *id, stream_ids) {
|
||||||
rtpstream_id_free(id);
|
rtpstream_id_free(id);
|
||||||
|
@ -4165,6 +4167,7 @@ void MainWindow::activatePluginIFToolbar(bool)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QT_MULTIMEDIA_LIB
|
||||||
void MainWindow::rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids)
|
void MainWindow::rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids)
|
||||||
{
|
{
|
||||||
openTelephonyRtpPlayerDialog()->replaceRtpStreams(stream_ids);
|
openTelephonyRtpPlayerDialog()->replaceRtpStreams(stream_ids);
|
||||||
|
@ -4179,6 +4182,7 @@ void MainWindow::rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> strea
|
||||||
{
|
{
|
||||||
openTelephonyRtpPlayerDialog()->removeRtpStreams(stream_ids);
|
openTelephonyRtpPlayerDialog()->removeRtpStreams(stream_ids);
|
||||||
}
|
}
|
||||||
|
#endif // QT_MULTIMEDIA_LIB
|
||||||
|
|
||||||
void MainWindow::rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids)
|
void MainWindow::rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,6 +134,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef QT_MULTIMEDIA_LIB
|
||||||
RtpPlayerDialog *RtpPlayerDialog::pinstance_{nullptr};
|
RtpPlayerDialog *RtpPlayerDialog::pinstance_{nullptr};
|
||||||
std::mutex RtpPlayerDialog::mutex_;
|
std::mutex RtpPlayerDialog::mutex_;
|
||||||
|
|
||||||
|
@ -148,6 +149,7 @@ RtpPlayerDialog *RtpPlayerDialog::openRtpPlayerDialog(QWidget &parent, CaptureFi
|
||||||
}
|
}
|
||||||
return pinstance_;
|
return pinstance_;
|
||||||
}
|
}
|
||||||
|
#endif // QT_MULTIMEDIA_LIB
|
||||||
|
|
||||||
RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_running) :
|
RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_running) :
|
||||||
WiresharkDialog(parent, cf)
|
WiresharkDialog(parent, cf)
|
||||||
|
@ -158,7 +160,6 @@ RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_
|
||||||
, first_stream_rel_stop_time_(0.0)
|
, first_stream_rel_stop_time_(0.0)
|
||||||
, streams_length_(0.0)
|
, streams_length_(0.0)
|
||||||
, start_marker_time_(0.0)
|
, start_marker_time_(0.0)
|
||||||
#endif // QT_MULTIMEDIA_LIB
|
|
||||||
, number_ticker_(new QCPAxisTicker)
|
, number_ticker_(new QCPAxisTicker)
|
||||||
, datetime_ticker_(new QCPAxisTickerDateTime)
|
, datetime_ticker_(new QCPAxisTickerDateTime)
|
||||||
, stereo_available_(false)
|
, stereo_available_(false)
|
||||||
|
@ -170,6 +171,7 @@ RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_
|
||||||
, lock_ui_(0)
|
, lock_ui_(0)
|
||||||
, read_capture_enabled_(capture_running)
|
, read_capture_enabled_(capture_running)
|
||||||
, silence_skipped_time_(0.0)
|
, silence_skipped_time_(0.0)
|
||||||
|
#endif // QT_MULTIMEDIA_LIB
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
loadGeometry(parent.width(), parent.height());
|
loadGeometry(parent.width(), parent.height());
|
||||||
|
|
|
@ -26,7 +26,10 @@
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <ui/qt/widgets/qcustomplot.h>
|
#include <ui/qt/widgets/qcustomplot.h>
|
||||||
|
|
||||||
|
#ifdef QT_MULTIMEDIA_LIB
|
||||||
#include <QAudioDeviceInfo>
|
#include <QAudioDeviceInfo>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class RtpPlayerDialog;
|
class RtpPlayerDialog;
|
||||||
|
|
Loading…
Reference in New Issue