diff options
author | Christian Strømme <christian.stromme@qt.io> | 2016-11-10 17:55:06 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@qt.io> | 2017-01-27 13:27:09 +0000 |
commit | 47c672cdd67853658a2f86688ec72eb9b4d8c1ca (patch) | |
tree | 0cdcfe8d5ae4bafe847ee3cb9b847e872d1914b8 /examples/multimediawidgets/player/histogramwidget.h | |
parent | 3b8ceccf49138243c8a8d98c4d7a4796944d188b (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/histogramwidget.h')
-rw-r--r-- | examples/multimediawidgets/player/histogramwidget.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/multimediawidgets/player/histogramwidget.h b/examples/multimediawidgets/player/histogramwidget.h index 9462b1c84..a85dd27e1 100644 --- a/examples/multimediawidgets/player/histogramwidget.h +++ b/examples/multimediawidgets/player/histogramwidget.h @@ -43,8 +43,11 @@ #include <QThread> #include <QVideoFrame> +#include <QAudioBuffer> #include <QWidget> +class QAudioLevel; + class FrameProcessor: public QObject { Q_OBJECT @@ -67,6 +70,7 @@ public: public slots: void processFrame(QVideoFrame frame); + void processBuffer(QAudioBuffer buffer); void setHistogram(QVector<qreal> histogram); protected: @@ -78,6 +82,7 @@ private: FrameProcessor m_processor; QThread m_processorThread; bool m_isBusy; + QVector<QAudioLevel *> audioLevels; }; #endif // HISTOGRAMWIDGET_H |