MythTV
master
|
#include <libmythtv/mythvideoscantracker.h>
Public Member Functions | |
MythVideoScanTracker (MythPlayerUI *Parent) | |
virtual | ~MythVideoScanTracker ()=default |
FrameScanType | NextScanOverride () |
void | SetScanOverride (FrameScanType Scan) |
FrameScanType | GetScanTypeWithOverride () const |
Protected Member Functions | |
void | InitialiseScan (MythVideoOutput *VideoOutput) |
void | UnlockScan () |
void | ResetTracker () |
void | SetScanType (FrameScanType Scan, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval) |
FrameScanType | GetScanForDisplay (MythVideoFrame *Frame, bool &SecondField) |
FrameScanType | GetScanType () const |
virtual void | AutoDeint (MythVideoFrame *Frame, MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval, bool AllowLock=true) |
Check whether deinterlacing should be enabled. More... | |
void | CheckScanUpdate (MythVideoOutput *VideoOutput, std::chrono::microseconds FrameInterval) |
QString | GetDeinterlacerName () |
FrameScanType | DetectInterlace (FrameScanType NewScan, float Rate, int VideoHeight) |
Private Attributes | |
MythPlayerUI * | m_parentPlayer { nullptr } |
long long | m_scanTracker { 0 } |
FrameScanType | m_resetScan { kScan_Ignore } |
FrameScanType | m_scan { kScan_Interlaced } |
FrameScanType | m_scanOverride { kScan_Detect } |
bool | m_scanLocked { false } |
bool | m_scanInitialized { false } |
std::chrono::microseconds | m_lastFrameInterval { 0us } |
bool | m_lastDeinterlacer2x { false } |
MythDeintType | m_lastDeinterlacer { DEINT_NONE } |
VideoFrameType | m_lastFrameCodec { FMT_NONE } |
QThread * | m_mainThread { QThread::currentThread() } |
Definition at line 12 of file mythvideoscantracker.h.
|
explicit |
Definition at line 11 of file mythvideoscantracker.cpp.
|
virtualdefault |
FrameScanType MythVideoScanTracker::NextScanOverride | ( | ) |
Definition at line 45 of file mythvideoscantracker.cpp.
Referenced by TV::ActiveHandleAction().
void MythVideoScanTracker::SetScanOverride | ( | FrameScanType | Scan | ) |
Definition at line 53 of file mythvideoscantracker.cpp.
Referenced by TV::OverrideScan().
FrameScanType MythVideoScanTracker::GetScanTypeWithOverride | ( | ) | const |
Definition at line 104 of file mythvideoscantracker.cpp.
Referenced by TV::MenuItemDisplayPlayback(), and TV::OverrideScan().
|
protected |
Definition at line 16 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::VideoStart().
|
protected |
Definition at line 33 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::ChangeSpeed(), and MythPlayerUI::SetVideoParams().
|
protected |
Definition at line 39 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::SetVideoParams().
|
protected |
Definition at line 122 of file mythvideoscantracker.cpp.
Referenced by AutoDeint(), MythDVDPlayer::AutoDeint(), CheckScanUpdate(), MythBDPlayer::DisplayPauseFrame(), MythDVDPlayer::DisplayPauseFrame(), and MythPlayerUI::SetVideoParams().
|
protected |
Definition at line 67 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::DoDisplayVideoFrame().
|
protected |
Definition at line 99 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::DisplayPauseFrame(), MythPlayerUI::GetCodecDescription(), MythPlayerUI::InitFrameInterval(), and MythPlayerUI::RefreshPauseFrame().
|
protectedvirtual |
Check whether deinterlacing should be enabled.
If the user has triggered an override, this will always be used (until 'detect' is requested to turn it off again).
For H264 material, the decoder will signal when the current frame is on a new GOP boundary and if the frame's interlaced flag does not match the current scan type, the scan type is unlocked. This works well for all test clips with mixed progressive/interlaced sequences.
For all other material, we lock the scan type to interlaced when interlaced frames are seen - and do not unlock if we see progressive frames. This is primarily targetted at MPEG2 material where there is a lot of content where the scan type changes frequently - and for no obvious reason. This will result in 'false positives' in some cases but there is no clear approach that works for all cases. The previous behaviour is preserved (i.e. lock to interlaced if interlaced frames are seen) which results in less erratic playback (as the deinterlacers are not continually switched on and off) and correctly deinterlaces material that is not otherwise flagged correctly.
Reimplemented in MythDVDPlayer.
Definition at line 177 of file mythvideoscantracker.cpp.
Referenced by MythDVDPlayer::AutoDeint(), and MythPlayerUI::DisplayNormalFrame().
|
protected |
Definition at line 111 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::EventLoop().
|
protected |
Definition at line 117 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::GetCodecDescription().
|
protected |
Definition at line 243 of file mythvideoscantracker.cpp.
Referenced by MythPlayerUI::SetVideoParams().
|
private |
Definition at line 39 of file mythvideoscantracker.h.
Referenced by InitialiseScan(), and SetScanType().
|
private |
Definition at line 40 of file mythvideoscantracker.h.
Referenced by AutoDeint(), InitialiseScan(), and ResetTracker().
|
private |
Definition at line 41 of file mythvideoscantracker.h.
Referenced by CheckScanUpdate(), and SetScanType().
|
private |
Definition at line 42 of file mythvideoscantracker.h.
Referenced by AutoDeint(), DetectInterlace(), GetScanForDisplay(), GetScanType(), GetScanTypeWithOverride(), InitialiseScan(), ResetTracker(), and SetScanType().
|
private |
Definition at line 43 of file mythvideoscantracker.h.
Referenced by AutoDeint(), GetScanTypeWithOverride(), NextScanOverride(), and SetScanOverride().
Definition at line 44 of file mythvideoscantracker.h.
Referenced by AutoDeint(), InitialiseScan(), ResetTracker(), SetScanOverride(), SetScanType(), and UnlockScan().
Definition at line 45 of file mythvideoscantracker.h.
Referenced by SetScanOverride(), SetScanType(), and UnlockScan().
|
private |
Definition at line 46 of file mythvideoscantracker.h.
Referenced by SetScanType().
Definition at line 47 of file mythvideoscantracker.h.
Referenced by GetDeinterlacerName(), and GetScanForDisplay().
|
private |
Definition at line 48 of file mythvideoscantracker.h.
Referenced by GetDeinterlacerName(), and GetScanForDisplay().
|
private |
Definition at line 49 of file mythvideoscantracker.h.
Referenced by GetDeinterlacerName(), and GetScanForDisplay().
|
private |
Definition at line 51 of file mythvideoscantracker.h.
Referenced by SetScanType().