114#ifdef QT_MULTIMEDIA_LIB
115 Q_PROPERTY(QString currentOutputDeviceName READ currentOutputDeviceName)
145 static QToolButton *
addPlayerButton(QDialogButtonBox *button_box, QDialog *dialog);
147#ifdef QT_MULTIMEDIA_LIB
170 void replaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
176 void addRtpStreams(QVector<rtpstream_id_t *> stream_ids);
182 void removeRtpStreams(QVector<rtpstream_id_t *> stream_ids);
191 void packetsMarked();
198 void updateFilter(QString filter,
bool force =
false);
204 void goToPacket(
int packet_num);
210 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_infos);
216 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_infos);
222 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_infos);
228 void rtpAnalysisReplace();
233 void rtpAnalysisAdd();
238 void rtpAnalysisRemove();
249#ifdef QT_MULTIMEDIA_LIB
258 virtual void showEvent(QShowEvent *);
264 void contextMenuEvent(QContextMenuEvent *event);
272 bool eventFilter(QObject *obj, QEvent *event);
288 void rescanPackets(
bool rescale_axes =
false);
294 void createPlot(
bool rescale_axes =
false);
306 void itemEntered(QTreeWidgetItem *item,
int column);
312 void mouseMovePlot(QMouseEvent *event);
317 void mouseMoveUpdate();
323 void showGraphContextMenu(
const QPoint &pos);
329 void graphClicked(QMouseEvent *event);
335 void graphDoubleClicked(QMouseEvent *event);
343 void plotClicked(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
348 void updateHintLabel();
365 void playFinished(RtpAudioStream *
stream, QAudio::Error error);
371 void setPlayPosition(
double secs);
377 void setPlaybackError(
const QString playback_error);
384 void changeAudioRoutingOnItem(QTreeWidgetItem *ti,
AudioRouting new_audio_routing);
390 void changeAudioRouting(
AudioRouting new_audio_routing);
396 void invertAudioMutingOnItem(QTreeWidgetItem *ti);
401 void on_playButton_clicked();
406 void on_pauseButton_clicked();
411 void on_stopButton_clicked();
416 void on_actionReset_triggered();
421 void on_actionZoomIn_triggered();
426 void on_actionZoomOut_triggered();
431 void on_actionMoveLeft10_triggered();
436 void on_actionMoveRight10_triggered();
441 void on_actionMoveLeft1_triggered();
446 void on_actionMoveRight1_triggered();
451 void on_actionGoToPacket_triggered();
456 void on_actionGoToSetupPacketPlot_triggered();
461 void on_actionGoToSetupPacketTree_triggered();
466 void on_actionRemoveStream_triggered();
471 void on_actionAudioRoutingP_triggered();
476 void on_actionAudioRoutingL_triggered();
481 void on_actionAudioRoutingLR_triggered();
486 void on_actionAudioRoutingR_triggered();
491 void on_actionAudioRoutingMute_triggered();
496 void on_actionAudioRoutingUnmute_triggered();
501 void on_actionAudioRoutingMuteInvert_triggered();
506 void on_streamTreeWidget_itemSelectionChanged();
513 void on_streamTreeWidget_itemDoubleClicked(QTreeWidgetItem *item,
const int column);
518 void on_outputDeviceComboBox_currentTextChanged(
const QString &);
524 void on_outputAudioRate_currentTextChanged(
const QString &rate_string);
529 void on_jitterSpinBox_valueChanged(
double);
534 void on_timingComboBox_currentIndexChanged(
int);
540 void on_todCheckBox_toggled(
bool checked);
545 void on_visualSRSpinBox_editingFinished();
550 void on_buttonBox_helpRequested();
555 void on_actionSelectAll_triggered();
560 void on_actionSelectInvert_triggered();
565 void on_actionSelectNone_triggered();
575 void on_actionPlay_triggered();
580 void on_actionStop_triggered();
585 void on_actionSaveAudioFromCursor_triggered();
590 void on_actionSaveAudioSyncStream_triggered();
595 void on_actionSaveAudioSyncFile_triggered();
600 void on_actionSavePayload_triggered();
605 void on_actionSelectInaudible_triggered();
610 void on_actionDeselectInaudible_triggered();
615 void on_actionPrepareFilter_triggered();
620 void on_actionReadCapture_triggered();
622#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
626 void sinkStateChanged();
635 static std::mutex init_mutex_;
638 static std::mutex run_mutex_;
640#ifdef QT_MULTIMEDIA_LIB
642 Ui::RtpPlayerDialog *ui;
645 QMenu *graph_ctx_menu_;
648 QMenu *list_ctx_menu_;
651 double first_stream_rel_start_time_;
654 double first_stream_abs_start_time_;
657 double first_stream_rel_stop_time_;
660 double streams_length_;
663 double start_marker_time_;
666 double start_marker_time_play_;
669 QCPItemStraightLine *cur_play_pos_;
672 QCPItemStraightLine *start_marker_pos_;
675 QString playback_error_;
678 QSharedPointer<QCPAxisTicker> number_ticker_;
681 QSharedPointer<QCPAxisTickerDateTime> datetime_ticker_;
684 bool stereo_available_;
687 QList<RtpAudioStream *> playing_streams_;
689#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
691 QAudioSink *marker_stream_;
694 QTimer notify_timer_;
697 qint64 notify_timer_start_diff_;
700 QAudioOutput *marker_stream_;
703 quint32 marker_stream_requested_out_rate_;
706 QTreeWidgetItem *last_ti_;
709 bool listener_removed_;
712 QPushButton *read_btn_;
715 QToolButton *inaudible_btn_;
718 QToolButton *analyze_btn_;
721 QPushButton *prepare_btn_;
724 QPushButton *export_btn_;
727 QMultiHash<unsigned, RtpAudioStream *> stream_hash_;
736 bool read_capture_enabled_;
739 double silence_skipped_time_;
742 QTimer *mouse_update_timer_;
767 static void tapDraw(
void *tapinfo_ptr);
780 void zoomXAxis(
bool in);
786 void panXAxis(
int x_pixels);
793 const QString getFormatedTime(
double f_time);
799 const QString getFormatedHoveredTime();
805 int getHoveredPacket();
811 QString currentOutputDeviceName();
817 double getStartPlayMarker();
822 void drawStartPlayMarker();
828 void setStartPlayMarker(
double new_time);
842 void formatAudioRouting(QTreeWidgetItem *ti,
AudioRouting audio_routing);
848 bool isStereoAvailable();
850#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
855 QAudioSink *getSilenceAudioOutput();
861 QAudioDevice getCurrentDeviceInfo();
867 QAudioOutput *getSilenceAudioOutput();
873 QAudioDeviceInfo getCurrentDeviceInfo();
881 QTreeWidgetItem *findItemByCoords(QPoint point);
888 QTreeWidgetItem *findItem(QCPAbstractPlottable *plottable);
895 void handleItemHighlight(QTreeWidgetItem *ti,
bool scroll);
902 void highlightItem(QTreeWidgetItem *ti,
bool highlight);
907 void invertSelection();
913 void handleGoToSetupPacket(QTreeWidgetItem *ti);
925 void removeRow(QTreeWidgetItem *ti);
930 void fillAudioRateMenu();
935 void cleanupMarkerStream();
944 qint64 saveAudioHeaderAU(QFile *save_file, quint32 channels,
unsigned audio_rate);
954 qint64 saveAudioHeaderWAV(QFile *save_file, quint32 channels,
unsigned audio_rate, qint64 samples);
963 bool writeAudioSilenceSamples(QFile *out_file, qint64 samples,
int stream_count);
972 bool writeAudioStreamsSamples(QFile *out_file, QVector<RtpAudioStream *> streams,
bool big_endian);
979 save_audio_t selectFileAudioFormatAndName(QString *file_path);
986 save_payload_t selectFilePayloadFormatAndName(QString *file_path);
992 QVector<RtpAudioStream *>getSelectedAudibleNonmutedAudioStreams();
1019 void selectInaudible(
bool select);
1025 QVector<rtpstream_id_t *>getSelectedRtpStreamIDs();
1030 void fillTappedColumns();
1035 Ui::RtpPlayerDialog *ui;