mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 22:28:22 +00:00
634fefab5d
Instead of generating allowed srcpad caps with generic information, now it takes the size an formats limits from the decoder's context. This is possible since srcpad caps are generated after the internal decoder is created. The patch replaces gst_vaapi_decoder_get_surface_formats() with gst_vaapi_decoder_get_suface_attributes(). From these attributes, formats are only used for VASurface memory caps feature. For system memory caps feature, the old gst_vaapi_plugin_get_allowed_srcpad_caps() is still used, since i965 jpeg decoder cannot deliver mappable format for gstreamer. And for the other caps features (dmabuf and texture upload) the same static list are used. This patch also adds DMABuf caps feature only if the context supports that memory type. Nonetheless, we keep the pre-defined formats since they are the subset of common derive formats formats supported either by amd/gallium and both intel drivers, since, when exporting the fd through vaAcquireBufferHandle()/ vaReleaseBufferHandle(), the formats of the derivable image cannot be retriebable from the driver. Later we'll use the attribute formats for the DMABuf feature too, when the code be ported to vaExportSurfaceHandle(). Finally, the allowed srcpad caps are removed if the internal decoder is destroyed, since context attribues will change. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366> |
||
---|---|---|
.. | ||
gst | ||
meson.build |