MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CommBreakMap Class Reference

#include <commbreakmap.h>

Public Member Functions

 CommBreakMap (void)
 
bool HasMap (void) const
 
CommSkipMode GetAutoCommercialSkip (void) const
 
void SetAutoCommercialSkip (CommSkipMode autoskip, uint64_t framesPlayed)
 
int GetSkipCommercials (void) const
 
void SkipCommercials (int direction)
 
void ResetLastSkip (void)
 
void SetTracker (uint64_t framesPlayed)
 
void GetMap (frm_dir_map_t &map) const
 
void SetMap (const frm_dir_map_t &newMap, uint64_t framesPlayed)
 
void LoadMap (PlayerContext *player_ctx, uint64_t framesPlayed)
 
bool IsInCommBreak (uint64_t frameNumber) const
 
bool AutoCommercialSkip (uint64_t &jumpToFrame, uint64_t framesPlayed, double video_frame_rate, uint64_t totalFrames, QString &comm_msg)
 
bool DoSkipCommercials (uint64_t &jumpToFrame, uint64_t framesPlayed, double video_frame_rate, uint64_t totalFrames, QString &comm_msg)
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (CommBreakMap)
 
void MergeShortCommercials (double video_frame_rate)
 

Private Attributes

QMutex m_commBreakMapLock {QMutex::Recursive}
 
int m_skipcommercials {0}
 
CommSkipMode m_autocommercialskip {kCommSkipOff}
 
int m_commrewindamount {0}
 
int m_commnotifyamount {0}
 
int m_lastCommSkipDirection {0}
 
time_t m_lastCommSkipTime {0}
 
uint64_t m_lastCommSkipStart {0}
 
time_t m_lastSkipTime {0 }
 
bool m_hascommbreaktable {false}
 
QDateTime m_lastIgnoredManualSkip
 
int m_maxskip {3600}
 
int m_maxShortMerge {0}
 
frm_dir_map_t m_commBreakMap
 
frm_dir_map_t::Iterator m_commBreakIter
 

Detailed Description

Definition at line 19 of file commbreakmap.h.

Constructor & Destructor Documentation

◆ CommBreakMap()

CommBreakMap::CommBreakMap ( void  )

Definition at line 9 of file commbreakmap.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

CommBreakMap::Q_DECLARE_TR_FUNCTIONS ( CommBreakMap  )
private

◆ HasMap()

bool CommBreakMap::HasMap ( void  ) const
inline

Definition at line 26 of file commbreakmap.h.

Referenced by MythPlayer::EventLoop(), and MythPlayer::HandleProgramEditorActions().

◆ GetAutoCommercialSkip()

CommSkipMode CommBreakMap::GetAutoCommercialSkip ( void  ) const

Definition at line 21 of file commbreakmap.cpp.

Referenced by MythPlayer::EventLoop().

◆ SetAutoCommercialSkip()

void CommBreakMap::SetAutoCommercialSkip ( CommSkipMode  autoskip,
uint64_t  framesPlayed 
)

Definition at line 32 of file commbreakmap.cpp.

◆ GetSkipCommercials()

int CommBreakMap::GetSkipCommercials ( void  ) const
inline

Definition at line 31 of file commbreakmap.h.

Referenced by MythPlayer::EventLoop().

◆ SkipCommercials()

void CommBreakMap::SkipCommercials ( int  direction)

Definition at line 41 of file commbreakmap.cpp.

Referenced by MythPlayer::EventLoop(), and MythPlayer::StartPlaying().

◆ ResetLastSkip()

void CommBreakMap::ResetLastSkip ( void  )

Definition at line 27 of file commbreakmap.cpp.

Referenced by MythPlayer::ClearAfterSeek().

◆ SetTracker()

void CommBreakMap::SetTracker ( uint64_t  framesPlayed)

◆ GetMap()

void CommBreakMap::GetMap ( frm_dir_map_t map) const

Definition at line 92 of file commbreakmap.cpp.

Referenced by MythPlayer::HandleProgramEditorActions().

◆ SetMap()

void CommBreakMap::SetMap ( const frm_dir_map_t newMap,
uint64_t  framesPlayed 
)

Definition at line 132 of file commbreakmap.cpp.

Referenced by MythPlayer::SetCommBreakMap().

◆ LoadMap()

void CommBreakMap::LoadMap ( PlayerContext player_ctx,
uint64_t  framesPlayed 
)

Definition at line 51 of file commbreakmap.cpp.

Referenced by MythPlayer::EventStart(), and MythPlayer::SeekForScreenGrab().

◆ IsInCommBreak()

bool CommBreakMap::IsInCommBreak ( uint64_t  frameNumber) const

Definition at line 99 of file commbreakmap.cpp.

Referenced by MythPlayer::SeekForScreenGrab().

◆ AutoCommercialSkip()

bool CommBreakMap::AutoCommercialSkip ( uint64_t &  jumpToFrame,
uint64_t  framesPlayed,
double  video_frame_rate,
uint64_t  totalFrames,
QString &  comm_msg 
)

Definition at line 145 of file commbreakmap.cpp.

Referenced by MythPlayer::EventLoop().

◆ DoSkipCommercials()

bool CommBreakMap::DoSkipCommercials ( uint64_t &  jumpToFrame,
uint64_t  framesPlayed,
double  video_frame_rate,
uint64_t  totalFrames,
QString &  comm_msg 
)

Definition at line 253 of file commbreakmap.cpp.

Referenced by MythPlayer::EventLoop().

◆ MergeShortCommercials()

void CommBreakMap::MergeShortCommercials ( double  video_frame_rate)
private

Definition at line 367 of file commbreakmap.cpp.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

Member Data Documentation

◆ m_commBreakMapLock

QMutex CommBreakMap::m_commBreakMapLock {QMutex::Recursive}
mutableprivate

◆ m_skipcommercials

int CommBreakMap::m_skipcommercials {0}
private

Definition at line 52 of file commbreakmap.h.

Referenced by DoSkipCommercials(), GetSkipCommercials(), and SkipCommercials().

◆ m_autocommercialskip

CommSkipMode CommBreakMap::m_autocommercialskip {kCommSkipOff}
private

◆ m_commrewindamount

int CommBreakMap::m_commrewindamount {0}
private

Definition at line 54 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), CommBreakMap(), and DoSkipCommercials().

◆ m_commnotifyamount

int CommBreakMap::m_commnotifyamount {0}
private

Definition at line 55 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and CommBreakMap().

◆ m_lastCommSkipDirection

int CommBreakMap::m_lastCommSkipDirection {0}
private

Definition at line 56 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_lastCommSkipTime

time_t CommBreakMap::m_lastCommSkipTime {0}
private

Definition at line 57 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_lastCommSkipStart

uint64_t CommBreakMap::m_lastCommSkipStart {0}
private

Definition at line 58 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_lastSkipTime

time_t CommBreakMap::m_lastSkipTime {0 }
private

Definition at line 59 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and ResetLastSkip().

◆ m_hascommbreaktable

bool CommBreakMap::m_hascommbreaktable {false}
private

Definition at line 60 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), HasMap(), LoadMap(), SetMap(), and SetTracker().

◆ m_lastIgnoredManualSkip

QDateTime CommBreakMap::m_lastIgnoredManualSkip
private

Definition at line 61 of file commbreakmap.h.

Referenced by CommBreakMap(), and DoSkipCommercials().

◆ m_maxskip

int CommBreakMap::m_maxskip {3600}
private

Definition at line 62 of file commbreakmap.h.

Referenced by CommBreakMap(), and DoSkipCommercials().

◆ m_maxShortMerge

int CommBreakMap::m_maxShortMerge {0}
private

Definition at line 63 of file commbreakmap.h.

Referenced by CommBreakMap(), and MergeShortCommercials().

◆ m_commBreakMap

frm_dir_map_t CommBreakMap::m_commBreakMap
private

◆ m_commBreakIter

frm_dir_map_t::Iterator CommBreakMap::m_commBreakIter
private

The documentation for this class was generated from the following files: