MythTV master
HLSStreamWorker.h
Go to the documentation of this file.
1#ifndef HLS_SEGMENT_WORKER_H
2#define HLS_SEGMENT_WORKER_H
3
4#include <QChar> // Fix Qt6 GCC SFINAE warning
5#include <QWaitCondition>
6#include <QMutex>
7
9
10class HLSReader;
12
14{
15 public:
16 explicit HLSStreamWorker(HLSReader* parent);
17 ~HLSStreamWorker(void) override;
18
19 void Cancel(void);
20 void CancelCurrentDownload(void);
21 void Wakeup(void) { QMutexLocker lock(&m_lock); m_waitCond.wakeAll(); }
22
23 protected:
24 void run() override; // MThread
25
26 private:
27 void Segment(void);
28
29 // Class vars
30 HLSReader *m_parent {nullptr};
32 bool m_cancel {false};
33 bool m_wokenup {false};
34 mutable QMutex m_lock;
36 QWaitCondition m_waitCond;
37};
38
39#endif // HLS_SEGMENT_WORKER_H
~HLSStreamWorker(void) override
void CancelCurrentDownload(void)
void Wakeup(void)
void Segment(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
HLSReader * m_parent
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49