83#ifdef QT_MULTIMEDIA_LIB
84 Q_PROPERTY(QString currentOutputDeviceName READ currentOutputDeviceName)
104 static QToolButton *
addPlayerButton(QDialogButtonBox *button_box, QDialog *dialog);
106#ifdef QT_MULTIMEDIA_LIB
119 void replaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
120 void addRtpStreams(QVector<rtpstream_id_t *> stream_ids);
121 void removeRtpStreams(QVector<rtpstream_id_t *> stream_ids);
127 void packetsMarked();
128 void updateFilter(QString filter,
bool force =
false);
129 void goToPacket(
int packet_num);
130 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_infos);
131 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_infos);
132 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_infos);
135 void rtpAnalysisReplace();
136 void rtpAnalysisAdd();
137 void rtpAnalysisRemove();
142#ifdef QT_MULTIMEDIA_LIB
145 virtual void showEvent(QShowEvent *);
146 void contextMenuEvent(QContextMenuEvent *event);
147 bool eventFilter(QObject *obj, QEvent *event);
157 void rescanPackets(
bool rescale_axes =
false);
158 void createPlot(
bool rescale_axes =
false);
159 void updateWidgets();
160 void itemEntered(QTreeWidgetItem *item,
int column);
161 void mouseMovePlot(QMouseEvent *event);
162 void mouseMoveUpdate();
163 void showGraphContextMenu(
const QPoint &pos);
164 void graphClicked(QMouseEvent *event);
165 void graphDoubleClicked(QMouseEvent *event);
166 void plotClicked(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
167 void updateHintLabel();
170 void playFinished(RtpAudioStream *
stream, QAudio::Error error);
172 void setPlayPosition(
double secs);
173 void setPlaybackError(
const QString playback_error);
174 void changeAudioRoutingOnItem(QTreeWidgetItem *ti,
AudioRouting new_audio_routing);
175 void changeAudioRouting(
AudioRouting new_audio_routing);
176 void invertAudioMutingOnItem(QTreeWidgetItem *ti);
177 void on_playButton_clicked();
178 void on_pauseButton_clicked();
179 void on_stopButton_clicked();
180 void on_actionReset_triggered();
181 void on_actionZoomIn_triggered();
182 void on_actionZoomOut_triggered();
183 void on_actionMoveLeft10_triggered();
184 void on_actionMoveRight10_triggered();
185 void on_actionMoveLeft1_triggered();
186 void on_actionMoveRight1_triggered();
187 void on_actionGoToPacket_triggered();
188 void on_actionGoToSetupPacketPlot_triggered();
189 void on_actionGoToSetupPacketTree_triggered();
190 void on_actionRemoveStream_triggered();
191 void on_actionAudioRoutingP_triggered();
192 void on_actionAudioRoutingL_triggered();
193 void on_actionAudioRoutingLR_triggered();
194 void on_actionAudioRoutingR_triggered();
195 void on_actionAudioRoutingMute_triggered();
196 void on_actionAudioRoutingUnmute_triggered();
197 void on_actionAudioRoutingMuteInvert_triggered();
198 void on_streamTreeWidget_itemSelectionChanged();
199 void on_streamTreeWidget_itemDoubleClicked(QTreeWidgetItem *item,
const int column);
200 void on_outputDeviceComboBox_currentTextChanged(
const QString &);
201 void on_outputAudioRate_currentTextChanged(
const QString &);
202 void on_jitterSpinBox_valueChanged(
double);
203 void on_timingComboBox_currentIndexChanged(
int);
204 void on_todCheckBox_toggled(
bool checked);
205 void on_buttonBox_helpRequested();
206 void on_actionSelectAll_triggered();
207 void on_actionSelectInvert_triggered();
208 void on_actionSelectNone_triggered();
210 void on_actionPlay_triggered();
211 void on_actionStop_triggered();
212 void on_actionSaveAudioFromCursor_triggered();
213 void on_actionSaveAudioSyncStream_triggered();
214 void on_actionSaveAudioSyncFile_triggered();
215 void on_actionSavePayload_triggered();
216 void on_actionSelectInaudible_triggered();
217 void on_actionDeselectInaudible_triggered();
218 void on_actionPrepareFilter_triggered();
219 void on_actionReadCapture_triggered();
221#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
222 void sinkStateChanged();
228 static std::mutex init_mutex_;
229 static std::mutex run_mutex_;
231#ifdef QT_MULTIMEDIA_LIB
232 Ui::RtpPlayerDialog *ui;
233 QMenu *graph_ctx_menu_;
234 QMenu *list_ctx_menu_;
235 double first_stream_rel_start_time_;
236 double first_stream_abs_start_time_;
237 double first_stream_rel_stop_time_;
238 double streams_length_;
239 double start_marker_time_;
240 double start_marker_time_play_;
241 QCPItemStraightLine *cur_play_pos_;
242 QCPItemStraightLine *start_marker_pos_;
243 QString playback_error_;
244 QSharedPointer<QCPAxisTicker> number_ticker_;
245 QSharedPointer<QCPAxisTickerDateTime> datetime_ticker_;
246 bool stereo_available_;
247 QList<RtpAudioStream *> playing_streams_;
248#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
249 QAudioSink *marker_stream_;
250 QTimer notify_timer_;
251 qint64 notify_timer_start_diff_;
253 QAudioOutput *marker_stream_;
255 quint32 marker_stream_requested_out_rate_;
256 QTreeWidgetItem *last_ti_;
257 bool listener_removed_;
258 QPushButton *read_btn_;
259 QToolButton *inaudible_btn_;
260 QToolButton *analyze_btn_;
261 QPushButton *prepare_btn_;
262 QPushButton *export_btn_;
263 QMultiHash<unsigned, RtpAudioStream *> stream_hash_;
266 bool read_capture_enabled_;
267 double silence_skipped_time_;
268 QTimer *mouse_update_timer_;
277 static void tapDraw(
void *tapinfo_ptr);
280 void zoomXAxis(
bool in);
281 void panXAxis(
int x_pixels);
282 const QString getFormatedTime(
double f_time);
283 const QString getFormatedHoveredTime();
284 int getHoveredPacket();
285 QString currentOutputDeviceName();
286 double getStartPlayMarker();
287 void drawStartPlayMarker();
288 void setStartPlayMarker(
double new_time);
290 void formatAudioRouting(QTreeWidgetItem *ti,
AudioRouting audio_routing);
291 bool isStereoAvailable();
292#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
293 QAudioSink *getSilenceAudioOutput();
294 QAudioDevice getCurrentDeviceInfo();
296 QAudioOutput *getSilenceAudioOutput();
297 QAudioDeviceInfo getCurrentDeviceInfo();
299 QTreeWidgetItem *findItemByCoords(QPoint point);
300 QTreeWidgetItem *findItem(QCPAbstractPlottable *plottable);
301 void handleItemHighlight(QTreeWidgetItem *ti,
bool scroll);
302 void highlightItem(QTreeWidgetItem *ti,
bool highlight);
303 void invertSelection();
304 void handleGoToSetupPacket(QTreeWidgetItem *ti);
306 void removeRow(QTreeWidgetItem *ti);
307 void fillAudioRateMenu();
308 void cleanupMarkerStream();
310 qint64 saveAudioHeaderAU(QFile *save_file, quint32 channels,
unsigned audio_rate);
311 qint64 saveAudioHeaderWAV(QFile *save_file, quint32 channels,
unsigned audio_rate, qint64 samples);
312 bool writeAudioSilenceSamples(QFile *out_file, qint64 samples,
int stream_count);
313 bool writeAudioStreamsSamples(QFile *out_file, QVector<RtpAudioStream *> streams,
bool swap_bytes);
314 save_audio_t selectFileAudioFormatAndName(QString *file_path);
315 save_payload_t selectFilePayloadFormatAndName(QString *file_path);
316 QVector<RtpAudioStream *>getSelectedAudibleNonmutedAudioStreams();
317 void saveAudio(save_mode_t save_mode);
321 void selectInaudible(
bool select);
322 QVector<rtpstream_id_t *>getSelectedRtpStreamIDs();
323 void fillTappedColumns();
327 Ui::RtpPlayerDialog *ui;