MythTV  master
videodecodebuffer.h
Go to the documentation of this file.
1 #ifndef VIDEODECODEBUFFER_H
2 #define VIDEODECODEBUFFER_H
3 
4 // Qt
5 #include <QList>
6 #include <QWaitCondition>
7 #include <QMutex>
8 #include <QRunnable>
9 
10 // MythTV
11 #include "libmythtv/mythvideoout.h"
12 
14 class MythVideoOutput;
15 
16 class VideoDecodeBuffer : public QRunnable
17 {
18  public:
20  bool Cutlist, int Size = 5);
21  ~VideoDecodeBuffer() override;
22 
23  void stop ();
24  void run () override;
25  MythVideoFrame *GetFrame(int &DidFF, bool &Key);
26 
27  private:
29  {
31  int didFF;
32  bool isKey;
33  };
34 
35  MythTranscodePlayer* const m_player { nullptr };
36  MythVideoOutput* const m_videoOutput { nullptr };
37  bool const m_honorCutlist;
38  int const m_maxFrames;
39  bool volatile m_runThread { true };
40  bool volatile m_isRunning { false };
41  QMutex mutable m_queueLock; // Guards the following...
42  bool m_eof { false };
43  QList<DecodedFrameInfo> m_frameList;
44  QWaitCondition m_frameWaitCond;
45 };
46 
47 #endif
48 
VideoDecodeBuffer::GetFrame
MythVideoFrame * GetFrame(int &DidFF, bool &Key)
Definition: videodecodebuffer.cpp:73
MythVideoOutput
Definition: mythvideoout.h:35
mythvideoout.h
VideoDecodeBuffer::m_runThread
bool volatile m_runThread
Definition: videodecodebuffer.h:39
VideoDecodeBuffer::stop
void stop()
Definition: videodecodebuffer.cpp:24
VideoDecodeBuffer::m_videoOutput
MythVideoOutput *const m_videoOutput
Definition: videodecodebuffer.h:36
VideoDecodeBuffer::DecodedFrameInfo::didFF
int didFF
Definition: videodecodebuffer.h:31
VideoDecodeBuffer::~VideoDecodeBuffer
~VideoDecodeBuffer() override
Definition: videodecodebuffer.cpp:16
VideoDecodeBuffer::m_frameList
QList< DecodedFrameInfo > m_frameList
Definition: videodecodebuffer.h:43
VideoDecodeBuffer::m_player
MythTranscodePlayer *const m_player
Definition: videodecodebuffer.h:35
VideoDecodeBuffer::m_queueLock
QMutex m_queueLock
Definition: videodecodebuffer.h:41
VideoDecodeBuffer::m_isRunning
bool volatile m_isRunning
Definition: videodecodebuffer.h:40
VideoDecodeBuffer::DecodedFrameInfo
Definition: videodecodebuffer.h:28
VideoDecodeBuffer::m_honorCutlist
const bool m_honorCutlist
Definition: videodecodebuffer.h:37
VideoDecodeBuffer::DecodedFrameInfo::frame
MythVideoFrame * frame
Definition: videodecodebuffer.h:30
VideoDecodeBuffer::m_frameWaitCond
QWaitCondition m_frameWaitCond
Definition: videodecodebuffer.h:44
VideoDecodeBuffer::DecodedFrameInfo::isKey
bool isKey
Definition: videodecodebuffer.h:32
VideoDecodeBuffer
Definition: videodecodebuffer.h:16
VideoDecodeBuffer::m_maxFrames
const int m_maxFrames
Definition: videodecodebuffer.h:38
VideoDecodeBuffer::VideoDecodeBuffer
VideoDecodeBuffer(MythTranscodePlayer *Player, MythVideoOutput *Videoout, bool Cutlist, int Size=5)
Definition: videodecodebuffer.cpp:9
Player
Definition: zmliveplayer.h:34
MythVideoFrame
Definition: mythframe.h:87
VideoDecodeBuffer::run
void run() override
Definition: videodecodebuffer.cpp:32
VideoDecodeBuffer::m_eof
bool m_eof
Definition: videodecodebuffer.h:42
MythTranscodePlayer
Definition: mythtranscodeplayer.h:7