plugins: use VA allocator by default on raw caps

Instead of using dmabuf allocator in source pad, when raw video caps
are negotiated, it uses VA allocator as before, since it is stable
in more use cases, for example transcoding, and more backend drivers.

Dmabuf allocator is only used when dmabuf caps feature is negotiated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/352>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-07-08 11:57:52 +02:00
parent 13d090b566
commit d8f0e1b01f

View file

@ -593,11 +593,7 @@ ensure_srcpad_allocator (GstVaapiPluginBase * plugin, GstPad * srcpad,
goto valid_allocator;
srcpriv->allocator = NULL;
if (caps && gst_caps_is_video_raw (caps)) {
GstAllocator *allocator = create_dmabuf_srcpad_allocator (plugin, vinfo,
!srcpriv->can_dmabuf);
srcpriv->allocator = allocator;
} else if (caps && gst_vaapi_caps_feature_contains (caps,
if (caps && gst_vaapi_caps_feature_contains (caps,
GST_VAAPI_CAPS_FEATURE_DMABUF)) {
srcpriv->allocator = create_dmabuf_srcpad_allocator (plugin, vinfo, FALSE);
if (!srcpriv->allocator)