videopool: support parsing dma_drm caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9345>
This commit is contained in:
Elliot Chen 2025-07-08 15:45:57 +09:00 committed by GStreamer Marge Bot
parent ea69849cd8
commit a374bd51fb

View File

@ -140,8 +140,19 @@ video_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
goto no_caps;
/* now parse the caps from the config */
if (!gst_video_info_from_caps (&info, caps))
goto wrong_caps;
if (gst_video_is_dma_drm_caps (caps)) {
GstVideoInfoDmaDrm drm_info;
if (!gst_video_info_dma_drm_from_caps (&drm_info, caps))
goto wrong_caps;
if (GST_VIDEO_INFO_FORMAT (&drm_info.vinfo) == GST_VIDEO_FORMAT_DMA_DRM)
goto wrong_caps;
info = drm_info.vinfo;
} else {
if (!gst_video_info_from_caps (&info, caps))
goto wrong_caps;
}
if (size < info.size)
goto wrong_size;