basetransform: allow not passthrough if generate_output is implemented

This allows an element to not require implementing transform or
transform_ip.
This commit is contained in:
Matthew Waters 2020-03-11 22:39:35 +11:00
parent 8fb1fe4620
commit 4154baedb1

View file

@ -2554,7 +2554,7 @@ gst_base_transform_src_activate_mode (GstPad * pad, GstObject * parent,
* useful for filters that do not care about negotiation. * useful for filters that do not care about negotiation.
* *
* Always %TRUE for filters which don't implement either a transform * Always %TRUE for filters which don't implement either a transform
* or transform_ip method. * or transform_ip or generate_output method.
* *
* MT safe. * MT safe.
*/ */
@ -2570,7 +2570,8 @@ gst_base_transform_set_passthrough (GstBaseTransform * trans,
GST_OBJECT_LOCK (trans); GST_OBJECT_LOCK (trans);
if (!passthrough) { if (!passthrough) {
if (bclass->transform_ip || bclass->transform) if (bclass->transform_ip || bclass->transform || (bclass->generate_output
&& bclass->generate_output != default_generate_output))
trans->priv->passthrough = FALSE; trans->priv->passthrough = FALSE;
} else { } else {
trans->priv->passthrough = TRUE; trans->priv->passthrough = TRUE;