Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
rtp_stream_dialog.h
Go to the documentation of this file.
1
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
146 void rtpAnalysisReplace();
147
151 void rtpAnalysisAdd();
152
156 void rtpAnalysisRemove();
157
158protected:
164 explicit RtpStreamDialog(QWidget &parent, CaptureFile &cf);
165
170
177 bool eventFilter(QObject *obj, QEvent *event);
178
182 void captureFileClosing();
183
187 void captureFileClosed();
188
189private:
191 static RtpStreamDialog *pinstance_;
192
194 static std::mutex mutex_;
195
197 Ui::RtpStreamDialog *ui;
198
200 rtpstream_tapinfo_t tapinfo_;
201
203 QToolButton *find_reverse_button_;
204
206 QPushButton *prepare_button_;
207
209 QPushButton *export_button_;
210
212 QPushButton *copy_button_;
213
215 QToolButton *analyze_button_;
216
218 QToolButton *player_button_;
219
221 QMenu ctx_menu_;
222
224 bool need_redraw_;
225
227 QList<rtpstream_id_t> last_selected_;
228
233 static void tapReset(rtpstream_tapinfo_t *tapinfo);
234
239 static void tapDraw(rtpstream_tapinfo_t *tapinfo);
240
246 static void tapMarkPacket(rtpstream_tapinfo_t *tapinfo, frame_data *fd);
247
251 void updateStreams();
252
256 void updateWidgets();
257
261 void showPlayer();
262
268 void setRtpStreamSelection(rtpstream_id_t *id, bool state);
269
275 QList<QVariant> streamRowData(int row) const;
276
280 void freeLastSelected();
281
285 void invertSelection();
286
291 QVector<rtpstream_id_t *>getSelectedRtpIds();
292
293private slots:
298 void showStreamMenu(QPoint pos);
299
303 void on_actionCopyAsCsv_triggered();
304
308 void on_actionCopyAsYaml_triggered();
309
313 void on_actionFindReverseNormal_triggered();
314
318 void on_actionFindReversePair_triggered();
319
323 void on_actionFindReverseSingle_triggered();
324
328 void on_actionGoToSetup_triggered();
329
333 void on_actionMarkPackets_triggered();
334
338 void on_actionPrepareFilter_triggered();
339
343 void on_streamTreeWidget_itemSelectionChanged();
344
348 void on_buttonBox_helpRequested();
349
353 void on_actionExportAsRtpDump_triggered();
354
359 void captureEvent(CaptureEvent e);
360
365 void displayFilterCheckBoxToggled(bool checked);
366
371 void on_todCheckBox_toggled(bool checked);
372
376 void on_actionSelectAll_triggered();
377
381 void on_actionSelectInvert_triggered();
382
386 void on_actionSelectNone_triggered();
387
391 void on_actionAnalyze_triggered();
392};
393
394#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
Base class for RTP related dialogs providing common functionality.
Definition rtp_player_dialog.h:78
Singleton dialog for viewing and managing RTP streams. Singleton pattern based on https://refactoring...
Definition rtp_stream_dialog.h:32
void rtpAnalysisAdd()
Slot to trigger adding streams to analysis.
Definition rtp_stream_dialog.cpp:1022
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.
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 captureFileClosed()
Handles cleanup after the capture file is fully closed.
Definition rtp_stream_dialog.cpp:725
void operator=(const RtpStreamDialog &)=delete
Should not be assignable.
void rtpAnalysisReplace()
Slot to trigger replacing streams in analysis.
Definition rtp_stream_dialog.cpp:1015
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 rtpAnalysisRemove()
Slot to trigger removing streams from analysis.
Definition rtp_stream_dialog.cpp:1029
void captureFileClosing()
Handles operations before the capture file finishes closing.
Definition rtp_stream_dialog.cpp:718
void goToPacket(int packet_num)
Signal emitted to navigate to a specific packet.
bool eventFilter(QObject *obj, QEvent *event)
Event filter for intercepting events from child widgets.
Definition rtp_stream_dialog.cpp:460
~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
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
Definition rtp_stream_id.h:33
Definition rtp_stream.h:98