mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
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:
parent
d228b8d96f
commit
e7f13ede0f
4 changed files with 0 additions and 29 deletions
|
@ -59,7 +59,6 @@ gst_video_convert_class_init (GstVideoConvertClass * klass)
|
||||||
"Converts video from one colorspace to another",
|
"Converts video from one colorspace to another",
|
||||||
"Wim Taymans <wim.taymans@gmail.com>");
|
"Wim Taymans <wim.taymans@gmail.com>");
|
||||||
|
|
||||||
convertscale_class->any_memory = TRUE;
|
|
||||||
convertscale_class->converts = TRUE;
|
convertscale_class->converts = TRUE;
|
||||||
convertscale_class->scales = FALSE;
|
convertscale_class->scales = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -405,7 +405,6 @@ gst_video_convert_scale_class_init (GstVideoConvertScaleClass * klass)
|
||||||
filter_class->transform_frame =
|
filter_class->transform_frame =
|
||||||
GST_DEBUG_FUNCPTR (gst_video_convert_scale_transform_frame);
|
GST_DEBUG_FUNCPTR (gst_video_convert_scale_transform_frame);
|
||||||
|
|
||||||
klass->any_memory = FALSE;
|
|
||||||
klass->converts = TRUE;
|
klass->converts = TRUE;
|
||||||
klass->scales = TRUE;
|
klass->scales = TRUE;
|
||||||
|
|
||||||
|
@ -631,7 +630,6 @@ gst_video_convert_scale_transform_caps (GstBaseTransform * trans,
|
||||||
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
|
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
|
||||||
{
|
{
|
||||||
GstVideoConvertScale *self = GST_VIDEO_CONVERT_SCALE (trans);
|
GstVideoConvertScale *self = GST_VIDEO_CONVERT_SCALE (trans);
|
||||||
gint i;
|
|
||||||
GstCaps *ret;
|
GstCaps *ret;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (trans,
|
GST_DEBUG_OBJECT (trans,
|
||||||
|
@ -648,30 +646,6 @@ gst_video_convert_scale_transform_caps (GstBaseTransform * trans,
|
||||||
ret = intersection;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ struct _GstVideoConvertScaleClass
|
||||||
{
|
{
|
||||||
GstVideoFilterClass parent;
|
GstVideoFilterClass parent;
|
||||||
|
|
||||||
gboolean any_memory;
|
|
||||||
gboolean scales;
|
gboolean scales;
|
||||||
gboolean converts;
|
gboolean converts;
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,7 +124,6 @@ gst_video_scale_class_init (GstVideoScaleClass * klass)
|
||||||
"Video scaler", "Filter/Converter/Video/Scaler",
|
"Video scaler", "Filter/Converter/Video/Scaler",
|
||||||
"Resizes video", "Wim Taymans <wim.taymans@gmail.com>");
|
"Resizes video", "Wim Taymans <wim.taymans@gmail.com>");
|
||||||
|
|
||||||
convertscale_class->any_memory = TRUE;
|
|
||||||
convertscale_class->converts = FALSE;
|
convertscale_class->converts = FALSE;
|
||||||
convertscale_class->scales = TRUE;
|
convertscale_class->scales = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue