track-video-transition: expose the border property of smptealpha

API: ges_track_video_transition_set_border
This commit is contained in:
Mathieu Duponchelle 2012-05-02 01:09:07 +02:00 committed by Thibault Saunier
parent 1e6c82fb3c
commit 15c7e9738c
2 changed files with 25 additions and 0 deletions

View file

@ -53,6 +53,8 @@ struct _GESTrackVideoTransitionPrivate
gdouble end_value;
guint64 dur;
/* This is in case the smpte doesn't exist yet */
gint pending_border_value;
};
enum
@ -124,6 +126,7 @@ ges_track_video_transition_init (GESTrackVideoTransition * self)
self->priv->start_value = 0.0;
self->priv->end_value = 0.0;
self->priv->dur = 42;
self->priv->pending_border_value = -1;
}
static void
@ -434,6 +437,11 @@ switch_to_smpte_cb (GstPad * sink, gboolean blocked,
add_smpte_to_bin (priv->sinka, smptealpha, priv);
add_smpte_to_bin (priv->sinkb, smptealphab, priv);
if (priv->pending_border_value != -1) {
g_object_set (smptealphab, "border", priv->pending_border_value, NULL);
priv->pending_border_value = -1;
}
replace_mixer (priv);
priv->start_value = 1.0;
@ -599,6 +607,19 @@ ges_track_video_transition_duration_changed (GESTrackObject * object,
GST_LOG ("done updating controller");
}
void
ges_track_video_transition_set_border (GESTrackVideoTransition * self,
gint value)
{
GESTrackVideoTransitionPrivate *priv = self->priv;
if (!priv->smpte) {
priv->pending_border_value = value;
return;
}
g_object_set (priv->smpte, "border", value, NULL);
}
/**
* ges_track_video_transition_set_transition_type:
* @self: a #GESTrackVideoTransition

View file

@ -85,6 +85,10 @@ ges_track_video_transition_get_transition_type (GESTrackVideoTransition * trans)
GESTrackVideoTransition* ges_track_video_transition_new (void);
void
ges_track_video_transition_set_border (GESTrackVideoTransition * self,
gint value);
G_END_DECLS
#endif /* _GES_TRACK_VIDEO_transition */