MythTV
master
|
#include <libmythtv/tvbrowsehelper.h>
Protected Member Functions | |
TVBrowseHelper (TV *Parent) | |
~TVBrowseHelper () override | |
void | BrowseInit (std::chrono::seconds BrowseMaxForward, bool BrowseAllTuners, bool UseChannelGroups, const QString &DBChannelOrdering) |
void | BrowseStop () |
void | BrowseWait () |
bool | BrowseStart (bool SkipBrowse=false) |
Begins channel browsing. More... | |
void | BrowseEnd (bool ChangeChannel) |
Ends channel browsing. More... | |
void | BrowseDispInfo (const BrowseInfo &Browseinfo) |
void | BrowseDispInfo (BrowseDirection Direction) |
void | BrowseChannel (const QString &Channum) |
BrowseInfo | GetBrowsedInfo () const |
uint | GetBrowseChanId (const QString &Channum, uint PrefCardid, uint PrefSourceid) const |
Returns a chanid for the channum, or 0 if none is available. More... | |
![]() | |
int | exec (void) |
Enters the qt event loop. call exit or quit to exit thread. More... | |
Protected Attributes | |
int | m_browseTimerId { 0 } |
![]() | |
MThreadInternal * | m_thread {nullptr} |
QRunnable * | m_runnable {nullptr} |
bool | m_prologExecuted {true} |
bool | m_epilogExecuted {true} |
Private Member Functions | |
void | GetNextProgram (BrowseDirection Direction, InfoMap &Infomap) const |
Fetches information on the desired program from the backend. More... | |
void | GetNextProgramDB (BrowseDirection Direction, InfoMap &Infomap) const |
void | run () override |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More... | |
Private Attributes | |
TV * | m_parent { nullptr } |
ChannelInfoList | m_dbAllChannels |
std::chrono::seconds | m_dbBrowseMaxForward { 0s } |
bool | m_dbBrowseAllTuners { false } |
bool | m_dbUseChannelGroups { false } |
QHash< uint, QString > | m_dbChanidToChannum |
QHash< uint, uint > | m_dbChanidToSourceid |
QMultiMap< QString, uint > | m_dbChannumToChanids |
QMutex | m_browseLock |
QString | m_browseChanNum |
uint | m_browseChanId { 0 } |
QString | m_browseStartTime |
bool | m_browseRun { true } |
QWaitCondition | m_browseWait |
QList< BrowseInfo > | m_browseList |
Friends | |
class | TV |
Additional Inherited Members | |
![]() | |
MThread (const QString &objectName) | |
Standard constructor. More... | |
MThread (const QString &objectName, QRunnable *runnable) | |
Use this constructor if you want the default run() method to run the QRunnable's run() method instead of entering the Qt event loop. More... | |
virtual | ~MThread () |
MThread (const MThread &)=delete | |
MThread & | operator= (const MThread &)=delete |
void | RunProlog (void) |
Sets up a thread, call this if you reimplement run(). More... | |
void | RunEpilog (void) |
Cleans up a thread's resources, call this if you reimplement run(). More... | |
QThread * | qthread (void) |
Returns the thread, this will always return the same pointer no matter how often you restart the thread. More... | |
void | setObjectName (const QString &name) |
QString | objectName (void) const |
void | setPriority (QThread::Priority priority) |
QThread::Priority | priority (void) const |
bool | isFinished (void) const |
bool | isRunning (void) const |
void | setStackSize (uint stackSize) |
uint | stackSize (void) const |
void | exit (int retcode=0) |
Use this to exit from the thread if you are using a Qt event loop. More... | |
void | start (QThread::Priority p=QThread::InheritPriority) |
Tell MThread to start running the thread in the near future. More... | |
void | terminate (void) |
Kill a thread unsafely. More... | |
void | quit (void) |
calls exit(0) More... | |
bool | wait (std::chrono::milliseconds time=std::chrono::milliseconds::max()) |
Wait for the MThread to exit, with a maximum timeout. More... | |
![]() | |
static void | ThreadSetup (const QString &name) |
This is to be called on startup in those few threads that haven't been ported to MThread. More... | |
static void | ThreadCleanup (void) |
This is to be called on exit in those few threads that haven't been ported to MThread. More... | |
static void | Cleanup (void) |
This will print out all the running threads, call exit(1) on each and then wait up to 5 seconds total for all the threads to exit. More... | |
static void | GetAllThreadNames (QStringList &list) |
static void | GetAllRunningThreadNames (QStringList &list) |
![]() | |
static void | setTerminationEnabled (bool enabled=true) |
static void | usleep (std::chrono::microseconds time) |
template<typename R , typename P > | |
static std::enable_if_t< std::chrono::treat_as_floating_point< R >::value, void > | usleep (std::chrono::duration< R, P > time) |
Definition at line 45 of file tvbrowsehelper.h.
|
explicitprotected |
Definition at line 28 of file tvbrowsehelper.cpp.
|
overrideprotected |
Definition at line 34 of file tvbrowsehelper.cpp.
|
protected |
Definition at line 40 of file tvbrowsehelper.cpp.
Referenced by TV::InitFromDB().
|
protected |
Definition at line 60 of file tvbrowsehelper.cpp.
Referenced by TV::~TV(), and ~TVBrowseHelper().
|
protected |
Definition at line 68 of file tvbrowsehelper.cpp.
Referenced by TV::~TV(), and ~TVBrowseHelper().
Begins channel browsing.
Definition at line 75 of file tvbrowsehelper.cpp.
Referenced by BrowseDispInfo(), TV::OSDDialogEvent(), and TV::ToggleHandleAction().
|
protected |
Ends channel browsing.
Changing the channel if change_channel is true.
change_channel | iff true we call ChangeChannel() |
Definition at line 115 of file tvbrowsehelper.cpp.
Referenced by TV::BrowseHandleAction(), TV::ClearOSD(), TV::ShowOSDAskAllow(), and TV::timerEvent().
|
protected |
Definition at line 140 of file tvbrowsehelper.cpp.
Referenced by TV::ActivePostQHandleAction(), BrowseChannel(), BrowseDispInfo(), TV::BrowseHandleAction(), and BrowseStart().
|
protected |
Definition at line 158 of file tvbrowsehelper.cpp.
|
protected |
Definition at line 165 of file tvbrowsehelper.cpp.
Referenced by TV::CommitQueuedInput().
|
protected |
Definition at line 195 of file tvbrowsehelper.cpp.
Referenced by TV::CommitQueuedInput(), and TV::QuickRecord().
|
protected |
Returns a chanid for the channum, or 0 if none is available.
This will prefer a given sourceid first, and then a given card id, but if one or the other can not be satisfied but m_dbBrowseAllTuners is set then it will look to see if the chanid is available on any tuner.
Definition at line 212 of file tvbrowsehelper.cpp.
Referenced by TV::CommitQueuedInput().
|
private |
Fetches information on the desired program from the backend.
direction | BrowseDirection to get information on. |
infoMap | InfoMap to fill in with returned data |
Definition at line 248 of file tvbrowsehelper.cpp.
Referenced by run().
|
private |
Definition at line 320 of file tvbrowsehelper.cpp.
Referenced by run().
|
overrideprivatevirtual |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Reimplemented from MThread.
Definition at line 396 of file tvbrowsehelper.cpp.
|
friend |
Definition at line 47 of file tvbrowsehelper.h.
Referenced by TV::AcquireRelease().
|
protected |
Definition at line 65 of file tvbrowsehelper.h.
Referenced by BrowseDispInfo(), BrowseEnd(), BrowseStart(), and TV::timerEvent().
|
private |
Definition at line 73 of file tvbrowsehelper.h.
Referenced by BrowseChannel(), BrowseDispInfo(), BrowseEnd(), BrowseStart(), GetNextProgram(), and run().
|
private |
Definition at line 74 of file tvbrowsehelper.h.
Referenced by BrowseInit(), GetBrowseChanId(), and GetNextProgramDB().
|
private |
Definition at line 75 of file tvbrowsehelper.h.
Referenced by BrowseInit(), and run().
Definition at line 76 of file tvbrowsehelper.h.
Referenced by BrowseChannel(), BrowseInit(), GetBrowseChanId(), and run().
Definition at line 77 of file tvbrowsehelper.h.
Referenced by BrowseInit(), and run().
|
private |
Definition at line 78 of file tvbrowsehelper.h.
Referenced by BrowseInit(), and GetNextProgramDB().
Definition at line 79 of file tvbrowsehelper.h.
Referenced by BrowseInit(), and run().
|
private |
Definition at line 80 of file tvbrowsehelper.h.
Referenced by BrowseInit(), and run().
|
mutableprivate |
Definition at line 82 of file tvbrowsehelper.h.
Referenced by BrowseDispInfo(), BrowseEnd(), BrowseStart(), BrowseStop(), GetBrowsedInfo(), and run().
|
private |
Definition at line 83 of file tvbrowsehelper.h.
Referenced by BrowseEnd(), BrowseStart(), GetBrowsedInfo(), and run().
|
private |
Definition at line 84 of file tvbrowsehelper.h.
Referenced by BrowseStart(), GetBrowsedInfo(), and run().
|
private |
Definition at line 85 of file tvbrowsehelper.h.
Referenced by BrowseStart(), GetBrowsedInfo(), and run().
Definition at line 86 of file tvbrowsehelper.h.
Referenced by BrowseStop(), and run().
|
private |
Definition at line 87 of file tvbrowsehelper.h.
Referenced by BrowseDispInfo(), BrowseEnd(), BrowseStop(), and run().
|
private |
Definition at line 88 of file tvbrowsehelper.h.
Referenced by BrowseDispInfo(), BrowseEnd(), BrowseStop(), and run().