videoconvertscale: Remove the restriction on ANY memory

Our pad templates already expose ANY feature and the code supports that
case even if only for the passthrough, we should not disable that feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4733>
This commit is contained in:
Thibault Saunier 2023-05-31 11:42:28 -04:00 committed by GStreamer Marge Bot
parent d228b8d96f
commit e7f13ede0f
4 changed files with 0 additions and 29 deletions

View file

@ -59,7 +59,6 @@ gst_video_convert_class_init (GstVideoConvertClass * klass)
"Converts video from one colorspace to another",
"Wim Taymans <wim.taymans@gmail.com>");
convertscale_class->any_memory = TRUE;
convertscale_class->converts = TRUE;
convertscale_class->scales = FALSE;
}

View file

@ -405,7 +405,6 @@ gst_video_convert_scale_class_init (GstVideoConvertScaleClass * klass)
filter_class->transform_frame =
GST_DEBUG_FUNCPTR (gst_video_convert_scale_transform_frame);
klass->any_memory = FALSE;
klass->converts = TRUE;
klass->scales = TRUE;
@ -631,7 +630,6 @@ gst_video_convert_scale_transform_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
{
GstVideoConvertScale *self = GST_VIDEO_CONVERT_SCALE (trans);
gint i;
GstCaps *ret;
GST_DEBUG_OBJECT (trans,
@ -648,30 +646,6 @@ gst_video_convert_scale_transform_caps (GstBaseTransform * trans,
ret = intersection;
}
if (GST_VIDEO_CONVERT_SCALE_GET_CLASS (trans)->any_memory)
return ret;
for (i = 0; i < gst_caps_get_size (ret); i++) {
gint j;
GstCapsFeatures *f = gst_caps_get_features (ret, i);
if (!f || gst_caps_features_is_any (f) ||
gst_caps_features_is_equal (f, GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))
continue;
for (j = 0; j < gst_caps_features_get_size (f); j++) {
const gchar *feature = gst_caps_features_get_nth (f, j);
if (g_str_has_prefix (feature, "memory:")) {
GST_DEBUG_OBJECT (trans, "Can not work with memory `%s`", feature);
gst_caps_remove_structure (ret, i);
break;
}
}
}
GST_DEBUG_OBJECT (trans, "returning caps: %" GST_PTR_FORMAT, ret);
return ret;
}

View file

@ -37,7 +37,6 @@ struct _GstVideoConvertScaleClass
{
GstVideoFilterClass parent;
gboolean any_memory;
gboolean scales;
gboolean converts;
};

View file

@ -124,7 +124,6 @@ gst_video_scale_class_init (GstVideoScaleClass * klass)
"Video scaler", "Filter/Converter/Video/Scaler",
"Resizes video", "Wim Taymans <wim.taymans@gmail.com>");
convertscale_class->any_memory = TRUE;
convertscale_class->converts = FALSE;
convertscale_class->scales = TRUE;
}