eglimage: Add AV12 DMABuf import support

The per plane format mapping for AV12 was missing, which would force
raw upload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1199>
This commit is contained in:
Nicolas Dufresne 2021-06-10 12:41:31 -04:00
parent 0661b15957
commit 025a14e7fe

View file

@ -545,6 +545,10 @@ _drm_rgba_fourcc_from_info (const GstVideoInfo * info, int plane,
*out_format = plane == 0 ? GST_GL_R16 : GST_GL_RG16;
return plane == 0 ? DRM_FORMAT_R16 : DRM_FORMAT_RG1616;
case GST_VIDEO_FORMAT_AV12:
*out_format = plane == 1 ? GST_GL_RED : GST_GL_RG;
return plane == 1 ? rg_fourcc : DRM_FORMAT_R8;
default:
GST_ERROR ("Unsupported format for DMABuf.");
return -1;