MythTV  master
mythdecoderthread.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "mythlogging.h"
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
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MThread::RunProlog
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:198
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:211
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
MThread::wait
bool wait(unsigned long time=ULONG_MAX)
Wait for the MThread to exit, with a maximum timeout.
Definition: mthread.cpp:305
MythPlayer::DecoderLoop
virtual void DecoderLoop(bool pause)
Definition: mythplayer.cpp:1084
MythDecoderThread::~MythDecoderThread
~MythDecoderThread() override
Definition: mythdecoderthread.cpp:15