Commit 46256818 authored by Jun Zhao's avatar Jun Zhao Committed by Mark Thompson

kmsgrab: Fix build failure with old libdrm

DRM_FORMAT_R8 was added in libdrm 2.4.68.
DRM_FORMAT_R16 was added in libdrm 2.4.82.
Signed-off-by: 's avatarJun Zhao <jun.zhao@intel.com>
Signed-off-by: 's avatarMark Thompson <sw@jkqxz.net>
parent 133002e8
......@@ -202,8 +202,12 @@ static const struct {
enum AVPixelFormat pixfmt;
uint32_t drm_format;
} kmsgrab_formats[] = {
#ifdef DRM_FORMAT_R8
{ AV_PIX_FMT_GRAY8, DRM_FORMAT_R8 },
#endif
#ifdef DRM_FORMAT_R16
{ AV_PIX_FMT_GRAY16LE, DRM_FORMAT_R16 },
#endif
{ AV_PIX_FMT_RGB24, DRM_FORMAT_RGB888 },
{ AV_PIX_FMT_BGR24, DRM_FORMAT_BGR888 },
{ AV_PIX_FMT_0RGB, DRM_FORMAT_XRGB8888 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment