static void gst_trigger_control_source_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstTriggerControlSource *self = GST_TRIGGER_CONTROL_SOURCE (object); switch (prop_id) { case PROP_TOLERANCE: GST_TIMED_VALUE_CONTROL_SOURCE_LOCK (self); self->priv->tolerance = g_value_get_int64 (value); GST_TIMED_VALUE_CONTROL_SOURCE_UNLOCK (self); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static gboolean gst_interpolation_control_source_set_interpolation_mode (GstInterpolationControlSource * self, GstInterpolationMode mode) { GstControlSource *csource = GST_CONTROL_SOURCE (self); if (mode >= num_interpolation_modes || (int) mode < 0) { GST_WARNING ("interpolation mode %d invalid or not implemented yet", mode); return FALSE; } GST_TIMED_VALUE_CONTROL_SOURCE_LOCK (self); csource->get_value = interpolation_modes[mode].get; csource->get_value_array = interpolation_modes[mode].get_value_array; gst_timed_value_control_invalidate_cache ((GstTimedValueControlSource *) csource); self->priv->interpolation_mode = mode; GST_TIMED_VALUE_CONTROL_SOURCE_UNLOCK (self); return TRUE; }