eglimage: add Y212_LE / Y212_BE DMABuf import support

This fixed the error below:

GST_GL_PLATFORM=egl gst-launch-1.0 videotestsrc ! msdkvpp \
! "video/x-raw(memory:DMABuf),format=Y212_LE" ! glimagesink

0:00:00.148086281 575148 0x562a6d36d920 ERROR             gleglimage
gsteglimage.c:555:_drm_rgba_fourcc_from_info: Unsupported format for
DMABuf.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1389>
This commit is contained in:
Haihao Xiang 2021-07-02 20:31:22 +08:00
parent 18215dcd3b
commit 2d1496bc70

View file

@ -555,6 +555,14 @@ _drm_rgba_fourcc_from_info (const GstVideoInfo * info, int plane,
*out_format = GST_GL_RG16;
return rg16_fourcc;
case GST_VIDEO_FORMAT_Y212_LE:
*out_format = GST_GL_RG16;
return DRM_FORMAT_GR1616;
case GST_VIDEO_FORMAT_Y212_BE:
*out_format = GST_GL_RG16;
return DRM_FORMAT_RG1616;
default:
GST_ERROR ("Unsupported format for DMABuf.");
return -1;