MythTV  master
mythvaapiglxinterop.h
Go to the documentation of this file.
1 #ifndef MYTHVAAPIGLXNTEROP_H
2 #define MYTHVAAPIGLXNTEROP_H
3 
4 // MythTV
5 #include "mythvaapiinterop.h"
6 
8 {
9  Q_OBJECT
10 
11  public:
13  ~MythVAAPIInteropGLX() override;
14 
15  public slots:
16  int SetPictureAttribute(PictureAttribute Attribute, int Value);
17 
18  protected:
20  void InitPictureAttributes(VideoColourSpace *ColourSpace);
21 
22  protected:
23  VADisplayAttribute *m_vaapiPictureAttributes { nullptr };
25  int m_vaapiHueBase { 0 };
28 };
29 
31 {
32  public:
34  ~MythVAAPIInteropGLXCopy() override;
35  vector<MythVideoTexture*> Acquire(MythRenderOpenGL *Context,
36  VideoColourSpace *ColourSpace,
37  VideoFrame *Frame, FrameScanType Scan) override;
38 
39  private:
40  void* m_glxSurface { nullptr };
41 };
42 
43 #include "GL/glx.h"
44 #include "GL/glxext.h"
45 using MYTH_GLXBINDTEXIMAGEEXT = void (*)(Display*, GLXDrawable, int, int*);
46 using MYTH_GLXRELEASETEXIMAGEEXT = void (*)(Display*, GLXDrawable, int);
47 
49 {
50  public:
52  ~MythVAAPIInteropGLXPixmap() override;
53  vector<MythVideoTexture*> Acquire(MythRenderOpenGL *Context,
54  VideoColourSpace *ColourSpace,
55  VideoFrame *Frame, FrameScanType Scan) override;
56  static bool IsSupported(MythRenderOpenGL *Context);
57 
58  private:
59  bool InitPixmaps(void);
60 
61  // Texture from Pixmap
62  Pixmap m_pixmap { 0 };
63  GLXPixmap m_glxPixmap { 0 };
66 };
67 
68 
69 #endif // MYTHVAAPIGLXNTEROP_H
mythvaapiinterop.h
MythVAAPIInteropGLXCopy::MythVAAPIInteropGLXCopy
MythVAAPIInteropGLXCopy(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:215
MythVAAPIInteropGLXPixmap::m_pixmap
Pixmap m_pixmap
Definition: mythvaapiglxinterop.h:62
MYTH_GLXRELEASETEXIMAGEEXT
void(*)(Display *, GLXDrawable, int) MYTH_GLXRELEASETEXIMAGEEXT
Definition: mythvaapiglxinterop.h:46
MYTH_GLXBINDTEXIMAGEEXT
void(*)(Display *, GLXDrawable, int, int *) MYTH_GLXBINDTEXIMAGEEXT
Definition: mythvaapiglxinterop.h:45
Frame
Definition: zmdefines.h:93
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:123
FrameScanType
FrameScanType
Definition: videoouttypes.h:78
Context
QHash< QString, Action * > Context
Definition: action.h:77
slots
unsigned int slots[4]
Definition: element.cpp:38
VideoFrame
Definition: mythframe.h:137
MythVAAPIInteropGLXPixmap::Acquire
vector< MythVideoTexture * > Acquire(MythRenderOpenGL *Context, VideoColourSpace *ColourSpace, VideoFrame *Frame, FrameScanType Scan) override
Definition: mythvaapiglxinterop.cpp:342
MythVAAPIInteropGLXPixmap::m_glxPixmap
GLXPixmap m_glxPixmap
Definition: mythvaapiglxinterop.h:63
MythVAAPIInterop
Definition: mythvaapiinterop.h:36
MythVAAPIInteropGLXPixmap::m_glxReleaseTexImageEXT
MYTH_GLXRELEASETEXIMAGEEXT m_glxReleaseTexImageEXT
Definition: mythvaapiglxinterop.h:65
MythVAAPIInteropGLXCopy
Definition: mythvaapiglxinterop.h:30
MythVAAPIInteropGLX::GetFlagsForFrame
uint GetFlagsForFrame(VideoFrame *Frame, FrameScanType Scan)
Definition: mythvaapiglxinterop.cpp:17
MythVAAPIInteropGLX::m_vaapiPictureAttributeCount
int m_vaapiPictureAttributeCount
Definition: mythvaapiglxinterop.h:24
MythVAAPIInteropGLX::~MythVAAPIInteropGLX
~MythVAAPIInteropGLX() override
Definition: mythvaapiglxinterop.cpp:12
MythVAAPIInteropGLX::m_vaapiColourSpace
uint m_vaapiColourSpace
Definition: mythvaapiglxinterop.h:26
MythVAAPIInteropGLXPixmap::m_glxBindTexImageEXT
MYTH_GLXBINDTEXIMAGEEXT m_glxBindTexImageEXT
Definition: mythvaapiglxinterop.h:64
MythVAAPIInteropGLX::m_vaapiPictureAttributes
VADisplayAttribute * m_vaapiPictureAttributes
Definition: mythvaapiglxinterop.h:23
uint
unsigned int uint
Definition: compat.h:140
MythOpenGLInterop::Type
Type
Definition: mythopenglinterop.h:29
MythVAAPIInteropGLXCopy::Acquire
vector< MythVideoTexture * > Acquire(MythRenderOpenGL *Context, VideoColourSpace *ColourSpace, VideoFrame *Frame, FrameScanType Scan) override
Definition: mythvaapiglxinterop.cpp:246
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:87
MythVAAPIInteropGLXCopy::m_glxSurface
void * m_glxSurface
Definition: mythvaapiglxinterop.h:40
MythVAAPIInteropGLX::MythVAAPIInteropGLX
MythVAAPIInteropGLX(MythRenderOpenGL *Context, Type InteropType)
Definition: mythvaapiglxinterop.cpp:7
MythRenderOpenGL
Definition: mythrenderopengl.h:86
VideoColourSpace
VideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
Definition: videocolourspace.h:17
MythVAAPIInteropGLXPixmap::~MythVAAPIInteropGLXPixmap
~MythVAAPIInteropGLXPixmap() override
Definition: mythvaapiglxinterop.cpp:323
MythDeintType
MythDeintType
Definition: mythframe.h:121
MythVAAPIInteropGLXPixmap
Definition: mythvaapiglxinterop.h:48
MythVAAPIInteropGLXPixmap::InitPixmaps
bool InitPixmaps(void)
Definition: mythvaapiglxinterop.cpp:464
MythVAAPIInteropGLXPixmap::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:480
MythVAAPIInteropGLX::m_vaapiHueBase
int m_vaapiHueBase
Definition: mythvaapiglxinterop.h:25
MythVAAPIInteropGLX::SetPictureAttribute
int SetPictureAttribute(PictureAttribute Attribute, int Value)
Definition: mythvaapiglxinterop.cpp:158
MythVAAPIInteropGLX
Definition: mythvaapiglxinterop.h:7
MythVAAPIInteropGLXPixmap::MythVAAPIInteropGLXPixmap
MythVAAPIInteropGLXPixmap(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:312
MythVAAPIInteropGLX::InitPictureAttributes
void InitPictureAttributes(VideoColourSpace *ColourSpace)
Definition: mythvaapiglxinterop.cpp:89
MythVAAPIInteropGLXCopy::~MythVAAPIInteropGLXCopy
~MythVAAPIInteropGLXCopy() override
Definition: mythvaapiglxinterop.cpp:234
MythVAAPIInteropGLX::m_basicDeinterlacer
MythDeintType m_basicDeinterlacer
Definition: mythvaapiglxinterop.h:27