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 <QMap>
5#include <QWaitCondition>
6#include <QMutex>
7
9
10class HLSReader;
11
13{
14 public:
15 explicit HLSStreamWorker(HLSReader* parent);
16 ~HLSStreamWorker(void) override;
17
18 void Cancel(void);
19 void CancelCurrentDownload(void);
20 void Wakeup(void) { QMutexLocker lock(&m_lock); m_waitCond.wakeAll(); }
21
22 protected:
23 void run() override; // MThread
24
25 private:
26 void Segment(void);
27
28 // Class vars
29 HLSReader *m_parent {nullptr};
31 bool m_cancel {false};
32 bool m_wokenup {false};
33 mutable QMutex m_lock;
35 QWaitCondition m_waitCond;
36};
37
38#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