Add support for HDR with VAAPI using DRM frontend renderer

This commit is contained in:
Cameron Gutman
2022-01-29 17:14:18 -06:00
parent 9755e31fa2
commit cf089fdfe9
7 changed files with 214 additions and 40 deletions
@@ -7,6 +7,10 @@
extern "C" {
#include <libavcodec/avcodec.h>
#ifdef HAVE_DRM
#include <libavutil/hwcontext_drm.h>
#endif
}
#ifdef HAVE_EGL
@@ -184,4 +188,17 @@ public:
// Free the ressources allocated during the last `exportEGLImages` call
virtual void freeEGLImages(EGLDisplay, EGLImage[EGL_MAX_PLANES]) {}
#endif
#if HAVE_DRM
// By default we can't do DRM PRIME export
virtual bool canExportDrmPrime() {
return false;
}
virtual bool mapDrmPrimeFrame(AVFrame*, AVDRMFrameDescriptor*) {
return false;
}
virtual void unmapDrmPrimeFrame(AVDRMFrameDescriptor*) {}
#endif
};