MythTV  master
videodecodebuffer.h
Go to the documentation of this file.
1 #ifndef VIDEODECODEBUFFER_H
2 #define VIDEODECODEBUFFER_H
3 
4 #include <QList>
5 #include <QWaitCondition>
6 #include <QMutex>
7 #include <QRunnable>
8 
9 #include "videooutbase.h"
10 
11 class MythPlayer;
12 class VideoOutput;
13 
14 class VideoDecodeBuffer : public QRunnable
15 {
16  public:
18  bool cutlist, int size = 5)
19  : m_player(player), m_videoOutput(videoout),
20  m_honorCutlist(cutlist), m_maxFrames(size) {}
21  virtual ~VideoDecodeBuffer();
22 
23  void stop(void);
24  void run() override; // QRunnable
25  VideoFrame *GetFrame(int &didFF, bool &isKey);
26 
27  private:
28  typedef struct decodedFrameInfo
29  {
31  int didFF;
32  bool isKey;
34 
35  MythPlayer * const m_player {nullptr};
36  VideoOutput * 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 /* vim: set expandtab tabstop=4 shiftwidth=4: */
49 
virtual ~VideoDecodeBuffer()
QList< DecodedFrameInfo > m_frameList
bool volatile m_runThread
struct VideoDecodeBuffer::decodedFrameInfo DecodedFrameInfo
This class serves as the base class for all video output methods.
Definition: videooutbase.h:46
QWaitCondition m_frameWaitCond
bool volatile m_isRunning
VideoDecodeBuffer(MythPlayer *player, VideoOutput *videoout, bool cutlist, int size=5)
VideoOutput *const m_videoOutput
MythPlayer *const m_player
bool const m_honorCutlist
void run() override
VideoFrame * GetFrame(int &didFF, bool &isKey)