MythTV  master
HLSPlaylistWorker.h
Go to the documentation of this file.
1 #ifndef _HLS_Playlist_Worker_h
2 #define _HLS_Playlist_Worker_h
3 
4 #include <QWaitCondition>
5 #include <QMutex>
6 
7 #include "mthread.h"
8 
9 class HLSReader;
10 
11 class HLSPlaylistWorker : public MThread
12 {
13  public:
14  explicit HLSPlaylistWorker(HLSReader* parent);
15  ~HLSPlaylistWorker(void) override;
16 
17  void Cancel(void);
18 
19  protected:
20  void run() override; // MThread
21 
22  private:
23  // Class vars
24  HLSReader *m_parent {nullptr};
25  bool m_cancel {false};
26  bool m_wokenup {false};
27 
28  QWaitCondition m_waitcond;
29  QMutex m_lock;
30 };
31 
32 #endif
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:46
QWaitCondition m_waitcond
~HLSPlaylistWorker(void) override
HLSPlaylistWorker(HLSReader *parent)