MythTV  master
mythegldmabuf.h
Go to the documentation of this file.
1 #ifndef MYTHEGLDMABUF_H
2 #define MYTHEGLDMABUF_H
3 
4 // MythTV
5 #include "mythframe.h"
6 #include "videoouttypes.h"
7 
8 // Std
9 #include <vector>
10 
11 class MythRenderOpenGL;
13 struct AVDRMFrameDescriptor;
14 
16 {
17  public:
18  explicit MythEGLDMABUF(MythRenderOpenGL *Context);
19  ~MythEGLDMABUF() = default;
20  static bool HaveDMABuf(MythRenderOpenGL *Context);
21  std::vector<MythVideoTextureOpenGL*> CreateTextures(AVDRMFrameDescriptor* Desc,
22  MythRenderOpenGL *Context,
24  bool UseSeparate,
26  static void ClearDMATextures(MythRenderOpenGL *Context,
27  std::vector<MythVideoTextureOpenGL*>& Textures) ;
28 
29  private:
30  std::vector<MythVideoTextureOpenGL*> CreateComposed(AVDRMFrameDescriptor* Desc,
31  MythRenderOpenGL *Context,
33  FrameScanType Scan) const;
34  std::vector<MythVideoTextureOpenGL*> CreateSeparate(AVDRMFrameDescriptor* Desc,
35  MythRenderOpenGL *Context,
36  MythVideoFrame *Frame) const;
37  std::vector<MythVideoTextureOpenGL*> CreateSeparate2(AVDRMFrameDescriptor* Desc,
38  MythRenderOpenGL *Context,
39  MythVideoFrame *Frame) const;
40  bool m_useModifiers { false };
41 };
42 
43 #endif
MythEGLDMABUF::m_useModifiers
bool m_useModifiers
Definition: mythegldmabuf.h:40
MythVideoTextureOpenGL
Definition: mythvideotextureopengl.h:21
Frame
Definition: zmdefines.h:93
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
mythframe.h
MythEGLDMABUF
Definition: mythegldmabuf.h:15
MythEGLDMABUF::HaveDMABuf
static bool HaveDMABuf(MythRenderOpenGL *Context)
Definition: mythegldmabuf.cpp:26
MythEGLDMABUF::CreateTextures
std::vector< MythVideoTextureOpenGL * > CreateTextures(AVDRMFrameDescriptor *Desc, MythRenderOpenGL *Context, MythVideoFrame *Frame, bool UseSeparate, FrameScanType Scan=kScan_Progressive)
Definition: mythegldmabuf.cpp:372
videoouttypes.h
kScan_Progressive
@ kScan_Progressive
Definition: videoouttypes.h:100
MythEGLDMABUF::CreateSeparate
std::vector< MythVideoTextureOpenGL * > CreateSeparate(AVDRMFrameDescriptor *Desc, MythRenderOpenGL *Context, MythVideoFrame *Frame) const
Create multiple textures that represent the planes for the given AVDRMFrameDescriptor.
Definition: mythegldmabuf.cpp:178
MythEGLDMABUF::~MythEGLDMABUF
~MythEGLDMABUF()=default
MythRenderOpenGL
Definition: mythrenderopengl.h:96
MythEGLDMABUF::MythEGLDMABUF
MythEGLDMABUF(MythRenderOpenGL *Context)
Definition: mythegldmabuf.cpp:17
MythEGLDMABUF::ClearDMATextures
static void ClearDMATextures(MythRenderOpenGL *Context, std::vector< MythVideoTextureOpenGL * > &Textures)
Definition: mythegldmabuf.cpp:357
MythEGLDMABUF::CreateComposed
std::vector< MythVideoTextureOpenGL * > CreateComposed(AVDRMFrameDescriptor *Desc, MythRenderOpenGL *Context, MythVideoFrame *Frame, FrameScanType Scan) const
Create a single RGBA32 texture using the provided AVDRMFramDescriptor.
Definition: mythegldmabuf.cpp:61
MythEGLDMABUF::CreateSeparate2
std::vector< MythVideoTextureOpenGL * > CreateSeparate2(AVDRMFrameDescriptor *Desc, MythRenderOpenGL *Context, MythVideoFrame *Frame) const
Create multiple textures that represent the planes for the given AVDRMFrameDescriptor.
Definition: mythegldmabuf.cpp:275
MythVideoFrame
Definition: mythframe.h:88