summaryrefslogtreecommitdiffstats
path: root/examples/multimediawidgets/player/player.h
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2016-11-10 17:55:06 +0100
committerYoann Lopes <yoann.lopes@qt.io>2017-01-27 13:27:09 +0000
commit47c672cdd67853658a2f86688ec72eb9b4d8c1ca (patch)
tree0cdcfe8d5ae4bafe847ee3cb9b847e872d1914b8 /examples/multimediawidgets/player/player.h
parent3b8ceccf49138243c8a8d98c4d7a4796944d188b (diff)
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 <yoann.lopes@qt.io>
Diffstat (limited to 'examples/multimediawidgets/player/player.h')
-rw-r--r--examples/multimediawidgets/player/player.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/multimediawidgets/player/player.h b/examples/multimediawidgets/player/player.h
index ca643bd7..ff60f8c6 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;