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 }
MythDecoderThread::MythDecoderThread
MythDecoderThread(MythPlayer *Player, bool StartPaused)
Definition: mythdecoderthread.cpp:8
MThread::wait
bool wait(std::chrono::milliseconds time=std::chrono::milliseconds::max())
Wait for the MThread to exit, with a maximum timeout.
Definition: mthread.cpp:300
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MThread::RunProlog
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:196
mythplayer.h
MythPlayer
Definition: mythplayer.h:83
mythdecoderthread.h
mythlogging.h
MythDecoderThread::run
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition: mythdecoderthread.cpp:20
MThread::RunEpilog
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:209
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:48
LOC
#define LOC
Definition: mythdecoderthread.cpp:6
MythDecoderThread::m_player
MythPlayer * m_player
Definition: mythdecoderthread.h:20
Player
Definition: zmliveplayer.h:34
MythDecoderThread::m_startPaused
bool m_startPaused
Definition: mythdecoderthread.h:21
MythPlayer::DecoderLoop
virtual void DecoderLoop(bool pause)
Definition: mythplayer.cpp:1098
MythDecoderThread::~MythDecoderThread
~MythDecoderThread() override
Definition: mythdecoderthread.cpp:15