MythTV  master
v4l2encsignalmonitor.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 #ifndef V4L2encSignalMonitor_H
4 #define V4L2encSignalMonitor_H
5 
6 #include <QMap>
7 
8 #include "dtvsignalmonitor.h"
9 #include "v4lchannel.h"
10 #include "v4l2util.h"
11 
13 
14 using FilterMap = QMap<uint,int>;
15 
17 {
18  public:
19  V4L2encSignalMonitor(int db_cardnum, V4LChannel *_channel,
20  bool _release_stream, uint64_t _flags = 0);
21  ~V4L2encSignalMonitor() override;
22 
23  void Stop(void) override; // SignalMonitor
24 
25  protected:
28 
29  void UpdateValues(void) override; // SignalMonitor
31  { return dynamic_cast<V4LChannel*>(m_channel); }
32 
33  bool HasLock(void);
34  int StableResolution(void);
35 
36  protected:
39  bool m_isTS {false};
40 
41  private:
42  int m_strength {0};
43  std::chrono::milliseconds m_stableTime {1500ms};
44  int m_width {0};
45  int m_height {0};
48  QDateTime m_statusTime;
49 };
50 
51 #endif // V4L2encSIGNALMONITOR_H
V4L2encSignalMonitor::HasLock
bool HasLock(void)
Definition: v4l2encsignalmonitor.cpp:161
V4L2encStreamHandler
Definition: v4l2encstreamhandler.h:21
V4L2encSignalMonitor::m_timer
MythTimer m_timer
Definition: v4l2encsignalmonitor.h:47
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:13
V4L2encSignalMonitor::m_statusTime
QDateTime m_statusTime
Definition: v4l2encsignalmonitor.h:48
SignalMonitor::m_channel
ChannelBase * m_channel
Definition: signalmonitor.h:205
V4L2encSignalMonitor::~V4L2encSignalMonitor
~V4L2encSignalMonitor() override
Stops signal monitoring and table monitoring threads.
Definition: v4l2encsignalmonitor.cpp:64
V4L2encSignalMonitor::m_v4l2
V4L2util m_v4l2
Definition: v4l2encsignalmonitor.h:37
FilterMap
QMap< uint, int > FilterMap
Definition: ExternalSignalMonitor.h:13
V4L2encSignalMonitor::StableResolution
int StableResolution(void)
Wait for a stable signal.
Definition: v4l2encsignalmonitor.cpp:187
V4L2encSignalMonitor
Definition: v4l2encsignalmonitor.h:16
v4l2util.h
v4lchannel.h
V4L2encSignalMonitor::m_streamHandler
V4L2encStreamHandler * m_streamHandler
Definition: v4l2encsignalmonitor.h:38
V4L2encSignalMonitor::m_isTS
bool m_isTS
Definition: v4l2encsignalmonitor.h:39
uint
unsigned int uint
Definition: compat.h:144
V4L2encSignalMonitor::m_height
int m_height
Definition: v4l2encsignalmonitor.h:45
V4L2encSignalMonitor::V4L2encSignalMonitor
V4L2encSignalMonitor(void)
V4L2util
Definition: v4l2util.h:16
V4L2encSignalMonitor::Stop
void Stop(void) override
Stop signal monitoring and table monitoring threads.
Definition: v4l2encsignalmonitor.cpp:75
DTVSignalMonitor
This class is intended to detect the presence of needed tables.
Definition: dtvsignalmonitor.h:14
V4L2encSignalMonitor::m_strength
int m_strength
Definition: v4l2encsignalmonitor.h:42
V4L2encSignalMonitor::m_lockCnt
uint m_lockCnt
Definition: v4l2encsignalmonitor.h:46
V4L2encSignalMonitor::UpdateValues
void UpdateValues(void) override
Fills in frontend stats and emits status Qt signals.
Definition: v4l2encsignalmonitor.cpp:92
V4L2encSignalMonitor::m_stableTime
std::chrono::milliseconds m_stableTime
Definition: v4l2encsignalmonitor.h:43
V4LChannel
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:30
V4L2encSignalMonitor::GetV4L2encChannel
V4LChannel * GetV4L2encChannel(void)
Definition: v4l2encsignalmonitor.h:30
V4L2encSignalMonitor::m_width
int m_width
Definition: v4l2encsignalmonitor.h:44
dtvsignalmonitor.h