gobject_class->finalize = gst_base_transform_finalize;
klass->passthrough_on_same_caps = FALSE;
+ klass->transform_ip_on_passthrough = TRUE;
klass->transform_caps =
GST_DEBUG_FUNCPTR (gst_base_transform_default_transform_caps);
priv->have_same_caps = gst_caps_is_equal (in, out);
GST_DEBUG_OBJECT (trans, "have_same_caps: %d", priv->have_same_caps);
- /* If we've a transform_ip method and same input/output caps, set in_place
- * by default. If for some reason the sub-class prefers using a transform
- * function, it can clear the in place flag in the set_caps */
- gst_base_transform_set_in_place (trans,
- klass->transform_ip && priv->have_same_caps);
-
/* Set the passthrough if the class wants passthrough_on_same_caps
* and we have the same caps on each pad */
if (klass->passthrough_on_same_caps)
gst_caps_unref (othercaps);
othercaps = intersection;
} else {
+ gst_caps_unref (othercaps);
othercaps = peercaps;
}
/* In passthrough mode, give transform_ip a look at the
* buffer, without making it writable, or just push the
* data through */
- if (bclass->transform_ip) {
- GST_DEBUG_OBJECT (trans, "doing passthrough transform");
+ if (bclass->transform_ip_on_passthrough && bclass->transform_ip) {
+ GST_DEBUG_OBJECT (trans, "doing passthrough transform_ip");
ret = bclass->transform_ip (trans, *outbuf);
} else {
GST_DEBUG_OBJECT (trans, "element is in passthrough");