MythTV master
mythvideoscantracker.h
Go to the documentation of this file.
1#ifndef MYTHVIDEOSCANTRACKER_H
2#define MYTHVIDEOSCANTRACKER_H
3
4// MythTV
6#include "mythframe.h"
7#include "videoouttypes.h"
8
9class MythPlayerUI;
10class 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
virtual ~MythVideoScanTracker()=default
This class serves as the base class for all video output methods.
MythDeintType
Definition: mythframe.h:67
@ DEINT_NONE
Definition: mythframe.h:68
VideoFrameType
Definition: mythframe.h:20
@ FMT_NONE
Definition: mythframe.h:21
#define MTV_PUBLIC
Definition: mythtvexp.h:15
FrameScanType
Definition: videoouttypes.h:95
@ kScan_Ignore
Definition: videoouttypes.h:96
@ kScan_Interlaced
Definition: videoouttypes.h:98
@ kScan_Detect
Definition: videoouttypes.h:97