Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
rtp_player_dialog.h
1 /* rtp_player_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef RTP_PLAYER_DIALOG_H
11 #define RTP_PLAYER_DIALOG_H
12 
13 #include "config.h"
14 
15 #include <glib.h>
16 
17 #include "ui/rtp_stream.h"
18 
19 #include "wireshark_dialog.h"
20 
21 #include <QMap>
22 
23 namespace Ui {
24 class RtpPlayerDialog;
25 }
26 
27 struct _rtp_stream_info;
28 
30 class QDialogButtonBox;
31 class QMenu;
32 class RtpAudioStream;
33 
35 {
36  Q_OBJECT
37 #ifdef QT_MULTIMEDIA_LIB
38  Q_PROPERTY(QString currentOutputDeviceName READ currentOutputDeviceName)
39 #endif
40 
41 public:
42  explicit RtpPlayerDialog(QWidget &parent, CaptureFile &cf);
43 
49  // XXX We might want to move this to qt_ui_utils.
50  static QPushButton *addPlayerButton(QDialogButtonBox *button_box);
51 
52 #ifdef QT_MULTIMEDIA_LIB
53  ~RtpPlayerDialog();
54 
55  void accept();
56  void reject();
57 
65  void addRtpStream(struct _rtp_stream_info *rtp_stream);
66 
67 public slots:
68 
69 signals:
70  void goToPacket(int packet_num);
71 
72 protected:
73  virtual void showEvent(QShowEvent *);
74  virtual void keyPressEvent(QKeyEvent *event);
75 
76 private slots:
80  void retapPackets();
83  void rescanPackets(bool rescale_axes = false);
84  void updateWidgets();
85  void graphClicked(QMouseEvent *event);
86  void updateHintLabel();
87  void resetXAxis();
88 
89  void setPlayPosition(double secs);
90  void setPlaybackError(const QString playback_error) {
91  playback_error_ = playback_error;
92  updateHintLabel();
93  }
94  void on_playButton_clicked();
95  void on_stopButton_clicked();
96  void on_actionReset_triggered();
97  void on_actionZoomIn_triggered();
98  void on_actionZoomOut_triggered();
99  void on_actionMoveLeft10_triggered();
100  void on_actionMoveRight10_triggered();
101  void on_actionMoveLeft1_triggered();
102  void on_actionMoveRight1_triggered();
103  void on_actionGoToPacket_triggered();
104  void on_streamTreeWidget_itemSelectionChanged();
105  void on_outputDeviceComboBox_currentIndexChanged(const QString &);
106  void on_jitterSpinBox_valueChanged(double);
107  void on_timingComboBox_currentIndexChanged(int);
108  void on_todCheckBox_toggled(bool checked);
109  void on_buttonBox_helpRequested();
110 
111 private:
113  QMenu *ctx_menu_;
114  double start_rel_time_;
115  QCPItemStraightLine *cur_play_pos_;
116  QString playback_error_;
117 
118 // const QString streamKey(const struct _rtp_stream_info *rtp_stream);
119 // const QString streamKey(const packet_info *pinfo, const struct _rtp_info *rtpinfo);
120 
121  // Tap callbacks
122 // static void tapReset(void *tapinfo_ptr);
123  static gboolean tapPacket(void *tapinfo_ptr, packet_info *pinfo, epan_dissect_t *, const void *rtpinfo_ptr);
124  static void tapDraw(void *tapinfo_ptr);
125 
126  void addPacket(packet_info *pinfo, const struct _rtp_info *rtpinfo);
127  void zoomXAxis(bool in);
128  void panXAxis(int x_pixels);
129  double getLowestTimestamp();
130  const QString getHoveredTime();
131  int getHoveredPacket();
132  QString currentOutputDeviceName();
133 
134 #else // QT_MULTIMEDIA_LIB
135 private:
137 #endif // QT_MULTIMEDIA_LIB
138 };
139 
140 #endif // RTP_PLAYER_DIALOG_H
141 
142 /*
143  * Editor modelines
144  *
145  * Local Variables:
146  * c-basic-offset: 4
147  * tab-width: 8
148  * indent-tabs-mode: nil
149  * End:
150  *
151  * ex: set shiftwidth=4 tabstop=8 expandtab:
152  * :indentSize=4:tabSize=8:noTabs=true:
153  */
Definition: packet_info.h:44
Definition: ui_about_dialog.h:291
Definition: rtp_player_dialog.h:34
A straight line that spans infinitely in both directions.
Definition: qcustomplot.h:3239
Definition: ui_rtp_player_dialog.h:348
Definition: epan_dissect.h:28
Definition: wireshark_dialog.h:32
Definition: packet-rtp.h:26
Definition: capture_file.h:22
Definition: rtp_stream.h:36