MythTV  master
osdchromakey.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 #ifndef _OSD_CHROMAKEY_H_
4 #define _OSD_CHROMAKEY_H_
5 
6 #include <QImage>
7 #include "mythpainter_qimage.h"
8 #include "mythcontext.h"
9 #include "videoout_xv.h"
10 
12 {
13  public:
14  explicit ChromaKeyOSD(VideoOutputXv *vo) :
15  current_size(QSize()), current_rect(QRect()),
16  videoOutput(vo), img(nullptr), image(nullptr), painter(nullptr), visible(false)
17  {
18  memset(&shm_infos, 0, sizeof(XShmSegmentInfo));
19  }
20  ~ChromaKeyOSD(void);
21 
22  bool ProcessOSD(OSD *osd);
23  XImage *GetImage() { return visible ? img : nullptr; }
25 
26  private:
27  bool Init(QSize new_size);
28  void TearDown(void);
29  bool CreateShmImage(QSize area);
30  void DestroyShmImage(void);
31  void BlendOrCopy(uint32_t colour, const QRect &rect);
32 
33  QSize current_size;
34  QRect current_rect;
36  XImage *img;
37  XShmSegmentInfo shm_infos;
38  QImage *image;
40  bool visible;
41 };
42 
43 #endif // _OSD_CHROMAKEY_H_
XImage * img
Definition: osdchromakey.h:36
bool ProcessOSD(OSD *osd)
void DestroyShmImage(void)
void TearDown(void)
bool CreateShmImage(QSize area)
XShmSegmentInfo shm_infos
Definition: osdchromakey.h:37
QImage * image
Definition: osdchromakey.h:38
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
QRect current_rect
Definition: osdchromakey.h:34
ChromaKeyOSD(VideoOutputXv *vo)
Definition: osdchromakey.h:14
VideoOutputXv * videoOutput
Definition: osdchromakey.h:35
Supports common video output methods used with X11 Servers.
Definition: videoout_xv.h:28
bool Init(QSize new_size)
MythQImagePainter * painter
Definition: osdchromakey.h:39
Definition: osd.h:132
~ChromaKeyOSD(void)
MythPainter * GetPainter(void)
Definition: osdchromakey.h:24
QSize current_size
Definition: osdchromakey.h:33
XImage * GetImage()
Definition: osdchromakey.h:23
void BlendOrCopy(uint32_t colour, const QRect &rect)