110#ifdef QT_MULTIMEDIA_LIB
111 Q_PROPERTY(QString currentOutputDeviceName READ currentOutputDeviceName)
141 static QToolButton *
addPlayerButton(QDialogButtonBox *button_box, QDialog *dialog);
143#ifdef QT_MULTIMEDIA_LIB
166 void replaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
172 void addRtpStreams(QVector<rtpstream_id_t *> stream_ids);
178 void removeRtpStreams(QVector<rtpstream_id_t *> stream_ids);
187 void packetsMarked();
194 void updateFilter(QString filter,
bool force =
false);
200 void goToPacket(
int packet_num);
206 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_infos);
212 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_infos);
218 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_infos);
224 void rtpAnalysisReplace()
override;
229 void rtpAnalysisAdd()
override;
234 void rtpAnalysisRemove()
override;
245#ifdef QT_MULTIMEDIA_LIB
254 virtual void showEvent(QShowEvent *)
override;
260 void contextMenuEvent(QContextMenuEvent *event)
override;
268 bool eventFilter(QObject *obj, QEvent *event)
override;
284 void rescanPackets(
bool rescale_axes =
false);
290 void createPlot(
bool rescale_axes =
false);
302 void itemEntered(QTreeWidgetItem *item,
int column);
308 void mouseMovePlot(QMouseEvent *event);
313 void mouseMoveUpdate();
319 void showGraphContextMenu(
const QPoint &pos);
325 void graphClicked(QMouseEvent *event);
331 void graphDoubleClicked(QMouseEvent *event);
339 void plotClicked(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
344 void updateHintLabel();
361 void playFinished(RtpAudioStream *
stream, QAudio::Error error);
367 void setPlayPosition(
double secs);
373 void setPlaybackError(
const QString playback_error);
380 void changeAudioRoutingOnItem(QTreeWidgetItem *ti,
AudioRouting new_audio_routing);
386 void changeAudioRouting(
AudioRouting new_audio_routing);
392 void invertAudioMutingOnItem(QTreeWidgetItem *ti);
397 void on_playButton_clicked();
402 void on_pauseButton_clicked();
407 void on_stopButton_clicked();
412 void on_actionReset_triggered();
417 void on_actionZoomIn_triggered();
422 void on_actionZoomOut_triggered();
427 void on_actionMoveLeft10_triggered();
432 void on_actionMoveRight10_triggered();
437 void on_actionMoveLeft1_triggered();
442 void on_actionMoveRight1_triggered();
447 void on_actionGoToPacket_triggered();
452 void on_actionGoToSetupPacketPlot_triggered();
457 void on_actionGoToSetupPacketTree_triggered();
462 void on_actionRemoveStream_triggered();
467 void on_actionAudioRoutingP_triggered();
472 void on_actionAudioRoutingL_triggered();
477 void on_actionAudioRoutingLR_triggered();
482 void on_actionAudioRoutingR_triggered();
487 void on_actionAudioRoutingMute_triggered();
492 void on_actionAudioRoutingUnmute_triggered();
497 void on_actionAudioRoutingMuteInvert_triggered();
502 void on_streamTreeWidget_itemSelectionChanged();
509 void on_streamTreeWidget_itemDoubleClicked(QTreeWidgetItem *item,
const int column);
514 void on_outputDeviceComboBox_currentTextChanged(
const QString &);
520 void on_outputAudioRate_currentTextChanged(
const QString &rate_string);
525 void on_jitterSpinBox_valueChanged(
double);
530 void on_timingComboBox_currentIndexChanged(
int);
536 void on_todCheckBox_toggled(
bool checked);
541 void on_visualSRSpinBox_editingFinished();
546 void on_buttonBox_helpRequested();
551 void on_actionSelectAll_triggered();
556 void on_actionSelectInvert_triggered();
561 void on_actionSelectNone_triggered();
571 void on_actionPlay_triggered();
576 void on_actionStop_triggered();
581 void on_actionSaveAudioFromCursor_triggered();
586 void on_actionSaveAudioSyncStream_triggered();
591 void on_actionSaveAudioSyncFile_triggered();
596 void on_actionSavePayload_triggered();
601 void on_actionSelectInaudible_triggered();
606 void on_actionDeselectInaudible_triggered();
611 void on_actionPrepareFilter_triggered();
616 void on_actionReadCapture_triggered();
621 void sinkStateChanged();
629 static std::mutex init_mutex_;
632 static std::mutex run_mutex_;
634#ifdef QT_MULTIMEDIA_LIB
636 Ui::RtpPlayerDialog *ui;
639 QMenu *graph_ctx_menu_;
642 QMenu *list_ctx_menu_;
645 double first_stream_rel_start_time_;
648 double first_stream_abs_start_time_;
651 double first_stream_rel_stop_time_;
654 double streams_length_;
657 double start_marker_time_;
660 double start_marker_time_play_;
663 QCPItemStraightLine *cur_play_pos_;
666 QCPItemStraightLine *start_marker_pos_;
669 QString playback_error_;
672 QSharedPointer<QCPAxisTicker> number_ticker_;
675 QSharedPointer<QCPAxisTickerDateTime> datetime_ticker_;
678 bool stereo_available_;
681 QList<RtpAudioStream *> playing_streams_;
684 QAudioSink *marker_stream_;
687 QTimer notify_timer_;
690 qint64 notify_timer_start_diff_;
692 quint32 marker_stream_requested_out_rate_;
695 QTreeWidgetItem *last_ti_;
698 bool listener_removed_;
701 QPushButton *read_btn_;
704 QToolButton *inaudible_btn_;
707 QToolButton *analyze_btn_;
710 QPushButton *prepare_btn_;
713 QPushButton *export_btn_;
716 QMultiHash<unsigned, RtpAudioStream *> stream_hash_;
725 bool read_capture_enabled_;
728 double silence_skipped_time_;
731 QTimer *mouse_update_timer_;
756 static void tapDraw(
void *tapinfo_ptr);
769 void zoomXAxis(
bool in);
775 void panXAxis(
int x_pixels);
782 const QString getFormatedTime(
double f_time);
788 const QString getFormatedHoveredTime();
794 int getHoveredPacket();
800 QString currentOutputDeviceName();
806 double getStartPlayMarker();
811 void drawStartPlayMarker();
817 void setStartPlayMarker(
double new_time);
831 void formatAudioRouting(QTreeWidgetItem *ti,
AudioRouting audio_routing);
837 bool isStereoAvailable();
843 QAudioSink *getSilenceAudioOutput();
849 QAudioDevice getCurrentDeviceInfo();
856 QTreeWidgetItem *findItemByCoords(QPoint point);
863 QTreeWidgetItem *findItem(QCPAbstractPlottable *plottable);
870 void handleItemHighlight(QTreeWidgetItem *ti,
bool scroll);
877 void highlightItem(QTreeWidgetItem *ti,
bool highlight);
882 void invertSelection();
888 void handleGoToSetupPacket(QTreeWidgetItem *ti);
900 void removeRow(QTreeWidgetItem *ti);
905 void fillAudioRateMenu();
910 void cleanupMarkerStream();
919 qint64 saveAudioHeaderAU(QFile *save_file, quint32 channels,
unsigned audio_rate);
929 qint64 saveAudioHeaderWAV(QFile *save_file, quint32 channels,
unsigned audio_rate, qint64 samples);
938 bool writeAudioSilenceSamples(QFile *out_file, qint64 samples,
int stream_count);
947 bool writeAudioStreamsSamples(QFile *out_file, QVector<RtpAudioStream *> streams,
bool big_endian);
954 save_audio_t selectFileAudioFormatAndName(QString *file_path);
961 save_payload_t selectFilePayloadFormatAndName(QString *file_path);
967 QVector<RtpAudioStream *>getSelectedAudibleNonmutedAudioStreams();
994 void selectInaudible(
bool select);
1000 QVector<rtpstream_id_t *>getSelectedRtpStreamIDs();
1005 void fillTappedColumns();
1010 Ui::RtpPlayerDialog *ui;