Go to the documentation of this file.
4 #define LOC QString("%1 worker: ").arg(m_parent->StreamURL().isEmpty() ? "Stream" : m_parent->StreamURL())
10 LOG(VB_RECORD, LOG_DEBUG,
LOC +
"ctor");
15 LOG(VB_RECORD, LOG_DEBUG,
LOC +
"dtor");
20 LOG(VB_RECORD, LOG_INFO,
LOC +
"Cancel -- begin");
25 LOG(VB_RECORD, LOG_INFO,
LOC +
"Cancel -- end");
37 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- begin");
44 std::chrono::milliseconds delay = 0ms;
50 LOG(VB_GENERAL, LOG_CRIT,
LOC +
"Fatal error detected");
55 LOG(VB_RECORD, LOG_WARNING,
LOC +
56 QString(
"download failed, retry #%1").arg(++retries));
73 delay = 500ms * retries * retries;
87 LOG(VB_RECORD, LOG_WARNING,
LOC +
"waiting to retry");
89 LOG(VB_RECORD, LOG_DEBUG,
LOC +
"waiting for work");
100 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- end");
~HLSStreamWorker(void) override
bool FatalError(void) const
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
HLSStreamWorker(HLSReader *parent)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
QWaitCondition m_waitCond
MythSingleDownload * m_downloader
void CancelCurrentDownload(void)
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
bool LoadSegments(MythSingleDownload &downloader)
void EnableDebugging(void)
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
This is a wrapper around QThread that does several additional things.