MythTV  master
mythvaapidrminterop.h
Go to the documentation of this file.
1 #ifndef MYTHVAAPIDRMINTEROP_H
2 #define MYTHVAAPIDRMINTEROP_H
3 
4 // MythTV
5 #include "mythegldmabuf.h"
6 #include "mythvaapiinterop.h"
7 
9 struct AVDRMFrameDescriptor;
10 
12 {
13  public:
15  ~MythVAAPIInteropDRM() override;
16  vector<MythVideoTexture*> Acquire(MythRenderOpenGL *Context,
17  MythVideoColourSpace *ColourSpace,
18  MythVideoFrame *Frame, FrameScanType Scan) override;
19  static bool IsSupported(MythRenderOpenGL *Context);
20  void DeleteTextures(void) override;
21 
22  protected:
23  void DestroyDeinterlacer(void) override;
24  void PostInitDeinterlacer(void) override;
25 
26  private:
27  static VideoFrameType VATypeToMythType(uint32_t Fourcc);
28  void CleanupReferenceFrames(void);
29  void RotateReferenceFrames(AVBufferRef *Buffer);
30  vector<MythVideoTexture*> GetReferenceFrames(void);
31 
32  private:
33  QFile m_drmFile { };
34  QVector<AVBufferRef*> m_referenceFrames { };
35 
36  vector<MythVideoTexture*> AcquireVAAPI(VASurfaceID Id, MythRenderOpenGL *Context,
38  vector<MythVideoTexture*> AcquirePrime(VASurfaceID Id, MythRenderOpenGL *Context,
40  void CleanupDRMPRIME(void);
41  bool TestPrimeInterop(void);
42  bool m_usePrime { false };
43  QHash<unsigned long long, AVDRMFrameDescriptor*> m_drmFrames { };
44 };
45 
46 #endif // MYTHVAAPIDRMINTEROP_H
MythVAAPIInteropDRM::CleanupReferenceFrames
void CleanupReferenceFrames(void)
Definition: mythvaapidrminterop.cpp:106
mythvaapiinterop.h
MythVAAPIInteropDRM::VATypeToMythType
static VideoFrameType VATypeToMythType(uint32_t Fourcc)
Definition: mythvaapidrminterop.cpp:344
MythVAAPIInteropDRM::AcquireVAAPI
vector< MythVideoTexture * > AcquireVAAPI(VASurfaceID Id, MythRenderOpenGL *Context, MythVideoFrame *Frame)
Definition: mythvaapidrminterop.cpp:277
MythDRMPRIMEInterop
Definition: mythdrmprimeinterop.h:11
Frame
Definition: zmdefines.h:94
FrameScanType
FrameScanType
Definition: videoouttypes.h:95
Context
QHash< QString, Action * > Context
Definition: action.h:77
MythVAAPIInteropDRM::MythVAAPIInteropDRM
MythVAAPIInteropDRM(MythRenderOpenGL *Context)
Definition: mythvaapidrminterop.cpp:17
MythEGLDMABUF
Definition: mythegldmabuf.h:16
mythegldmabuf.h
MythVAAPIInterop
Definition: mythvaapiinterop.h:37
MythVAAPIInteropDRM::TestPrimeInterop
bool TestPrimeInterop(void)
Definition: mythvaapidrminterop.cpp:448
MythVAAPIInteropDRM::m_drmFile
QFile m_drmFile
Definition: mythvaapidrminterop.h:33
MythVAAPIInteropDRM::m_referenceFrames
QVector< AVBufferRef * > m_referenceFrames
Definition: mythvaapidrminterop.h:34
MythVAAPIInteropDRM::GetReferenceFrames
vector< MythVideoTexture * > GetReferenceFrames(void)
Definition: mythvaapidrminterop.cpp:138
MythVAAPIInteropDRM::AcquirePrime
vector< MythVideoTexture * > AcquirePrime(VASurfaceID Id, MythRenderOpenGL *Context, MythVideoFrame *Frame)
Export the given VideoFrame as a DRM PRIME descriptor.
Definition: mythvaapidrminterop.cpp:400
MythVAAPIInteropDRM::CleanupDRMPRIME
void CleanupDRMPRIME(void)
Definition: mythvaapidrminterop.cpp:433
MythVAAPIInteropDRM::m_drmFrames
QHash< unsigned long long, AVDRMFrameDescriptor * > m_drmFrames
Definition: mythvaapidrminterop.h:43
MythVAAPIInteropDRM::DeleteTextures
void DeleteTextures(void) override
Definition: mythvaapidrminterop.cpp:60
MythVAAPIInteropDRM::Acquire
vector< MythVideoTexture * > Acquire(MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) override
Definition: mythvaapidrminterop.cpp:164
MythVAAPIInteropDRM::~MythVAAPIInteropDRM
~MythVAAPIInteropDRM() override
Definition: mythvaapidrminterop.cpp:49
MythRenderOpenGL
Definition: mythrenderopengl.h:99
Buffer
Definition: MythExternControl.h:37
MythVAAPIInteropDRM::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapidrminterop.cpp:365
MythVAAPIInteropDRM::m_usePrime
bool m_usePrime
Definition: mythvaapidrminterop.h:42
MythVAAPIInteropDRM::RotateReferenceFrames
void RotateReferenceFrames(AVBufferRef *Buffer)
Definition: mythvaapidrminterop.cpp:115
VideoFrameType
VideoFrameType
Definition: mythframe.h:16
MythVideoFrame
Definition: mythframe.h:83
MythVAAPIInteropDRM::PostInitDeinterlacer
void PostInitDeinterlacer(void) override
Definition: mythvaapidrminterop.cpp:98
MythVAAPIInteropDRM::DestroyDeinterlacer
void DestroyDeinterlacer(void) override
Definition: mythvaapidrminterop.cpp:87
MythVideoColourSpace
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
Definition: mythvideocolourspace.h:21
MythVAAPIInteropDRM
Definition: mythvaapidrminterop.h:12