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

#include <commbreakmap.h>

Collaboration diagram for CommBreakMap:
Collaboration graph
[legend]

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

void MergeShortCommercials (double video_frame_rate)
 

Private Attributes

QRecursiveMutex m_commBreakMapLock
 
int m_skipcommercials {0}
 
CommSkipMode m_autocommercialskip {kCommSkipOff}
 
std::chrono::seconds m_commrewindamount {0s}
 
std::chrono::seconds m_commnotifyamount {0s}
 
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
 
std::chrono::seconds m_maxskip {1h}
 
std::chrono::seconds m_maxShortMerge {0s}
 
frm_dir_map_t m_commBreakMap
 
frm_dir_map_t::Iterator m_commBreakIter
 

Detailed Description

Definition at line 18 of file commbreakmap.h.

Constructor & Destructor Documentation

◆ CommBreakMap()

CommBreakMap::CommBreakMap ( void  )

Definition at line 10 of file commbreakmap.cpp.

Member Function Documentation

◆ HasMap()

bool CommBreakMap::HasMap ( void  ) const
inline

◆ GetAutoCommercialSkip()

CommSkipMode CommBreakMap::GetAutoCommercialSkip ( void  ) const

Definition at line 21 of file commbreakmap.cpp.

Referenced by MythPlayerUI::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 30 of file commbreakmap.h.

Referenced by MythPlayerUI::EventLoop().

◆ SkipCommercials()

void CommBreakMap::SkipCommercials ( int  direction)

Definition at line 41 of file commbreakmap.cpp.

Referenced by MythPlayerUI::EventLoop(), and MythPlayerUI::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 91 of file commbreakmap.cpp.

Referenced by MythPlayerEditorUI::HandleProgramEditorActions().

◆ SetMap()

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

Definition at line 131 of file commbreakmap.cpp.

Referenced by MythPlayer::SetCommBreakMap().

◆ LoadMap()

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

◆ IsInCommBreak()

bool CommBreakMap::IsInCommBreak ( uint64_t  frameNumber) const

Definition at line 98 of file commbreakmap.cpp.

Referenced by MythPreviewPlayer::SeekForScreenGrab().

◆ AutoCommercialSkip()

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

Definition at line 144 of file commbreakmap.cpp.

Referenced by MythPlayerUI::EventLoop().

◆ DoSkipCommercials()

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

Definition at line 249 of file commbreakmap.cpp.

Referenced by MythPlayerUI::EventLoop().

◆ MergeShortCommercials()

void CommBreakMap::MergeShortCommercials ( double  video_frame_rate)
private

Definition at line 361 of file commbreakmap.cpp.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

Member Data Documentation

◆ m_commBreakMapLock

QRecursiveMutex CommBreakMap::m_commBreakMapLock
mutableprivate

◆ m_skipcommercials

int CommBreakMap::m_skipcommercials {0}
private

Definition at line 51 of file commbreakmap.h.

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

◆ m_autocommercialskip

CommSkipMode CommBreakMap::m_autocommercialskip {kCommSkipOff}
private

Definition at line 52 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), GetAutoCommercialSkip(), and SetAutoCommercialSkip().

◆ m_commrewindamount

std::chrono::seconds CommBreakMap::m_commrewindamount {0s}
private

Definition at line 53 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_commnotifyamount

std::chrono::seconds CommBreakMap::m_commnotifyamount {0s}
private

Definition at line 54 of file commbreakmap.h.

Referenced by AutoCommercialSkip().

◆ m_lastCommSkipDirection

int CommBreakMap::m_lastCommSkipDirection {0}
private

Definition at line 55 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_lastCommSkipTime

time_t CommBreakMap::m_lastCommSkipTime {0}
private

Definition at line 56 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_lastCommSkipStart

uint64_t CommBreakMap::m_lastCommSkipStart {0}
private

Definition at line 57 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and DoSkipCommercials().

◆ m_lastSkipTime

time_t CommBreakMap::m_lastSkipTime {0 }
private

Definition at line 58 of file commbreakmap.h.

Referenced by AutoCommercialSkip(), and ResetLastSkip().

◆ m_hascommbreaktable

bool CommBreakMap::m_hascommbreaktable {false}
private

Definition at line 59 of file commbreakmap.h.

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

◆ m_lastIgnoredManualSkip

QDateTime CommBreakMap::m_lastIgnoredManualSkip
private

Definition at line 60 of file commbreakmap.h.

Referenced by DoSkipCommercials().

◆ m_maxskip

std::chrono::seconds CommBreakMap::m_maxskip {1h}
private

Definition at line 61 of file commbreakmap.h.

Referenced by DoSkipCommercials().

◆ m_maxShortMerge

std::chrono::seconds CommBreakMap::m_maxShortMerge {0s}
private

Definition at line 62 of file commbreakmap.h.

Referenced by 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: