MythTV  master
mythvideoscantracker.h
Go to the documentation of this file.
1 #ifndef MYTHVIDEOSCANTRACKER_H
2 #define MYTHVIDEOSCANTRACKER_H
3 
4 // MythTV
5 #include "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, int FrameInterval);
28  FrameScanType GetScanForDisplay (MythVideoFrame* Frame, bool& SecondField);
29  FrameScanType GetScanType () const;
30  virtual void AutoDeint (MythVideoFrame* Frame, MythVideoOutput* VideoOutput,
31  int FrameInterval, bool AllowLock = true);
32  void CheckScanUpdate (MythVideoOutput* VideoOutput, int FrameInterval);
33  QString GetDeinterlacerName ();
34  FrameScanType DetectInterlace (FrameScanType NewScan, float Rate, int VideoHeight);
35 
36  private:
37  MythPlayerUI* m_parentPlayer { nullptr };
38  long long m_scanTracker { 0 };
39  FrameScanType m_resetScan { kScan_Ignore };
41  FrameScanType m_scanOverride { kScan_Detect };
42  bool m_scanLocked { false };
43  bool m_scanInitialized { false };
44  int m_lastFrameInterval { 0 };
45  bool m_lastDeinterlacer2x { false };
46  MythDeintType m_lastDeinterlacer { DEINT_NONE };
47  VideoFrameType m_lastFrameCodec { FMT_NONE };
48  // Remove this
49  QThread* m_mainThread { QThread::currentThread() };
50 };
51 
52 #endif
MythVideoOutput
Definition: mythvideoout.h:35
kScan_Detect
@ kScan_Detect
Definition: videoouttypes.h:97
VideoOutput
This class serves as the base class for all video output methods.
Frame
Definition: zmdefines.h:93
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:67
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
mythframe.h
FMT_NONE
@ FMT_NONE
Definition: mythframe.h:20
MythPlayerUI
Definition: mythplayerui.h:10
videoouttypes.h
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythDeintType
MythDeintType
Definition: mythframe.h:65
kScan_Interlaced
@ kScan_Interlaced
Definition: videoouttypes.h:98
mthread.h
VideoFrameType
VideoFrameType
Definition: mythframe.h:18
MythVideoScanTracker
Definition: mythvideoscantracker.h:12
MythVideoFrame
Definition: mythframe.h:85
kScan_Ignore
@ kScan_Ignore
Definition: videoouttypes.h:96