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

Acts as glue between ChannelBase, EITSource and EITHelper. More...

#include <eitscanner.h>

Inheritance diagram for EITScanner:
Inheritance graph
[legend]
Collaboration diagram for EITScanner:
Collaboration graph
[legend]

Public Member Functions

 EITScanner (uint cardnum)
 
 ~EITScanner () override
 
void StartEITEventProcessing (ChannelBase *channel, EITSource *eitSource)
 Start inserting Event Information Tables from the multiplex we happen to be tuned to into the database. More...
 
void StopEITEventProcessing (void)
 Stops inserting Event Information Tables into DB. More...
 
void StartActiveScan (TVRec *rec, std::chrono::seconds max_seconds_per_multiplex)
 Start active EIT scan. More...
 
void StopActiveScan (void)
 Stop active EIT scan. More...
 

Protected Member Functions

void run (void) override
 This runs the event loop for EITScanner until 'm_exitThread' is true. More...
 

Private Member Functions

void TeardownAll (void)
 Stop active scan, delete thread and delete eithelper. More...
 
void RescheduleRecordings (void)
 Tells scheduler about programming changes. More...
 

Private Attributes

QMutex m_lock
 
ChannelBasem_channel {nullptr}
 
EITSourcem_eitSource {nullptr}
 
EITHelperm_eitHelper {nullptr}
 
MThreadm_eventThread {nullptr}
 
volatile bool m_exitThread {false}
 
QWaitCondition m_exitThreadCond
 
TVRecm_rec {nullptr}
 
volatile bool m_activeScan {false}
 
volatile bool m_activeScanStopped {true}
 
QWaitCondition m_activeScanCond
 
QDateTime m_activeScanNextTrig
 
std::chrono::seconds m_activeScanTrigTime {0s}
 
QStringList m_activeScanChannels
 
QStringList::iterator m_activeScanNextChan
 
uint m_cardnum {0}
 
uint m_sourceid {0}
 
QString m_sourceName
 
uint m_eitCount {0}
 
uint m_mplexid {0}
 

Detailed Description

Acts as glue between ChannelBase, EITSource and EITHelper.

This is the class where the "EIT Crawl" is implemented.

Definition at line 28 of file eitscanner.h.

Constructor & Destructor Documentation

◆ EITScanner()

EITScanner::EITScanner ( uint  cardnum)
explicit

Definition at line 35 of file eitscanner.cpp.

◆ ~EITScanner()

EITScanner::~EITScanner ( )
inlineoverride

Definition at line 32 of file eitscanner.h.

Member Function Documentation

◆ StartEITEventProcessing()

void EITScanner::StartEITEventProcessing ( ChannelBase channel,
EITSource eitSource 
)

Start inserting Event Information Tables from the multiplex we happen to be tuned to into the database.

Definition at line 188 of file eitscanner.cpp.

Referenced by TVRec::TuningSignalCheck().

◆ StopEITEventProcessing()

void EITScanner::StopEITEventProcessing ( void  )

Stops inserting Event Information Tables into DB.

Definition at line 221 of file eitscanner.cpp.

Referenced by StopActiveScan(), and TVRec::TuningShutdowns().

◆ StartActiveScan()

void EITScanner::StartActiveScan ( TVRec rec,
std::chrono::seconds  max_seconds_per_multiplex 
)

Start active EIT scan.

Definition at line 253 of file eitscanner.cpp.

Referenced by TVRec::run().

◆ StopActiveScan()

void EITScanner::StopActiveScan ( void  )

Stop active EIT scan.

Definition at line 333 of file eitscanner.cpp.

Referenced by TVRec::EnableActiveScan(), TVRec::HandleStateChange(), TVRec::run(), TeardownAll(), and TVRec::TuningShutdowns().

◆ run()

void EITScanner::run ( void  )
overrideprotected

This runs the event loop for EITScanner until 'm_exitThread' is true.

Definition at line 79 of file eitscanner.cpp.

◆ TeardownAll()

void EITScanner::TeardownAll ( void  )
private

Stop active scan, delete thread and delete eithelper.

Definition at line 55 of file eitscanner.cpp.

Referenced by ~EITScanner().

◆ RescheduleRecordings()

void EITScanner::RescheduleRecordings ( void  )
private

Tells scheduler about programming changes.

Definition at line 179 of file eitscanner.cpp.

Referenced by run(), and StopEITEventProcessing().

Member Data Documentation

◆ m_lock

QMutex EITScanner::m_lock
private

◆ m_channel

ChannelBase* EITScanner::m_channel {nullptr}
private

Definition at line 48 of file eitscanner.h.

Referenced by StartEITEventProcessing(), and StopEITEventProcessing().

◆ m_eitSource

EITSource* EITScanner::m_eitSource {nullptr}
private

Definition at line 49 of file eitscanner.h.

Referenced by StartEITEventProcessing(), and StopEITEventProcessing().

◆ m_eitHelper

EITHelper* EITScanner::m_eitHelper {nullptr}
private

◆ m_eventThread

MThread* EITScanner::m_eventThread {nullptr}
private

Definition at line 52 of file eitscanner.h.

Referenced by EITScanner(), and TeardownAll().

◆ m_exitThread

volatile bool EITScanner::m_exitThread {false}
private

Definition at line 53 of file eitscanner.h.

Referenced by run(), and TeardownAll().

◆ m_exitThreadCond

QWaitCondition EITScanner::m_exitThreadCond
private

Definition at line 54 of file eitscanner.h.

Referenced by run(), StopActiveScan(), and TeardownAll().

◆ m_rec

TVRec* EITScanner::m_rec {nullptr}
private

Definition at line 56 of file eitscanner.h.

Referenced by run(), StartActiveScan(), and StopActiveScan().

◆ m_activeScan

volatile bool EITScanner::m_activeScan {false}
private

Definition at line 57 of file eitscanner.h.

Referenced by run(), StartActiveScan(), StartEITEventProcessing(), and StopActiveScan().

◆ m_activeScanStopped

volatile bool EITScanner::m_activeScanStopped {true}
private

Definition at line 58 of file eitscanner.h.

Referenced by run(), StartActiveScan(), and StopActiveScan().

◆ m_activeScanCond

QWaitCondition EITScanner::m_activeScanCond
private

Definition at line 59 of file eitscanner.h.

Referenced by run(), and StopActiveScan().

◆ m_activeScanNextTrig

QDateTime EITScanner::m_activeScanNextTrig
private

Definition at line 60 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

◆ m_activeScanTrigTime

std::chrono::seconds EITScanner::m_activeScanTrigTime {0s}
private

Definition at line 61 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

◆ m_activeScanChannels

QStringList EITScanner::m_activeScanChannels
private

Definition at line 62 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

◆ m_activeScanNextChan

QStringList::iterator EITScanner::m_activeScanNextChan
private

Definition at line 63 of file eitscanner.h.

Referenced by run(), and StartActiveScan().

◆ m_cardnum

uint EITScanner::m_cardnum {0}
private

Definition at line 65 of file eitscanner.h.

Referenced by EITScanner().

◆ m_sourceid

uint EITScanner::m_sourceid {0}
private

◆ m_sourceName

QString EITScanner::m_sourceName
private

◆ m_eitCount

uint EITScanner::m_eitCount {0}
private

Definition at line 68 of file eitscanner.h.

Referenced by run(), and StopEITEventProcessing().

◆ m_mplexid

uint EITScanner::m_mplexid {0}
private

Definition at line 69 of file eitscanner.h.

Referenced by run(), and StartEITEventProcessing().


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