MythTV master
videovisualspectrum.h
Go to the documentation of this file.
1#ifndef VIDEOVISUALSPECTRUM_H
2#define VIDEOVISUALSPECTRUM_H
3
4#include <QVector>
5#include "videovisual.h"
6
7extern "C" {
8#include "libavutil/tx.h"
9}
10
11#define SPECTRUM_NAME QString("Spectrum")
12
14{
15 public:
17 ~VideoVisualSpectrum() override;
18
19 void Draw (QRect Area, MythPainter* Painter, QPaintDevice* Device) override;
20 QString Name () override { return SPECTRUM_NAME; }
21 void prepare () override;
22
23 protected:
24 virtual bool Initialise (QRect Area);
25 virtual bool InitialisePriv ();
26 virtual void DrawPriv (MythPainter* Painter, QPaintDevice* Device);
27
28 int m_numSamples { 64 };
29 QVector<double> m_magnitudes;
30 double m_range { 1.0 };
32 double m_scaleFactor { 2.0 };
33 double m_falloff { 3.0 };
34
35 AVComplexFloat* m_dftL { nullptr };
36 AVComplexFloat* m_dftR { nullptr };
37 static constexpr float kScale { 1.0F };
38 AVTXContext *m_fftContext { nullptr };
39 av_tx_fn m_fft { nullptr };
40
41
42 private:
43 QVector<QRect> m_rects;
44 int m_barWidth { 1 };
45};
46
47#endif
A device containing images (ie. USB stick, CD, storage group etc)
static constexpr float kScale
AVTXContext * m_fftContext
QVector< QRect > m_rects
void Draw(QRect Area, MythPainter *Painter, QPaintDevice *Device) override
AVComplexFloat * m_dftR
AVComplexFloat * m_dftL
QString Name() override
VideoVisualSpectrum(AudioPlayer *Audio, MythRender *Render)
virtual bool Initialise(QRect Area)
QVector< double > m_magnitudes
virtual void DrawPriv(MythPainter *Painter, QPaintDevice *Device)
#define SPECTRUM_NAME