MythTV
master
mythtv
libs
libmythtv
recorders
HLS
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
8
#include "
libmythbase/mthread.h
"
9
10
class
HLSReader
;
11
12
class
HLSStreamWorker
:
public
MThread
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
};
30
MythSingleDownload
*
m_downloader
{
nullptr
};
31
bool
m_cancel
{
false
};
32
bool
m_wokenup
{
false
};
33
mutable
QMutex
m_lock
;
34
QMutex
m_downloaderLock
;
35
QWaitCondition
m_waitCond
;
36
};
37
38
#endif // HLS_SEGMENT_WORKER_H
HLSStreamWorker::~HLSStreamWorker
~HLSStreamWorker(void) override
Definition:
HLSStreamWorker.cpp:13
HLSStreamWorker::m_cancel
bool m_cancel
Definition:
HLSStreamWorker.h:31
HLSStreamWorker::Cancel
void Cancel(void)
Definition:
HLSStreamWorker.cpp:18
HLSStreamWorker::HLSStreamWorker
HLSStreamWorker(HLSReader *parent)
Definition:
HLSStreamWorker.cpp:6
HLSStreamWorker::m_waitCond
QWaitCondition m_waitCond
Definition:
HLSStreamWorker.h:35
HLSStreamWorker::m_downloader
MythSingleDownload * m_downloader
Definition:
HLSStreamWorker.h:30
HLSStreamWorker::CancelCurrentDownload
void CancelCurrentDownload(void)
Definition:
HLSStreamWorker.cpp:28
HLSStreamWorker::m_lock
QMutex m_lock
Definition:
HLSStreamWorker.h:33
HLSStreamWorker::run
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition:
HLSStreamWorker.cpp:35
HLSStreamWorker
Definition:
HLSStreamWorker.h:12
HLSReader
Definition:
HLSReader.h:34
MythSingleDownload
Definition:
mythsingledownload.h:25
HLSStreamWorker::m_wokenup
bool m_wokenup
Definition:
HLSStreamWorker.h:32
HLSStreamWorker::m_downloaderLock
QMutex m_downloaderLock
Definition:
HLSStreamWorker.h:34
MThread
This is a wrapper around QThread that does several additional things.
Definition:
mthread.h:48
mthread.h
HLSStreamWorker::Segment
void Segment(void)
HLSStreamWorker::m_parent
HLSReader * m_parent
Definition:
HLSStreamWorker.h:29
HLSStreamWorker::Wakeup
void Wakeup(void)
Definition:
HLSStreamWorker.h:20
Generated on Tue Jan 7 2025 03:18:33 for MythTV by
1.8.17