)
)
+(define-method is_updating
+ (of-object "GESTimeline")
+ (c-name "ges_timeline_is_updating")
+ (return-type "gboolean")
+)
+
;; From ges-timeline-layer.h
)
)
+(define-method is_updating
+ (of-object "GESTrack")
+ (c-name "ges_track_is_updating")
+ (return-type "gboolean")
+)
+
;; From ges-track-object.h
}
/**
+ * ges_timeline_is_updating:
+ * @timeline: a #GESTimeline
+ *
+ * Get whether the timeline is updated for every change happening within or not.
+ *
+ * Returns: %TRUE if @timeline is updating on every changes, else %FALSE.
+ */
+gboolean
+ges_timeline_is_updating (GESTimeline * timeline)
+{
+ GList *tmp;
+
+ g_return_val_if_fail (GES_IS_TIMELINE (timeline), FALSE);
+
+ for (tmp = timeline->priv->tracks; tmp; tmp = tmp->next) {
+ if (!ges_track_is_updating (((TrackPrivate *) tmp->data)->track))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
* ges_timeline_enable_update:
* @timeline: a #GESTimeline
* @enabled: Whether the timeline should update on every change or not.
GstElement *composition; /* The composition associated with this track */
GstElement *background; /* The backgrond, handle the gaps in the track */
GstPad *srcpad; /* The source GhostPad */
+
+ gboolean updating;
};
enum
GES_TYPE_TRACK, GESTrackPrivate);
self->priv->composition = gst_element_factory_make ("gnlcomposition", NULL);
+ self->priv->updating = TRUE;
g_signal_connect (G_OBJECT (self->priv->composition), "notify::duration",
G_CALLBACK (composition_duration_cb), self);
{
gboolean update;
- g_object_set (track->priv->composition, "update", enabled, NULL);
+ g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
+ g_object_set (track->priv->composition, "update", enabled, NULL);
g_object_get (track->priv->composition, "update", &update, NULL);
- if (update == enabled) {
- return TRUE;
- } else {
- return FALSE;
- }
+ track->priv->updating = update;
+
+ return update == enabled;
+}
+
+/**
+ * ges_track_is_updating:
+ * @track: a #GESTrack
+ *
+ * Get whether the track is updated for every change happening within or not.
+ *
+ * Returns: %TRUE if @track is updating on every changes, else %FALSE.
+ */
+gboolean
+ges_track_is_updating (GESTrack * track)
+{
+ g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
+
+ return track->priv->updating;
}