69#ifdef QT_MULTIMEDIA_LIB
70 Q_PROPERTY(QString currentOutputDeviceName READ currentOutputDeviceName)
90 static QToolButton *
addPlayerButton(QDialogButtonBox *button_box, QDialog *dialog);
92#ifdef QT_MULTIMEDIA_LIB
105 void replaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
106 void addRtpStreams(QVector<rtpstream_id_t *> stream_ids);
107 void removeRtpStreams(QVector<rtpstream_id_t *> stream_ids);
113 void packetsMarked();
114 void updateFilter(QString filter,
bool force =
false);
115 void goToPacket(
int packet_num);
116 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_infos);
117 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_infos);
118 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_infos);
121 void rtpAnalysisReplace();
122 void rtpAnalysisAdd();
123 void rtpAnalysisRemove();
128#ifdef QT_MULTIMEDIA_LIB
131 virtual void showEvent(QShowEvent *);
132 void contextMenuEvent(QContextMenuEvent *event);
133 bool eventFilter(QObject *obj, QEvent *event);
143 void rescanPackets(
bool rescale_axes =
false);
144 void createPlot(
bool rescale_axes =
false);
145 void updateWidgets();
146 void itemEntered(QTreeWidgetItem *item,
int column);
147 void mouseMovePlot(QMouseEvent *event);
148 void mouseMoveUpdate();
149 void showGraphContextMenu(
const QPoint &pos);
150 void graphClicked(QMouseEvent *event);
151 void graphDoubleClicked(QMouseEvent *event);
152 void plotClicked(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
153 void updateHintLabel();
156 void playFinished(RtpAudioStream *
stream, QAudio::Error error);
158 void setPlayPosition(
double secs);
159 void setPlaybackError(
const QString playback_error);
160 void changeAudioRoutingOnItem(QTreeWidgetItem *ti,
AudioRouting new_audio_routing);
161 void changeAudioRouting(
AudioRouting new_audio_routing);
162 void invertAudioMutingOnItem(QTreeWidgetItem *ti);
163 void on_playButton_clicked();
164 void on_pauseButton_clicked();
165 void on_stopButton_clicked();
166 void on_actionReset_triggered();
167 void on_actionZoomIn_triggered();
168 void on_actionZoomOut_triggered();
169 void on_actionMoveLeft10_triggered();
170 void on_actionMoveRight10_triggered();
171 void on_actionMoveLeft1_triggered();
172 void on_actionMoveRight1_triggered();
173 void on_actionGoToPacket_triggered();
174 void on_actionGoToSetupPacketPlot_triggered();
175 void on_actionGoToSetupPacketTree_triggered();
176 void on_actionRemoveStream_triggered();
177 void on_actionAudioRoutingP_triggered();
178 void on_actionAudioRoutingL_triggered();
179 void on_actionAudioRoutingLR_triggered();
180 void on_actionAudioRoutingR_triggered();
181 void on_actionAudioRoutingMute_triggered();
182 void on_actionAudioRoutingUnmute_triggered();
183 void on_actionAudioRoutingMuteInvert_triggered();
184 void on_streamTreeWidget_itemSelectionChanged();
185 void on_streamTreeWidget_itemDoubleClicked(QTreeWidgetItem *item,
const int column);
186 void on_outputDeviceComboBox_currentTextChanged(
const QString &);
187 void on_outputAudioRate_currentTextChanged(
const QString &);
188 void on_jitterSpinBox_valueChanged(
double);
189 void on_timingComboBox_currentIndexChanged(
int);
190 void on_todCheckBox_toggled(
bool checked);
191 void on_buttonBox_helpRequested();
192 void on_actionSelectAll_triggered();
193 void on_actionSelectInvert_triggered();
194 void on_actionSelectNone_triggered();
196 void on_actionPlay_triggered();
197 void on_actionStop_triggered();
198 void on_actionSaveAudioFromCursor_triggered();
199 void on_actionSaveAudioSyncStream_triggered();
200 void on_actionSaveAudioSyncFile_triggered();
201 void on_actionSavePayload_triggered();
202 void on_actionSelectInaudible_triggered();
203 void on_actionDeselectInaudible_triggered();
204 void on_actionPrepareFilter_triggered();
205 void on_actionReadCapture_triggered();
207#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
208 void sinkStateChanged();
214 static std::mutex init_mutex_;
215 static std::mutex run_mutex_;
217#ifdef QT_MULTIMEDIA_LIB
218 Ui::RtpPlayerDialog *ui;
219 QMenu *graph_ctx_menu_;
220 QMenu *list_ctx_menu_;
221 double first_stream_rel_start_time_;
222 double first_stream_abs_start_time_;
223 double first_stream_rel_stop_time_;
224 double streams_length_;
225 double start_marker_time_;
226 double start_marker_time_play_;
227 QCPItemStraightLine *cur_play_pos_;
228 QCPItemStraightLine *start_marker_pos_;
229 QString playback_error_;
230 QSharedPointer<QCPAxisTicker> number_ticker_;
231 QSharedPointer<QCPAxisTickerDateTime> datetime_ticker_;
232 bool stereo_available_;
233 QList<RtpAudioStream *> playing_streams_;
234#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
235 QAudioSink *marker_stream_;
236 QTimer notify_timer_;
237 qint64 notify_timer_start_diff_;
239 QAudioOutput *marker_stream_;
241 quint32 marker_stream_requested_out_rate_;
242 QTreeWidgetItem *last_ti_;
243 bool listener_removed_;
244 QPushButton *read_btn_;
245 QToolButton *inaudible_btn_;
246 QToolButton *analyze_btn_;
247 QPushButton *prepare_btn_;
248 QPushButton *export_btn_;
249 QMultiHash<unsigned, RtpAudioStream *> stream_hash_;
252 bool read_capture_enabled_;
253 double silence_skipped_time_;
254 QTimer *mouse_update_timer_;
263 static void tapDraw(
void *tapinfo_ptr);
266 void zoomXAxis(
bool in);
267 void panXAxis(
int x_pixels);
268 const QString getFormatedTime(
double f_time);
269 const QString getFormatedHoveredTime();
270 int getHoveredPacket();
271 QString currentOutputDeviceName();
272 double getStartPlayMarker();
273 void drawStartPlayMarker();
274 void setStartPlayMarker(
double new_time);
276 void formatAudioRouting(QTreeWidgetItem *ti,
AudioRouting audio_routing);
277 bool isStereoAvailable();
278#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
279 QAudioSink *getSilenceAudioOutput();
280 QAudioDevice getCurrentDeviceInfo();
282 QAudioOutput *getSilenceAudioOutput();
283 QAudioDeviceInfo getCurrentDeviceInfo();
285 QTreeWidgetItem *findItemByCoords(QPoint point);
286 QTreeWidgetItem *findItem(QCPAbstractPlottable *plottable);
287 void handleItemHighlight(QTreeWidgetItem *ti,
bool scroll);
288 void highlightItem(QTreeWidgetItem *ti,
bool highlight);
289 void invertSelection();
290 void handleGoToSetupPacket(QTreeWidgetItem *ti);
292 void removeRow(QTreeWidgetItem *ti);
293 void fillAudioRateMenu();
294 void cleanupMarkerStream();
296 qint64 saveAudioHeaderAU(QFile *save_file, quint32 channels,
unsigned audio_rate);
297 qint64 saveAudioHeaderWAV(QFile *save_file, quint32 channels,
unsigned audio_rate, qint64 samples);
298 bool writeAudioSilenceSamples(QFile *out_file, qint64 samples,
int stream_count);
299 bool writeAudioStreamsSamples(QFile *out_file, QVector<RtpAudioStream *> streams,
bool swap_bytes);
300 save_audio_t selectFileAudioFormatAndName(QString *file_path);
301 save_payload_t selectFilePayloadFormatAndName(QString *file_path);
302 QVector<RtpAudioStream *>getSelectedAudibleNonmutedAudioStreams();
303 void saveAudio(save_mode_t save_mode);
307 void selectInaudible(
bool select);
308 QVector<rtpstream_id_t *>getSelectedRtpStreamIDs();
309 void fillTappedColumns();
313 Ui::RtpPlayerDialog *ui;