}
static void
+_update_passthrough (GstVaVpp * self, gboolean reconf)
+{
+ GstBaseTransform *trans = GST_BASE_TRANSFORM (self);
+ gboolean old, new;
+
+ old = gst_base_transform_is_passthrough (trans);
+
+ GST_OBJECT_LOCK (self);
+ new = (self->op_flags == 0);
+ GST_OBJECT_UNLOCK (self);
+
+ if (old != new) {
+ GST_INFO_OBJECT (self, "%s passthrough", new ? "enabling" : "disabling");
+ if (reconf)
+ gst_base_transform_reconfigure_src (trans);
+ gst_base_transform_set_passthrough (trans, new);
+ }
+}
+
+static void
_update_properties_unlocked (GstVaVpp * self)
{
if (!self->filter)
_update_properties_unlocked (self);
GST_OBJECT_UNLOCK (object);
+
+ /* no reconfig here because it's done in
+ * _update_properties_unlocked() */
+ _update_passthrough (self, FALSE);
}
static void
if (!gst_va_filter_open (self->filter))
goto open_failed;
_update_properties_unlocked (self);
+ _update_passthrough (self, FALSE);
break;
default:
break;
self->negotiated =
gst_va_filter_set_formats (self->filter, &self->in_info, &self->out_info);
+ if (self->negotiated)
+ _update_passthrough (self, FALSE);
+
return self->negotiated;
/* ERRORS */
self->op_flags &= ~VPP_CONVERT_FILTERS;
GST_OBJECT_UNLOCK (self);
- gst_base_transform_set_passthrough (trans, self->op_flags == 0);
+ _update_passthrough (self, TRUE);
}
static inline gsize
_update_properties_unlocked (self);
GST_OBJECT_UNLOCK (self);
+
+ /* no reconfig here because it's done in
+ * _update_properties_unlocked */
+ _update_passthrough (self, FALSE);
+
break;
default:
break;