Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
rtp_stream_dialog.h
Go to the documentation of this file.
1
9
10#ifndef RTP_STREAM_DIALOG_H
11#define RTP_STREAM_DIALOG_H
12
13#include "wireshark_dialog.h"
14
15#include <mutex>
16
17#include "ui/rtp_stream.h"
18#include "rtp_player_dialog.h"
19
20#include <QToolButton>
21#include <QMenu>
22
23namespace Ui {
24class RtpStreamDialog;
25}
26
32{
33 Q_OBJECT
34
35public:
43 static RtpStreamDialog *openRtpStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
44
49
53 void operator=(const RtpStreamDialog &) = delete;
54
60 void selectRtpStream(QVector<rtpstream_id_t *> stream_ids);
61
67 void deselectRtpStream(QVector<rtpstream_id_t *> stream_ids);
68
69signals:
70 // Tells the packet list to redraw. An alternative might be to add a
71 // cf_packet_marked callback to file.[ch] but that's synchronous and
72 // might incur too much overhead.
77
83 void updateFilter(QString filter, bool force = false);
84
89 void goToPacket(int packet_num);
90
95 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
96
101 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
102
107 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
108
113 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_infos);
114
119 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_infos);
120
125 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_infos);
126
127public slots:
131 void rtpPlayerReplace();
132
136 void rtpPlayerAdd();
137
141 void rtpPlayerRemove();
142
143#ifdef QT_MULTIMEDIA_LIB
147 void rtpAnalysisReplace() override;
148
152 void rtpAnalysisAdd() override;
153
157 void rtpAnalysisRemove() override;
158#endif // QT_MULTIMEDIA_LIB
159
160protected:
166 explicit RtpStreamDialog(QWidget &parent, CaptureFile &cf);
167
172
179 bool eventFilter(QObject *obj, QEvent *event) override;
180
184 void captureFileClosing() override;
185
189 void captureFileClosed() override;
190
191private:
193 static RtpStreamDialog *pinstance_;
194
196 static std::mutex mutex_;
197
199 Ui::RtpStreamDialog *ui;
200
202 rtpstream_tapinfo_t tapinfo_;
203
205 QToolButton *find_reverse_button_;
206
208 QPushButton *prepare_button_;
209
211 QPushButton *export_button_;
212
214 QPushButton *copy_button_;
215
217 QToolButton *analyze_button_;
218
220 QToolButton *player_button_;
221
223 QMenu ctx_menu_;
224
226 bool need_redraw_;
227
229 QList<rtpstream_id_t> last_selected_;
230
235 static void tapReset(rtpstream_tapinfo_t *tapinfo);
236
241 static void tapDraw(rtpstream_tapinfo_t *tapinfo);
242
248 static void tapMarkPacket(rtpstream_tapinfo_t *tapinfo, frame_data *fd);
249
253 void updateStreams();
254
258 void updateWidgets() override;
259
263 void showPlayer();
264
270 void setRtpStreamSelection(rtpstream_id_t *id, bool state);
271
277 QList<QVariant> streamRowData(int row) const;
278
282 void freeLastSelected();
283
287 void invertSelection();
288
293 QVector<rtpstream_id_t *>getSelectedRtpIds();
294
295private slots:
300 void showStreamMenu(QPoint pos);
301
305 void on_actionCopyAsCsv_triggered();
306
310 void on_actionCopyAsYaml_triggered();
311
315 void on_actionFindReverseNormal_triggered();
316
320 void on_actionFindReversePair_triggered();
321
325 void on_actionFindReverseSingle_triggered();
326
330 void on_actionGoToSetup_triggered();
331
335 void on_actionMarkPackets_triggered();
336
340 void on_actionPrepareFilter_triggered();
341
345 void on_streamTreeWidget_itemSelectionChanged();
346
350 void on_buttonBox_helpRequested();
351
355 void on_actionExportAsRtpDump_triggered();
356
361 void captureEvent(CaptureEvent e);
362
367 void displayFilterCheckBoxToggled(bool checked);
368
373 void on_todCheckBox_toggled(bool checked);
374
378 void on_actionSelectAll_triggered();
379
383 void on_actionSelectInvert_triggered();
384
388 void on_actionSelectNone_triggered();
389
393 void on_actionAnalyze_triggered();
394};
395
396#endif // RTP_STREAM_DIALOG_H
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
RtpBaseDialog(QWidget &parent, CaptureFile &cf)
Constructs an RtpBaseDialog.
Definition rtp_player_dialog.h:82
void rtpAnalysisDialogAddRtpStreams(QVector< rtpstream_id_t * > stream_infos)
Signal emitted to request adding streams to the RTP Analysis dialog.
void updateFilter(QString filter, bool force=false)
Signal emitted to update the display filter.
bool eventFilter(QObject *obj, QEvent *event) override
Event filter for intercepting events from child widgets.
Definition rtp_stream_dialog.cpp:460
void deselectRtpStream(QVector< rtpstream_id_t * > stream_ids)
Deselects specific RTP streams. Caller must provide ids which are immutable to recap.
Definition rtp_stream_dialog.cpp:452
void rtpPlayerDialogRemoveRtpStreams(QVector< rtpstream_id_t * > stream_ids)
Signal emitted to request removing streams from the RTP Player.
void operator=(const RtpStreamDialog &)=delete
Should not be assignable.
void captureFileClosing() override
Handles operations before the capture file finishes closing.
Definition rtp_stream_dialog.cpp:718
void captureFileClosed() override
Handles cleanup after the capture file is fully closed.
Definition rtp_stream_dialog.cpp:725
void selectRtpStream(QVector< rtpstream_id_t * > stream_ids)
Selects specific RTP streams. Caller must provide ids which are immutable to recap.
Definition rtp_stream_dialog.cpp:444
static RtpStreamDialog * openRtpStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list)
Opens or retrieves the singleton instance of the RTP Stream Dialog.
Definition rtp_stream_dialog.cpp:305
void rtpPlayerRemove()
Slot to trigger removing streams from the player.
Definition rtp_stream_dialog.cpp:1008
void rtpPlayerDialogAddRtpStreams(QVector< rtpstream_id_t * > stream_ids)
Signal emitted to request adding streams to the RTP Player.
void rtpAnalysisDialogRemoveRtpStreams(QVector< rtpstream_id_t * > stream_infos)
Signal emitted to request removing streams from the RTP Analysis dialog.
void packetsMarked()
Signal emitted when packets are marked.
void rtpAnalysisDialogReplaceRtpStreams(QVector< rtpstream_id_t * > stream_infos)
Signal emitted to request replacing streams in the RTP Analysis dialog.
void goToPacket(int packet_num)
Signal emitted to navigate to a specific packet.
~RtpStreamDialog()
Destroys the RtpStreamDialog.
Definition rtp_stream_dialog.cpp:419
RtpStreamDialog(RtpStreamDialog &other)=delete
Should not be cloneable.
void rtpPlayerReplace()
Slot to trigger replacing streams in the player.
Definition rtp_stream_dialog.cpp:994
void rtpPlayerDialogReplaceRtpStreams(QVector< rtpstream_id_t * > stream_ids)
Signal emitted to request replacing streams in the RTP Player.
void rtpPlayerAdd()
Slot to trigger adding streams to the player.
Definition rtp_stream_dialog.cpp:1001
virtual void updateWidgets()
Updates the state and contents of the dialog's widgets.
Definition wireshark_dialog.cpp:92
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
struct _rtpstream_id rtpstream_id_t