From 47c672cdd67853658a2f86688ec72eb9b4d8c1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 10 Nov 2016 17:55:06 +0100 Subject: Add audio probe handling in the player example Adds histogram widgets to visualize the data received from the audio probes, similar to what's done for the video probe already. Change-Id: Ie49a7766dc7ddcab1d9ccaf31372fb23f9ff5b68 Reviewed-by: Yoann Lopes --- examples/multimediawidgets/player/player.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'examples/multimediawidgets/player/player.h') diff --git a/examples/multimediawidgets/player/player.h b/examples/multimediawidgets/player/player.h index ca643bd7d..ff60f8c63 100644 --- a/examples/multimediawidgets/player/player.h +++ b/examples/multimediawidgets/player/player.h @@ -56,6 +56,7 @@ class QPushButton; class QSlider; class QVideoProbe; class QVideoWidget; +class QAudioProbe; QT_END_NAMESPACE class PlaylistModel; @@ -89,6 +90,7 @@ private slots: void playlistPositionChanged(int); void statusChanged(QMediaPlayer::MediaStatus status); + void stateChanged(QMediaPlayer::State state); void bufferingProgress(int progress); void videoAvailableChanged(bool available); @@ -97,6 +99,7 @@ private slots: void showColorDialog(); private: + void clearHistogram(); void setTrackInfo(const QString &info); void setStatusInfo(const QString &info); void handleCursor(QMediaPlayer::MediaStatus status); @@ -113,8 +116,10 @@ private: QDialog *colorDialog; QLabel *labelHistogram; - HistogramWidget *histogram; - QVideoProbe *probe; + HistogramWidget *videoHistogram; + HistogramWidget *audioHistogram; + QVideoProbe *videoProbe; + QAudioProbe *audioProbe; PlaylistModel *playlistModel; QAbstractItemView *playlistView; -- cgit v1.2.3