MythTV  master
audiooutputgraph.h
Go to the documentation of this file.
1 #ifndef AUDIOOUTPUTGRAPH_H
2 #define AUDIOOUTPUTGRAPH_H
3 #include <cstdint>
4 
5 #include "mythexp.h"
6 #include <QMutex>
7 
8 #include "visual.h"
9 
10 class MythImage;
11 class MythPainter;
12 
14 {
15 public:
17  ~AudioOutputGraph() override;
18 
19  // Properties
20  void SetPainter(MythPainter* /*painter*/);
21  void SetSampleRate(unsigned sample_rate);
22  void SetSampleCount(unsigned sample_count);
23 
24  void SetSilenceLevel(int db = -72) { m_dBsilence = db; }
25  void SetQuietLevel(int db = -60) { m_dBquiet = db; }
26  void SetLoudLevel(int db = -12) { m_dBLoud = db; }
27  void SetMaxLevel(int db = -6) { m_dbMax = db; }
28 
29  // Operations
30  MythImage *GetImage(int64_t timecode) const;
31  void Reset();
32 
33  // MythTV::Visual implementation
34 public:
35  void add(const void *b, unsigned long b_len, unsigned long timecode,
36  int channels, int bits) override; // Visual
37  void prepare() override; // Visual
38 
39  // Implementation
40 private:
41  MythPainter *m_painter {nullptr};
42  int m_dBsilence {-72};
43  int m_dBquiet {-60};
44  int m_dBLoud {-12};
45  int m_dbMax {-6};
46  class Buffer;
47  Buffer * const m_buffer {nullptr};
48  QMutex mutable m_mutex;
49 };
50 
51 #endif // AUDIOOUTPUTGRAPH_H
MythTV::Visual::prepare
virtual void prepare()=0
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
AudioOutputGraph::SetMaxLevel
void SetMaxLevel(int db=-6)
Definition: audiooutputgraph.h:27
AudioOutputGraph
Definition: audiooutputgraph.h:14
AudioOutputGraph::SetLoudLevel
void SetLoudLevel(int db=-12)
Definition: audiooutputgraph.h:26
mythexp.h
AudioOutputGraph::Buffer
Definition: audiooutputgraph.cpp:26
MythTV::Visual
Definition: visual.h:17
AudioOutputGraph::SetSilenceLevel
void SetSilenceLevel(int db=-72)
Definition: audiooutputgraph.h:24
AudioOutputGraph::SetQuietLevel
void SetQuietLevel(int db=-60)
Definition: audiooutputgraph.h:25
Buffer
Definition: MythExternControl.h:37
MythPainter
Definition: mythpainter.h:33
MythImage
Definition: mythimage.h:37
MythTV::Visual::add
virtual void add(const void *b, unsigned long b_len, unsigned long w, int c, int p)=0
AudioOutputGraph::m_mutex
QMutex m_mutex
Definition: audiooutputgraph.h:48
visual.h