track-video-transition: Add a way to get current border value

Add some documentation for the border property
Change the border value in set_border to a guint as the value can be negative

API: ges_track_video_transition_get_border
This commit is contained in:
Thibault Saunier 2012-05-02 18:04:54 -04:00
parent 25c228907c
commit d780cf474f
3 changed files with 41 additions and 4 deletions

View file

@ -230,6 +230,8 @@ GESTrackVideoTransition
ges_track_video_transition_new ges_track_video_transition_new
ges_track_video_transition_set_transition_type ges_track_video_transition_set_transition_type
ges_track_video_transition_get_transition_type ges_track_video_transition_get_transition_type
ges_track_video_transition_set_border
ges_track_video_transition_get_border
<SUBSECTION Standard> <SUBSECTION Standard>
GESTrackVideoTransitionClass GESTrackVideoTransitionClass
GESTrackVideoTransitionPrivate GESTrackVideoTransitionPrivate

View file

@ -607,9 +607,19 @@ ges_track_video_transition_duration_changed (GESTrackObject * object,
GST_LOG ("done updating controller"); GST_LOG ("done updating controller");
} }
/**
* ges_track_video_transition_get_border:
* @self: The #GESTrackVideoTransition to get the border from
* @value: The value of the borer to set on @object
*
* Set the border property of @self, this value represents
* the border width of the transition. In case this value does
* not make sense for the current transition type, it is cached
* for later use.
*/
void void
ges_track_video_transition_set_border (GESTrackVideoTransition * self, ges_track_video_transition_set_border (GESTrackVideoTransition * self,
gint value) guint value)
{ {
GESTrackVideoTransitionPrivate *priv = self->priv; GESTrackVideoTransitionPrivate *priv = self->priv;
@ -620,6 +630,30 @@ ges_track_video_transition_set_border (GESTrackVideoTransition * self,
g_object_set (priv->smpte, "border", value, NULL); g_object_set (priv->smpte, "border", value, NULL);
} }
/**
* ges_track_video_transition_get_border:
* @self: The #GESTrackVideoTransition to get the border from
*
* Get the border property of @self, this value represents
* the border width of the transition.
*
* Returns: The border values of @self or -1 if not meaningfull
* (this will happen when not using a smpte transition).
*/
gint
ges_track_video_transition_get_border (GESTrackVideoTransition * self)
{
gint value;
if (!self->priv->smpte) {
return -1;
}
g_object_get (self->priv->smpte, "border", &value, NULL);
return value;
}
/** /**
* ges_track_video_transition_set_transition_type: * ges_track_video_transition_set_transition_type:
* @self: a #GESTrackVideoTransition * @self: a #GESTrackVideoTransition

View file

@ -77,8 +77,7 @@ struct _GESTrackVideoTransitionClass {
GType ges_track_video_transition_get_type (void); GType ges_track_video_transition_get_type (void);
gboolean gboolean ges_track_video_transition_set_transition_type (GESTrackVideoTransition * self,
ges_track_video_transition_set_transition_type (GESTrackVideoTransition * self,
GESVideoStandardTransitionType type); GESVideoStandardTransitionType type);
GESVideoStandardTransitionType GESVideoStandardTransitionType
ges_track_video_transition_get_transition_type (GESTrackVideoTransition * trans); ges_track_video_transition_get_transition_type (GESTrackVideoTransition * trans);
@ -87,7 +86,9 @@ GESTrackVideoTransition* ges_track_video_transition_new (void);
void void
ges_track_video_transition_set_border (GESTrackVideoTransition * self, ges_track_video_transition_set_border (GESTrackVideoTransition * self,
gint value); guint value);
gint ges_track_video_transition_get_border (GESTrackVideoTransition * self);
G_END_DECLS G_END_DECLS