timeline: Add methods to get and set the snapping distance

This commit is contained in:
Thibault Saunier 2013-07-24 22:37:06 -04:00
parent c1451cf48c
commit 5c8e2737b4
3 changed files with 40 additions and 0 deletions

View file

@ -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

View file

@ -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;
}

View file

@ -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