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 
8 {
9  public:
11  ~VideoVisualSpectrum() override;
12 
13  void Draw(const QRect &area, MythPainter *painter,
14  QPaintDevice* device) override; // VideoVisual
15  QString Name(void) override { return "Spectrum"; } // VideoVisual
16  void prepare() override; // VideoVisual
17 
18  protected:
19  virtual bool Initialise(const QRect &area);
20  virtual bool InitialisePriv(void);
21  virtual void DrawPriv(MythPainter *painter, QPaintDevice* device);
22 
23  int m_numSamples {64};
24  QVector<double> m_magnitudes;
25  double m_range {1.0};
27  double m_scaleFactor {2.0};
28  double m_falloff {3.0};
29 
30  fftw_plan m_lplan;
31  fftw_plan m_rplan;
32  myth_fftw_float *m_lin {nullptr};
33  myth_fftw_float *m_rin {nullptr};
34  myth_fftw_complex *m_lout {nullptr};
35  myth_fftw_complex *m_rout {nullptr};
36 
37  private:
38  QVector<QRect> m_rects;
39  int m_barWidth {1};
40 };
41 
42 #endif // VIDEOVISUALSPECTRUM_H
VideoVisualSpectrum::m_lplan
fftw_plan m_lplan
Definition: videovisualspectrum.h:30
VideoVisualSpectrum::DrawPriv
virtual void DrawPriv(MythPainter *painter, QPaintDevice *device)
Definition: videovisualspectrum.cpp:137
VideoVisualSpectrum::m_scale
LogScale m_scale
Definition: videovisualspectrum.h:26
AudioPlayer
Definition: audioplayer.h:26
VideoVisualSpectrum::m_rects
QVector< QRect > m_rects
Definition: videovisualspectrum.h:38
VideoVisualSpectrum::m_rin
myth_fftw_float * m_rin
Definition: videovisualspectrum.h:33
VideoVisualSpectrum::Name
QString Name(void) override
Definition: videovisualspectrum.h:15
VideoVisualSpectrum::m_magnitudes
QVector< double > m_magnitudes
Definition: videovisualspectrum.h:24
VideoVisualSpectrum::m_lout
myth_fftw_complex * m_lout
Definition: videovisualspectrum.h:34
VideoVisualSpectrum::m_lin
myth_fftw_float * m_lin
Definition: videovisualspectrum.h:32
VideoVisualSpectrum::m_rout
myth_fftw_complex * m_rout
Definition: videovisualspectrum.h:35
VideoVisualSpectrum::m_barWidth
int m_barWidth
Definition: videovisualspectrum.h:39
VideoVisualSpectrum
Definition: videovisualspectrum.h:7
VideoVisualSpectrum::m_range
double m_range
Definition: videovisualspectrum.h:25
VideoVisualSpectrum::m_falloff
double m_falloff
Definition: videovisualspectrum.h:28
VideoVisualSpectrum::VideoVisualSpectrum
VideoVisualSpectrum(AudioPlayer *audio, MythRender *render)
Definition: videovisualspectrum.cpp:11
VideoVisualSpectrum::Initialise
virtual bool Initialise(const QRect &area)
Definition: videovisualspectrum.cpp:154
VideoVisualSpectrum::~VideoVisualSpectrum
~VideoVisualSpectrum() override
Definition: videovisualspectrum.cpp:25
VideoVisualSpectrum::Draw
void Draw(const QRect &area, MythPainter *painter, QPaintDevice *device) override
Definition: videovisualspectrum.cpp:41
VideoVisualSpectrum::m_numSamples
int m_numSamples
Definition: videovisualspectrum.h:23
MythRender
Definition: mythrender_base.h:22
MythPainter
Definition: mythpainter.h:32
videovisual.h
VideoVisualSpectrum::prepare
void prepare() override
Definition: videovisualspectrum.cpp:129
VideoVisual
Definition: videovisual.h:40
VideoVisualSpectrum::m_rplan
fftw_plan m_rplan
Definition: videovisualspectrum.h:31
VideoVisualSpectrum::InitialisePriv
virtual bool InitialisePriv(void)
Definition: videovisualspectrum.cpp:173
VideoVisualSpectrum::m_scaleFactor
double m_scaleFactor
Definition: videovisualspectrum.h:27
LogScale
Definition: videovisualdefs.h:6