8#define LOC QString("%1 worker: ").arg(m_parent->StreamURL().isEmpty() ? "Stream" : m_parent->StreamURL())
14 LOG(VB_RECORD, LOG_DEBUG,
LOC +
"ctor");
19 LOG(VB_RECORD, LOG_DEBUG,
LOC +
"dtor");
24 LOG(VB_RECORD, LOG_INFO,
LOC +
"Cancel -- begin");
29 LOG(VB_RECORD, LOG_INFO,
LOC +
"Cancel -- end");
41 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- begin");
48 std::chrono::milliseconds delay = 0ms;
54 LOG(VB_GENERAL, LOG_CRIT,
LOC +
"Fatal error detected");
59 LOG(VB_RECORD, LOG_WARNING,
LOC +
60 QString(
"download failed, retry #%1").arg(++retries));
77 delay = 500ms * retries * retries;
91 LOG(VB_RECORD, LOG_WARNING,
LOC +
"waiting to retry");
93 LOG(VB_RECORD, LOG_DEBUG,
LOC +
"waiting for work");
104 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- end");
void EnableDebugging(void)
bool LoadSegments(MythSingleDownload &downloader)
bool FatalError(void) const
~HLSStreamWorker(void) override
void CancelCurrentDownload(void)
HLSStreamWorker(HLSReader *parent)
MythSingleDownload * m_downloader
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
QWaitCondition m_waitCond
This is a wrapper around QThread that does several additional things.
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)