summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2013-07-24 22:37:06 -0400
committerThibault Saunier <thibault.saunier@collabora.com>2013-07-24 22:37:06 -0400
commit5c8e2737b411cb1d48953eb2b968872831444a7a (patch)
tree1afdcaee070e38a847788328f044c61434338b55
parentc1451cf48c4d6c169e9f16c450d5ffd9af3b2804 (diff)
timeline: Add methods to get and set the snapping distance
-rw-r--r--docs/libs/ges-sections.txt2
-rw-r--r--ges/ges-timeline.c36
-rw-r--r--ges/ges-timeline.h2
3 files changed, 40 insertions, 0 deletions
diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt
index 11f1a7a..8d94a3e 100644
--- a/docs/libs/ges-sections.txt
+++ b/docs/libs/ges-sections.txt
@@ -305,6 +305,8 @@ ges_timeline_get_duration
ges_timeline_get_project
ges_timeline_get_auto_transition
ges_timeline_set_auto_transition
+ges_timeline_get_snapping_distance
+ges_timeline_set_snapping_distance
<SUBSECTION Standard>
GESTimelinePrivate
GESTimelineClass
diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c
index 52fb950..cc015ff 100644
--- a/ges/ges-timeline.c
+++ b/ges/ges-timeline.c
@@ -2841,3 +2841,39 @@ ges_timeline_set_auto_transition (GESTimeline * timeline,
ges_layer_set_auto_transition (layer, auto_transition);
}
}
+
+/**
+ * ges_timeline_get_snapping_distance:
+ * @timeline: a #GESTimeline
+ *
+ * Gets the configured snapping distance of the timeline. See
+ * the documentation of the property snapping_distance for more
+ * information.
+ *
+ * Returns: The @snapping_distance property of the timeline
+ */
+GstClockTime
+ges_timeline_get_snapping_distance (GESTimeline * timeline)
+{
+ g_return_val_if_fail (GES_IS_TIMELINE (timeline), GST_CLOCK_TIME_NONE);
+
+ return timeline->priv->snapping_distance;
+
+}
+
+/**
+ * ges_timeline_set_snapping_distance:
+ * @timeline: a #GESLayer
+ * @snapping_distance: whether the snapping_distance is active
+ *
+ * Sets the @snapping_distance of the timeline. See the documentation of the
+ * property snapping_distance for more information.
+ */
+void
+ges_timeline_set_snapping_distance (GESTimeline * timeline,
+ GstClockTime snapping_distance)
+{
+ g_return_if_fail (GES_IS_TIMELINE (timeline));
+
+ timeline->priv->snapping_distance = snapping_distance;
+}
diff --git a/ges/ges-timeline.h b/ges/ges-timeline.h
index 487e58b..dbd6f25 100644
--- a/ges/ges-timeline.h
+++ b/ges/ges-timeline.h
@@ -122,6 +122,8 @@ GstClockTime ges_timeline_get_duration (GESTimeline *timeline);
gboolean ges_timeline_get_auto_transition (GESTimeline * timeline);
void ges_timeline_set_auto_transition (GESTimeline * timeline, gboolean auto_transition);
+GstClockTime ges_timeline_get_snapping_distance (GESTimeline * timeline);
+void ges_timeline_set_snapping_distance (GESTimeline * timeline, GstClockTime snapping_distance);
G_END_DECLS