autoconvert: Force raw memory when using videoconvertscale

videoconvertscale advertises `ANY` feature, but it supports it only
in passthrough. Our goal with autoconvert is to ensure that  conversion
is possible with the elements that are being plugged so we avoid
plugging `videoconvertscale` if the memory type is not system memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/899>
This commit is contained in:
Thibault Saunier 2023-10-10 16:05:34 -03:00 committed by GStreamer Marge Bot
parent 9821c0ae96
commit 79612de803

View file

@ -79,14 +79,14 @@ gst_auto_video_convert_init (GstAutoVideoConvert * autovideoconvert)
.rank = GST_RANK_SECONDARY,
},
{
.first_elements = { NULL, },
.first_elements = { "capsfilter caps=\"video/x-raw\"", NULL, },
.colorspace_converters = { "videoconvertscale", NULL },
.last_elements = { "rgb2bayer", NULL },
.filters = { NULL },
.rank = GST_RANK_SECONDARY,
},
{
.first_elements = { NULL, },
.first_elements = { "capsfilter caps=\"video/x-raw\"", NULL, },
.colorspace_converters = { "videoconvertscale", NULL },
.last_elements = { NULL, },
.filters = { NULL },
@ -107,7 +107,7 @@ gst_auto_video_convert_init (GstAutoVideoConvert * autovideoconvert)
.rank = GST_RANK_PRIMARY,
},
{
.first_elements = { "videoconvertscale", "glupload", NULL },
.first_elements = { "capsfilter caps=\"video/x-raw\"", "videoconvertscale", "glupload", NULL },
.colorspace_converters = { NULL },
.last_elements = { NULL },
.filters = { NULL },
@ -156,7 +156,7 @@ gst_auto_video_convert_init (GstAutoVideoConvert * autovideoconvert)
.rank = GST_RANK_MARGINAL,
},
{ /* System memory to cuda */
.first_elements = { NULL },
.first_elements = { "capsfilter caps=\"video/x-raw\"", NULL },
.colorspace_converters = { "videoconvertscale", NULL },
.last_elements = { "cudaupload", "capsfilter caps=video/x-raw(memory:CUDAMemory)", NULL },
.filters = { NULL },