We use notifies for the properties.
+ Use notifies in audio-transition and video-transition
property_id, const GValue * value, GParamSpec * pspec);
static void
+duration_changed_cb (GESTrackElement * self, GParamSpec * arg G_GNUC_UNUSED)
+{
+ ges_audio_transition_duration_changed (self,
+ ges_timeline_element_get_duration (GES_TIMELINE_ELEMENT (self)));
+}
+
+static void
ges_audio_transition_class_init (GESAudioTransitionClass * klass)
{
GObjectClass *object_class;
object_class->dispose = ges_audio_transition_dispose;
object_class->finalize = ges_audio_transition_finalize;
- toclass->duration_changed = ges_audio_transition_duration_changed;
-
toclass->create_element = ges_audio_transition_create_element;
}
self->priv->b_control_source = NULL;
}
+ g_signal_handlers_disconnect_by_func (GES_TRACK_ELEMENT (self),
+ duration_changed_cb, NULL);
+
G_OBJECT_CLASS (ges_audio_transition_parent_class)->dispose (object);
}
ges_timeline_element_get_duration (GES_TIMELINE_ELEMENT (track_element));
ges_audio_transition_duration_changed (track_element, duration);
+ g_signal_connect (track_element, "notify::duration",
+ G_CALLBACK (duration_changed_cb), NULL);
+
gst_object_add_control_binding (GST_OBJECT (atarget),
gst_direct_control_binding_new (GST_OBJECT (atarget), propname,
acontrol_source));
* @gnlobject_factorytype: name of the GNonLin GStElementFactory type to use.
* @create_gnl_object: method to create the GNonLin container object.
* @create_element: method to return the GstElement to put in the gnlobject.
- * @duration_changed: duration property glnobject has changed
* @active_changed: active property of gnlobject has changed
* @get_props_hastable: method to list children properties that user could like
* to configure. Since: 0.10.2
GstElement* (*create_gnl_object) (GESTrackElement * object);
GstElement* (*create_element) (GESTrackElement * object);
- void (*duration_changed) (GESTrackElement *object, guint64 duration);
void (*active_changed) (GESTrackElement *object, gboolean active);
/*< private >*/
property_id, const GValue * value, GParamSpec * pspec);
static void
+duration_changed_cb (GESTrackElement * self, GParamSpec * arg G_GNUC_UNUSED)
+{
+ ges_video_transition_duration_changed (self,
+ ges_timeline_element_get_duration (GES_TIMELINE_ELEMENT (self)));
+}
+
+static void
ges_video_transition_class_init (GESVideoTransitionClass * klass)
{
GObjectClass *object_class;
properties[PROP_INVERT]);
toclass = GES_TRACK_ELEMENT_CLASS (klass);
- toclass->duration_changed = ges_video_transition_duration_changed;
toclass->create_element = ges_video_transition_create_element;
}
priv->mixer = NULL;
}
+ g_signal_handlers_disconnect_by_func (GES_TRACK_ELEMENT (self),
+ duration_changed_cb, NULL);
+
G_OBJECT_CLASS (ges_video_transition_parent_class)->dispose (object);
}
priv->topbin = topbin;
priv->type = priv->pending_type;
+ g_signal_connect (object, "notify::duration",
+ G_CALLBACK (duration_changed_cb), NULL);
+
return topbin;
}