gst_video_convert_scale_transform_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
{
+ gint i;
GstCaps *ret;
GST_DEBUG_OBJECT (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;
gobject_class->set_property = gst_video_scale_set_property;
gobject_class->get_property = gst_video_scale_get_property;
+ ((GstVideoConvertScaleClass *) klass)->any_memory = TRUE;
+
g_object_class_install_property (gobject_class, PROP_GAMMA_DECODE,
g_param_spec_boolean ("gamma-decode", "Gamma Decode",
"Decode gamma before scaling", DEFAULT_PROP_GAMMA_DECODE,