MythTV  master
mythvideoscantracker.h
Go to the documentation of this file.
1 #ifndef MYTHVIDEOSCANTRACKER_H
2 #define MYTHVIDEOSCANTRACKER_H
3 
4 // MythTV
5 #include "libmythbase/mthread.h"
6 #include "mythframe.h"
7 #include "videoouttypes.h"
8 
9 class MythPlayerUI;
10 class MythVideoOutput;
11 
13 {
14  public:
15  explicit MythVideoScanTracker(MythPlayerUI* Parent);
16  virtual ~MythVideoScanTracker() = default;
17 
18  FrameScanType NextScanOverride ();
19  void SetScanOverride (FrameScanType Scan);
20  FrameScanType GetScanTypeWithOverride () const;
21 
22  protected:
23  void InitialiseScan (MythVideoOutput* VideoOutput);
24  void UnlockScan ();
25  void ResetTracker ();
26 
27  void SetScanType (FrameScanType Scan, MythVideoOutput* VideoOutput,
28  std::chrono::microseconds FrameInterval);
29  FrameScanType GetScanForDisplay (MythVideoFrame* Frame, bool& SecondField);
30  FrameScanType GetScanType () const;
31  virtual void AutoDeint (MythVideoFrame* Frame, MythVideoOutput* VideoOutput,
32  std::chrono::microseconds FrameInterval, bool AllowLock = true);
33  void CheckScanUpdate (MythVideoOutput* VideoOutput,
34  std::chrono::microseconds FrameInterval);
35  QString GetDeinterlacerName ();
36  FrameScanType DetectInterlace (FrameScanType NewScan, float Rate, int VideoHeight);
37 
38  private:
39  MythPlayerUI* m_parentPlayer { nullptr };
40  long long m_scanTracker { 0 };
41  FrameScanType m_resetScan { kScan_Ignore };
43  FrameScanType m_scanOverride { kScan_Detect };
44  bool m_scanLocked { false };
45  bool m_scanInitialized { false };
46  std::chrono::microseconds m_lastFrameInterval { 0us };
47  bool m_lastDeinterlacer2x { false };
48  MythDeintType m_lastDeinterlacer { DEINT_NONE };
49  VideoFrameType m_lastFrameCodec { FMT_NONE };
50  // Remove this
51  QThread* m_mainThread { QThread::currentThread() };
52 };
53 
54 #endif
MythVideoOutput
Definition: mythvideoout.h:35
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96
VideoOutput
This class serves as the base class for all video output methods.
Frame
Definition: zmdefines.h:102
FMT_NONE
@ FMT_NONE
Definition: mythframe.h:21
mythframe.h
MythDeintType
MythDeintType
Definition: mythframe.h:66
MythPlayerUI
Definition: mythplayerui.h:12
videoouttypes.h
VideoFrameType
VideoFrameType
Definition: mythframe.h:19
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:68
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
kScan_Interlaced
@ kScan_Interlaced
Definition: videoouttypes.h:98
kScan_Detect
@ kScan_Detect
Definition: videoouttypes.h:97
mthread.h
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythVideoFrame
Definition: mythframe.h:87