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 
7 #define SPECTRUM_NAME QString("Spectrum")
8 
10 {
11  public:
13  ~VideoVisualSpectrum() override;
14 
15  void Draw (QRect Area, MythPainter* Painter, QPaintDevice* Device) override;
16  QString Name () override { return SPECTRUM_NAME; }
17  void prepare () override;
18 
19  protected:
20  virtual bool Initialise (QRect Area);
21  virtual bool InitialisePriv ();
22  virtual void DrawPriv (MythPainter* Painter, QPaintDevice* Device);
23 
24  int m_numSamples { 64 };
25  QVector<double> m_magnitudes;
26  double m_range { 1.0 };
28  double m_scaleFactor { 2.0 };
29  double m_falloff { 3.0 };
30 
31  fftw_plan m_lplan;
32  fftw_plan m_rplan;
33  myth_fftw_float* m_lin { nullptr };
34  myth_fftw_float* m_rin { nullptr };
35  myth_fftw_complex* m_lout { nullptr };
36  myth_fftw_complex* m_rout { nullptr };
37 
38  private:
39  QVector<QRect> m_rects;
40  int m_barWidth { 1 };
41 };
42 
43 #endif
VideoVisualSpectrum::m_lplan
fftw_plan m_lplan
Definition: videovisualspectrum.h:31
VideoVisualSpectrum::m_scale
LogScale m_scale
Definition: videovisualspectrum.h:27
VideoVisualSpectrum::InitialisePriv
virtual bool InitialisePriv()
Definition: videovisualspectrum.cpp:157
AudioPlayer
Definition: audioplayer.h:28
VideoVisualSpectrum::m_rects
QVector< QRect > m_rects
Definition: videovisualspectrum.h:39
VideoVisualSpectrum::m_rin
myth_fftw_float * m_rin
Definition: videovisualspectrum.h:34
VideoVisualSpectrum::Initialise
virtual bool Initialise(QRect Area)
Definition: videovisualspectrum.cpp:140
VideoVisualSpectrum::m_magnitudes
QVector< double > m_magnitudes
Definition: videovisualspectrum.h:25
VideoVisualSpectrum::Name
QString Name() override
Definition: videovisualspectrum.h:16
Device
A device containing images (ie. USB stick, CD, storage group etc)
Definition: imagemanager.cpp:33
VideoVisualSpectrum::m_lout
myth_fftw_complex * m_lout
Definition: videovisualspectrum.h:35
VideoVisualSpectrum::m_lin
myth_fftw_float * m_lin
Definition: videovisualspectrum.h:33
VideoVisualSpectrum::m_rout
myth_fftw_complex * m_rout
Definition: videovisualspectrum.h:36
VideoVisualSpectrum::m_barWidth
int m_barWidth
Definition: videovisualspectrum.h:40
VideoVisualSpectrum
Definition: videovisualspectrum.h:9
VideoVisualSpectrum::m_range
double m_range
Definition: videovisualspectrum.h:26
VideoVisualSpectrum::m_falloff
double m_falloff
Definition: videovisualspectrum.h:29
VideoVisualSpectrum::VideoVisualSpectrum
VideoVisualSpectrum(AudioPlayer *Audio, MythRender *Render)
Definition: videovisualspectrum.cpp:16
VideoVisualSpectrum::~VideoVisualSpectrum
~VideoVisualSpectrum() override
Definition: videovisualspectrum.cpp:28
VideoVisualSpectrum::m_numSamples
int m_numSamples
Definition: videovisualspectrum.h:24
SPECTRUM_NAME
#define SPECTRUM_NAME
Definition: videovisualspectrum.h:7
MythRender
Definition: mythrender_base.h:23
MythPainter
Definition: mythpainter.h:32
videovisual.h
VideoVisualSpectrum::prepare
void prepare() override
Definition: videovisualspectrum.cpp:117
VideoVisual
Definition: videovisual.h:42
VideoVisualSpectrum::Draw
void Draw(QRect Area, MythPainter *Painter, QPaintDevice *Device) override
Definition: videovisualspectrum.cpp:40
VideoVisualSpectrum::DrawPriv
virtual void DrawPriv(MythPainter *Painter, QPaintDevice *Device)
Definition: videovisualspectrum.cpp:123
VideoVisualSpectrum::m_rplan
fftw_plan m_rplan
Definition: videovisualspectrum.h:32
VideoVisualSpectrum::m_scaleFactor
double m_scaleFactor
Definition: videovisualspectrum.h:28
LogScale
Definition: videovisualdefs.h:6