mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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:
parent
25c228907c
commit
d780cf474f
3 changed files with 41 additions and 4 deletions
|
@ -230,6 +230,8 @@ GESTrackVideoTransition
|
|||
ges_track_video_transition_new
|
||||
ges_track_video_transition_set_transition_type
|
||||
ges_track_video_transition_get_transition_type
|
||||
ges_track_video_transition_set_border
|
||||
ges_track_video_transition_get_border
|
||||
<SUBSECTION Standard>
|
||||
GESTrackVideoTransitionClass
|
||||
GESTrackVideoTransitionPrivate
|
||||
|
|
|
@ -607,9 +607,19 @@ ges_track_video_transition_duration_changed (GESTrackObject * object,
|
|||
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
|
||||
ges_track_video_transition_set_border (GESTrackVideoTransition * self,
|
||||
gint value)
|
||||
guint value)
|
||||
{
|
||||
GESTrackVideoTransitionPrivate *priv = self->priv;
|
||||
|
||||
|
@ -620,6 +630,30 @@ ges_track_video_transition_set_border (GESTrackVideoTransition * self,
|
|||
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:
|
||||
* @self: a #GESTrackVideoTransition
|
||||
|
|
|
@ -77,8 +77,7 @@ struct _GESTrackVideoTransitionClass {
|
|||
|
||||
GType ges_track_video_transition_get_type (void);
|
||||
|
||||
gboolean
|
||||
ges_track_video_transition_set_transition_type (GESTrackVideoTransition * self,
|
||||
gboolean ges_track_video_transition_set_transition_type (GESTrackVideoTransition * self,
|
||||
GESVideoStandardTransitionType type);
|
||||
GESVideoStandardTransitionType
|
||||
ges_track_video_transition_get_transition_type (GESTrackVideoTransition * trans);
|
||||
|
@ -87,7 +86,9 @@ GESTrackVideoTransition* ges_track_video_transition_new (void);
|
|||
|
||||
void
|
||||
ges_track_video_transition_set_border (GESTrackVideoTransition * self,
|
||||
gint value);
|
||||
guint value);
|
||||
|
||||
gint ges_track_video_transition_get_border (GESTrackVideoTransition * self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue