MythTV master
mythdecoderthread.cpp
Go to the documentation of this file.
1// MythTV
3#include "mythplayer.h"
4#include "mythdecoderthread.h"
5
6#define LOC QString("DecThread: ")
7
9 : MThread("Decoder"),
10 m_player(Player),
11 m_startPaused(StartPaused)
12{
13}
14
16{
17 wait();
18}
19
21{
22 RunProlog();
23 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Decoder thread starting.");
24 if (m_player)
26 LOG(VB_PLAYBACK, LOG_INFO, LOC + "Decoder thread exiting.");
27 RunEpilog();
28}
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:196
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:209
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
Definition: mthread.cpp:300
~MythDecoderThread() override
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
MythDecoderThread(MythPlayer *Player, bool StartPaused)
MythPlayer * m_player
virtual void DecoderLoop(bool pause)
#define LOC
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39