From: Haihao Xiang Date: Fri, 2 Jul 2021 08:22:04 +0000 (+0800) Subject: eglimage: fix Y412_LE DMABuf import support X-Git-Tag: 1.22.0~852 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f5399b15660cb096c20f1900dee097649438c60;p=platform%2Fupstream%2Fgstreamer.git eglimage: fix Y412_LE DMABuf import support This fixed the error below: GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! msdkvpp ! "video/x-raw(memory:DMABuf),format=Y412_LE" ! glimagesink 0:00:00.063737691 576978 0x557c11266920 ERROR gleglimage gsteglimage.c:577:_drm_rgba_fourcc_from_info: Unsupported format for DMABuf. Part-of: --- diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c index ca75cbb..cee66ac 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/egl/gsteglimage.c @@ -99,6 +99,10 @@ #define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') #endif +#ifndef DRM_FORMAT_ABGR16161616 +#define DRM_FORMAT_ABGR16161616 fourcc_code('A', 'B', '4', '8') +#endif + #ifndef EGL_LINUX_DMA_BUF_EXT #define EGL_LINUX_DMA_BUF_EXT 0x3270 #endif @@ -577,6 +581,10 @@ _drm_rgba_fourcc_from_info (const GstVideoInfo * info, int plane, *out_format = GST_GL_RGB10_A2; return rgb10a2_fourcc; + case GST_VIDEO_FORMAT_Y412_LE: + *out_format = GST_GL_RGBA16; + return DRM_FORMAT_ABGR16161616; + default: GST_ERROR ("Unsupported format for DMABuf."); return -1;