Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ges-track-video-transition.c : expose border and inverted as GObject …

…properties
  • Loading branch information...
commit 398d8434169ee028345721ff2cbb438946f03d8b 1 parent c201781
Mathieu Duponchelle authored
Showing with 45 additions and 0 deletions.
  1. +45 −0 ges/ges-track-video-transition.c
View
45 ges/ges-track-video-transition.c
@@ -61,8 +61,13 @@ struct _GESTrackVideoTransitionPrivate
enum
{
PROP_0,
+ PROP_BORDER,
+ PROP_INVERT,
+ PROP_LAST
};
+static GParamSpec *properties[PROP_LAST];
+
#define fast_element_link(a,b) gst_element_link_pads_full((a),"src",(b),"sink",GST_PAD_LINK_CHECK_NOTHING)
static GObject *link_element_to_mixer (GstElement * element,
@@ -100,6 +105,30 @@ ges_track_video_transition_class_init (GESTrackVideoTransitionClass * klass)
object_class = G_OBJECT_CLASS (klass);
toclass = GES_TRACK_OBJECT_CLASS (klass);
+ /**
+ * GESTrackVideoTransition:border
+ *
+ * This value represents the border width of the transition.
+ *
+ */
+ properties[PROP_BORDER] =
+ g_param_spec_uint ("border", "Border", "The border width", 0,
+ G_MAXUINT, 0, G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_BORDER,
+ properties[PROP_BORDER]);
+
+ /**
+ * GESTrackVideoTransition:invert
+ *
+ * This value represents the direction of the transition.
+ *
+ */
+ properties[PROP_INVERT] =
+ g_param_spec_boolean ("invert", "Invert",
+ "Whether the transition is inverted", FALSE, G_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_INVERT,
+ properties[PROP_INVERT]);
+
object_class->get_property = ges_track_video_transition_get_property;
object_class->set_property = ges_track_video_transition_set_property;
object_class->dispose = ges_track_video_transition_dispose;
@@ -178,7 +207,15 @@ static void
ges_track_video_transition_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec)
{
+ GESTrackVideoTransition *tr = GES_TRACK_VIDEO_TRANSITION (object);
+
switch (property_id) {
+ case PROP_BORDER:
+ g_value_set_uint (value, ges_track_video_transition_get_border (tr));
+ break;
+ case PROP_INVERT:
+ g_value_set_boolean (value, ges_track_video_transition_is_inverted (tr));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
@@ -188,7 +225,15 @@ static void
ges_track_video_transition_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec)
{
+ GESTrackVideoTransition *tr = GES_TRACK_VIDEO_TRANSITION (object);
+
switch (property_id) {
+ case PROP_BORDER:
+ ges_track_video_transition_set_border (tr, g_value_get_uint (value));
+ break;
+ case PROP_INVERT:
+ ges_track_video_transition_set_inverted (tr, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}
Please sign in to comment.
Something went wrong with that request. Please try again.