From 7e4bcd950b677a26cd0e9f6d2752085c91a0ba8f Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 3 May 2012 02:28:41 +0200 Subject: [PATCH 1/8] track-video-transition: Expose the invert property from smpte Also, add/fixup some doc API: ges_track_video_transition_get_inverted API: ges_track_video_transition_set_inverted --- docs/libs/ges-sections.txt | 2 ++ ges/ges-track-video-transition.c | 61 +++++++++++++++++++++++++++++--- ges/ges-track-video-transition.h | 4 +++ 3 files changed, 63 insertions(+), 4 deletions(-) diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index 78bd1e7fa5..66f79a1d56 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -232,6 +232,8 @@ 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 +ges_track_video_transition_set_inverted +ges_track_video_transition_is_inverted GESTrackVideoTransitionClass GESTrackVideoTransitionPrivate diff --git a/ges/ges-track-video-transition.c b/ges/ges-track-video-transition.c index ee65b9e410..21ee26113b 100644 --- a/ges/ges-track-video-transition.c +++ b/ges/ges-track-video-transition.c @@ -55,6 +55,7 @@ struct _GESTrackVideoTransitionPrivate /* This is in case the smpte doesn't exist yet */ gint pending_border_value; + gboolean pending_inverted; }; enum @@ -127,6 +128,7 @@ ges_track_video_transition_init (GESTrackVideoTransition * self) self->priv->end_value = 0.0; self->priv->dur = 42; self->priv->pending_border_value = -1; + self->priv->pending_inverted = FALSE; } static void @@ -419,6 +421,11 @@ switch_to_smpte_cb (GstPad * sink, gboolean blocked, priv->pending_border_value = -1; } + if (priv->pending_inverted) { + g_object_set (smptealphab, "invert", priv->pending_inverted, NULL); + priv->pending_inverted = FALSE; + } + replace_mixer (priv); priv->start_value = 1.0; @@ -591,9 +598,9 @@ ges_track_video_transition_duration_changed (GESTrackObject * object, } /** - * ges_track_video_transition_get_border: - * @self: The #GESTrackVideoTransition to get the border from - * @value: The value of the borer to set on @object + * ges_track_video_transition_set_border: + * @self: The #GESTrackVideoTransition to set the border to + * @value: The value of the border to set on @object * * Set the border property of @self, this value represents * the border width of the transition. In case this value does @@ -620,7 +627,7 @@ ges_track_video_transition_set_border (GESTrackVideoTransition * self, * 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 + * Returns: The border values of @self or -1 if not meaningful * (this will happen when not using a smpte transition). */ gint @@ -637,6 +644,52 @@ ges_track_video_transition_get_border (GESTrackVideoTransition * self) return value; } +/** + * ges_track_video_transition_set_inverted: + * @self: The #GESTrackVideoTransition to set invert on + * @value: The value of the to set on @object + * + * Set the invert property of @self, this value represents + * the direction 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_inverted (GESTrackVideoTransition * self, + gboolean inverted) +{ + GESTrackVideoTransitionPrivate *priv = self->priv; + + if (!priv->smpte) { + priv->pending_inverted = inverted; + return; + } + g_object_set (priv->smpte, "invert", inverted, NULL); +} + +/** + * ges_track_video_transition_is_inverted: + * @self: The #GESTrackVideoTransition to get the inversion from + * + * Get the invert property of @self, this value represents + * the direction of the transition. + * + * Returns: The invert value of @self + */ +gboolean +ges_track_video_transition_is_inverted (GESTrackVideoTransition * self) +{ + gboolean inverted; + + if (!self->priv->smpte) { + return FALSE; + } + + g_object_get (self->priv->smpte, "invert", &inverted, NULL); + + return inverted; +} + /** * ges_track_video_transition_set_transition_type: * @self: a #GESTrackVideoTransition diff --git a/ges/ges-track-video-transition.h b/ges/ges-track-video-transition.h index 309ce6da6e..52375113c2 100644 --- a/ges/ges-track-video-transition.h +++ b/ges/ges-track-video-transition.h @@ -87,6 +87,10 @@ void ges_track_video_transition_set_border (GESTrackVideoTransition guint value); gint ges_track_video_transition_get_border (GESTrackVideoTransition * self); +void ges_track_video_transition_set_inverted (GESTrackVideoTransition * self, + gboolean inverted); +gboolean ges_track_video_transition_is_inverted (GESTrackVideoTransition * self); + G_END_DECLS #endif /* _GES_TRACK_VIDEO_transition */ From 04e5ec870476b0a9bb83d7732216e96665b48122 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 3 May 2012 02:44:00 +0200 Subject: [PATCH 2/8] python : binds the getter and setter for the "inverted" property --- bindings/python/ges.defs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/bindings/python/ges.defs b/bindings/python/ges.defs index 1bd3510277..3805b3cacd 100644 --- a/bindings/python/ges.defs +++ b/bindings/python/ges.defs @@ -2319,10 +2319,31 @@ (c-name "ges_track_video_transition_set_border") (return-type "none") (parameters - '("gint" "value") + '("guint" "value") ) ) +(define-method get_border + (of-object "GESTrackVideoTransition") + (c-name "ges_track_video_transition_get_border") + (return-type "gint") +) + +(define-method set_inverted + (of-object "GESTrackVideoTransition") + (c-name "ges_track_video_transition_set_inverted") + (return-type "none") + (parameters + '("gboolean" "inverted") + ) +) + +(define-method is_inverted + (of-object "GESTrackVideoTransition") + (c-name "ges_track_video_transition_is_inverted") + (return-type "gboolean") +) + (define-method get_transition_type (of-object "GESTrackVideoTransition") (c-name "ges_track_video_transition_get_transition_type") From fa7e9a4d39887d91c5a23f8463f33b1922490d6c Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 3 May 2012 03:35:16 +0200 Subject: [PATCH 3/8] track-video-transition: expose border and inverted as GObject properties --- ges/ges-track-video-transition.c | 47 +++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/ges/ges-track-video-transition.c b/ges/ges-track-video-transition.c index 21ee26113b..d4c1e591a3 100644 --- a/ges/ges-track-video-transition.c +++ b/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, @@ -98,13 +103,37 @@ ges_track_video_transition_class_init (GESTrackVideoTransitionClass * klass) g_type_class_add_private (klass, sizeof (GESTrackVideoTransitionPrivate)); object_class = G_OBJECT_CLASS (klass); - toclass = GES_TRACK_OBJECT_CLASS (klass); 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; object_class->finalize = ges_track_video_transition_finalize; + /** + * 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]); + + toclass = GES_TRACK_OBJECT_CLASS (klass); toclass->duration_changed = ges_track_video_transition_duration_changed; toclass->create_element = ges_track_video_transition_create_element; } @@ -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); } From 26aebe2d3d85b8a255156d846b29b8d913b91c6d Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 2 May 2012 23:43:50 -0400 Subject: [PATCH 4/8] track-video-transition: Expose the transition type as a GObject property API: GESTrackVideoTransition::transition-type property --- ges/ges-track-video-transition.c | 111 ++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 37 deletions(-) diff --git a/ges/ges-track-video-transition.c b/ges/ges-track-video-transition.c index d4c1e591a3..877755cea9 100644 --- a/ges/ges-track-video-transition.c +++ b/ges/ges-track-video-transition.c @@ -29,6 +29,9 @@ G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition, GES_TYPE_TRACK_TRANSITION); +static inline gboolean +ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition + * self, GESVideoStandardTransitionType type); struct _GESTrackVideoTransitionPrivate { GESVideoStandardTransitionType type; @@ -62,6 +65,7 @@ enum { PROP_0, PROP_BORDER, + PROP_TRANSITION_TYPE, PROP_INVERT, PROP_LAST }; @@ -121,6 +125,19 @@ ges_track_video_transition_class_init (GESTrackVideoTransitionClass * klass) g_object_class_install_property (object_class, PROP_BORDER, properties[PROP_BORDER]); + /** + * GESTrackVideoTransition:type + * + * The #GESVideoStandardTransitionType currently applied on the object + * + */ + properties[PROP_TRANSITION_TYPE] = + g_param_spec_enum ("transition-type", "Transition type", + "The type of the transition", GES_VIDEO_STANDARD_TRANSITION_TYPE_TYPE, + GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE, G_PARAM_READWRITE); + g_object_class_install_property (object_class, PROP_TRANSITION_TYPE, + properties[PROP_TRANSITION_TYPE]); + /** * GESTrackVideoTransition:invert * @@ -213,6 +230,10 @@ ges_track_video_transition_get_property (GObject * object, case PROP_BORDER: g_value_set_uint (value, ges_track_video_transition_get_border (tr)); break; + case PROP_TRANSITION_TYPE: + g_value_set_enum (value, + ges_track_video_transition_get_transition_type (tr)); + break; case PROP_INVERT: g_value_set_boolean (value, ges_track_video_transition_is_inverted (tr)); break; @@ -231,6 +252,10 @@ ges_track_video_transition_set_property (GObject * object, case PROP_BORDER: ges_track_video_transition_set_border (tr, g_value_get_uint (value)); break; + case PROP_TRANSITION_TYPE: + ges_track_video_transition_set_transition_type_internal (tr, + g_value_get_enum (value)); + break; case PROP_INVERT: ges_track_video_transition_set_inverted (tr, g_value_get_boolean (value)); break; @@ -642,6 +667,51 @@ ges_track_video_transition_duration_changed (GESTrackObject * object, GST_LOG ("done updating controller"); } +static inline gboolean +ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition + * self, GESVideoStandardTransitionType type) +{ + GESTrackVideoTransitionPrivate *priv = self->priv; + + GST_LOG ("%p %d => %d", self, priv->type, type); + + if (type == priv->type && !priv->pending_type) { + GST_INFO ("This type is already set on this transition\n"); + return TRUE; + } + if (type == priv->pending_type) { + GST_INFO ("This type is already pending for this transition\n"); + return TRUE; + } + if (priv->type && + ((priv->type != type) || (priv->type != priv->pending_type)) && + ((type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) || + (priv->type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE))) { + priv->pending_type = type; + if (type != GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) { + if (!priv->topbin) + return FALSE; + priv->smpte = NULL; + gst_pad_set_blocked_async (gst_element_get_static_pad (priv->topbin, + "sinka"), TRUE, (GstPadBlockCallback) switch_to_smpte_cb, self); + } else { + if (!priv->topbin) + return FALSE; + priv->start_value = 1.0; + priv->end_value = 0.0; + gst_pad_set_blocked_async (gst_element_get_static_pad (priv->topbin, + "sinka"), TRUE, (GstPadBlockCallback) switch_to_crossfade_cb, + self); + } + return TRUE; + } + priv->pending_type = type; + if (priv->smpte && (type != GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE)) { + g_object_set (priv->smpte, "type", (gint) type, NULL); + } + return TRUE; +} + /** * ges_track_video_transition_set_border: * @self: The #GESTrackVideoTransition to set the border to @@ -748,45 +818,12 @@ gboolean ges_track_video_transition_set_transition_type (GESTrackVideoTransition * self, GESVideoStandardTransitionType type) { - GESTrackVideoTransitionPrivate *priv = self->priv; + gboolean ret = + ges_track_video_transition_set_transition_type_internal (self, type); - GST_LOG ("%p %d => %d", self, priv->type, type); + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TRANSITION_TYPE]); - if (type == priv->type && !priv->pending_type) { - GST_INFO ("This type is already set on this transition\n"); - return TRUE; - } - if (type == priv->pending_type) { - GST_INFO ("This type is already pending for this transition\n"); - return TRUE; - } - if (priv->type && - ((priv->type != type) || (priv->type != priv->pending_type)) && - ((type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) || - (priv->type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE))) { - priv->pending_type = type; - if (type != GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) { - if (!priv->topbin) - return FALSE; - priv->smpte = NULL; - gst_pad_set_blocked_async (gst_element_get_static_pad (priv->topbin, - "sinka"), TRUE, (GstPadBlockCallback) switch_to_smpte_cb, self); - } else { - if (!priv->topbin) - return FALSE; - priv->start_value = 1.0; - priv->end_value = 0.0; - gst_pad_set_blocked_async (gst_element_get_static_pad (priv->topbin, - "sinka"), TRUE, (GstPadBlockCallback) switch_to_crossfade_cb, - self); - } - return TRUE; - } - priv->pending_type = type; - if (priv->smpte && (type != GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE)) { - g_object_set (priv->smpte, "type", (gint) type, NULL); - } - return TRUE; + return ret; } /** From 686792609ae764ff80168bc3868578871cdbe78e Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 2 May 2012 23:44:31 -0400 Subject: [PATCH 5/8] track-video-transition: Properly emit notify for the invert and border properties --- ges/ges-track-video-transition.c | 55 ++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/ges/ges-track-video-transition.c b/ges/ges-track-video-transition.c index 877755cea9..de43086aec 100644 --- a/ges/ges-track-video-transition.c +++ b/ges/ges-track-video-transition.c @@ -29,6 +29,12 @@ G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition, GES_TYPE_TRACK_TRANSITION); +static inline void +ges_track_video_transition_set_border_internal (GESTrackVideoTransition * self, + guint border); +static inline void +ges_track_video_transition_set_inverted_internal (GESTrackVideoTransition * + self, gboolean inverted); static inline gboolean ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition * self, GESVideoStandardTransitionType type); @@ -250,14 +256,16 @@ ges_track_video_transition_set_property (GObject * object, switch (property_id) { case PROP_BORDER: - ges_track_video_transition_set_border (tr, g_value_get_uint (value)); + ges_track_video_transition_set_border_internal (tr, + g_value_get_uint (value)); break; case PROP_TRANSITION_TYPE: ges_track_video_transition_set_transition_type_internal (tr, g_value_get_enum (value)); break; case PROP_INVERT: - ges_track_video_transition_set_inverted (tr, g_value_get_boolean (value)); + ges_track_video_transition_set_inverted_internal (tr, + g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -667,6 +675,33 @@ ges_track_video_transition_duration_changed (GESTrackObject * object, GST_LOG ("done updating controller"); } +static inline void +ges_track_video_transition_set_border_internal (GESTrackVideoTransition * self, + guint value) +{ + GESTrackVideoTransitionPrivate *priv = self->priv; + + if (!priv->smpte) { + priv->pending_border_value = value; + return; + } + g_object_set (priv->smpte, "border", value, NULL); +} + +static inline void +ges_track_video_transition_set_inverted_internal (GESTrackVideoTransition * + self, gboolean inverted) +{ + GESTrackVideoTransitionPrivate *priv = self->priv; + + if (!priv->smpte) { + priv->pending_inverted = inverted; + return; + } + g_object_set (priv->smpte, "invert", inverted, NULL); +} + + static inline gboolean ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition * self, GESVideoStandardTransitionType type) @@ -726,13 +761,9 @@ void ges_track_video_transition_set_border (GESTrackVideoTransition * self, guint value) { - GESTrackVideoTransitionPrivate *priv = self->priv; + ges_track_video_transition_set_border_internal (self, value); - if (!priv->smpte) { - priv->pending_border_value = value; - return; - } - g_object_set (priv->smpte, "border", value, NULL); + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BORDER]); } /** @@ -773,13 +804,9 @@ void ges_track_video_transition_set_inverted (GESTrackVideoTransition * self, gboolean inverted) { - GESTrackVideoTransitionPrivate *priv = self->priv; + ges_track_video_transition_set_inverted (self, inverted); - if (!priv->smpte) { - priv->pending_inverted = inverted; - return; - } - g_object_set (priv->smpte, "invert", inverted, NULL); + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INVERT]); } /** From 7a7690a9e062b45737ba1a508b575e8fe967a712 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 2 May 2012 23:56:35 -0400 Subject: [PATCH 6/8] Do no check if GLib >2.26 as we depend on GLib 2.28 --- ges/ges-timeline-object.c | 12 ------------ ges/ges-timeline.c | 4 ---- ges/ges-track-object.c | 20 -------------------- ges/ges-track.c | 4 ---- 4 files changed, 40 deletions(-) diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c index 1c671d6cab..9e9ea34ecb 100644 --- a/ges/ges-timeline-object.c +++ b/ges/ges-timeline-object.c @@ -832,11 +832,7 @@ void ges_timeline_object_set_start (GESTimelineObject * object, guint64 start) { if (ges_timeline_object_set_start_internal (object, start)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_START]); -#else - g_object_notify (G_OBJECT (object), "start"); -#endif } static gboolean @@ -875,11 +871,7 @@ void ges_timeline_object_set_inpoint (GESTimelineObject * object, guint64 inpoint) { if (ges_timeline_object_set_inpoint_internal (object, inpoint)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_INPOINT]); -#else - g_object_notify (G_OBJECT (object), "in-point"); -#endif } static gboolean @@ -938,11 +930,7 @@ void ges_timeline_object_set_duration (GESTimelineObject * object, guint64 duration) { if (ges_timeline_object_set_duration_internal (object, duration)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_DURATION]); -#else - g_object_notify (G_OBJECT (object), "duration"); -#endif } static gboolean diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index 1e4f7bd2e8..e211c43ba0 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -1727,11 +1727,7 @@ track_duration_cb (GstElement * track, timeline->priv->duration = max_duration; -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (timeline), properties[PROP_DURATION]); -#else - g_object_notify (G_OBJECT (timeline), "duration"); -#endif } } diff --git a/ges/ges-track-object.c b/ges/ges-track-object.c index 2bc7885711..42e8db93ee 100644 --- a/ges/ges-track-object.c +++ b/ges/ges-track-object.c @@ -381,11 +381,7 @@ ges_track_object_set_start (GESTrackObject * object, guint64 start) g_return_if_fail (GES_IS_TRACK_OBJECT (object)); if (ges_track_object_set_start_internal (object, start)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_START]); -#else - g_object_notify (G_OBJECT (object), "start"); -#endif } static inline gboolean @@ -419,11 +415,7 @@ ges_track_object_set_inpoint (GESTrackObject * object, guint64 inpoint) g_return_if_fail (GES_IS_TRACK_OBJECT (object)); if (ges_track_object_set_inpoint_internal (object, inpoint)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_INPOINT]); -#else - g_object_notify (G_OBJECT (object), "in-point"); -#endif } static inline gboolean @@ -465,11 +457,7 @@ ges_track_object_set_duration (GESTrackObject * object, guint64 duration) g_return_if_fail (GES_IS_TRACK_OBJECT (object)); if (ges_track_object_set_duration_internal (object, duration)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_DURATION]); -#else - g_object_notify (G_OBJECT (object), "duration"); -#endif } static inline gboolean @@ -505,11 +493,7 @@ void ges_track_object_set_priority (GESTrackObject * object, guint32 priority) { if (ges_track_object_set_priority_internal (object, priority)) -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_PRIORITY]); -#else - g_object_notify (G_OBJECT (object), "priority"); -#endif } @@ -978,11 +962,7 @@ ges_track_object_set_locked (GESTrackObject * object, gboolean locked) GST_DEBUG_OBJECT (object, "%s object", locked ? "Locking" : "Unlocking"); ges_track_object_set_locked_internal (object, locked); -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_LOCKED]); -#else - g_object_notify (G_OBJECT (object), "locked"); -#endif } diff --git a/ges/ges-track.c b/ges/ges-track.c index 30eb881eb9..89480a1e86 100644 --- a/ges/ges-track.c +++ b/ges/ges-track.c @@ -626,11 +626,7 @@ composition_duration_cb (GstElement * composition, obj->priv->duration = duration; -#if GLIB_CHECK_VERSION(2,26,0) g_object_notify_by_pspec (G_OBJECT (obj), properties[ARG_DURATION]); -#else - g_object_notify (G_OBJECT (obj), "duration"); -#endif } } From 151f491549506212181289b5c125b9294a1172a9 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 3 May 2012 15:41:08 +0200 Subject: [PATCH 7/8] ges: Remove invalid ' < 0' checks It's an unsigned value, it will never be < 0. --- ges/ges-timeline-object.c | 2 -- ges/ges-track-object.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c index 9e9ea34ecb..0d3fb03640 100644 --- a/ges/ges-timeline-object.c +++ b/ges/ges-timeline-object.c @@ -1364,8 +1364,6 @@ ges_timeline_object_edit (GESTimelineObject * object, GList * layers, GST_WARNING_OBJECT (object, "Trying to edit, but not containing" "any TrackObject yet."); return FALSE; - } else if (position < 0) { - GST_DEBUG_OBJECT (object, "Trying to move before 0, not moving"); } for (tmp = object->priv->trackobjects; tmp; tmp = g_list_next (tmp)) { diff --git a/ges/ges-track-object.c b/ges/ges-track-object.c index 42e8db93ee..11e2d8fc9f 100644 --- a/ges/ges-track-object.c +++ b/ges/ges-track-object.c @@ -1618,9 +1618,6 @@ ges_track_object_edit (GESTrackObject * object, GST_WARNING_OBJECT (object, "Trying to edit in %d mode but not in" "any Track yet.", mode); return FALSE; - } else if (position < 0) { - GST_DEBUG_OBJECT (object, "Trying to move before 0, not moving"); - return FALSE; } timeline = GES_TIMELINE (ges_track_get_timeline (track)); From 43b815925a2de16ee15e0745f786f1ea8758a30f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 5 May 2012 12:31:28 -0400 Subject: [PATCH 8/8] track-object: Set minimum value of max-duration to 0 GST_CLOCK_TIME_NONE was nonsense Minor documentation fixing on the way --- ges/ges-timeline-object.c | 2 +- ges/ges-track-object.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c index 0d3fb03640..1338f33fae 100644 --- a/ges/ges-timeline-object.c +++ b/ges/ges-timeline-object.c @@ -389,7 +389,7 @@ ges_timeline_object_class_init (GESTimelineObjectClass * klass) */ g_object_class_install_property (object_class, PROP_MAX_DURATION, g_param_spec_uint64 ("max-duration", "Maximum duration", - "The duration of the object", 0, G_MAXUINT64, G_MAXUINT64, + "The maximum duration of the object", 0, G_MAXUINT64, G_MAXUINT64, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); klass->need_fill_track = TRUE; diff --git a/ges/ges-track-object.c b/ges/ges-track-object.c index 11e2d8fc9f..f7dec0bfa6 100644 --- a/ges/ges-track-object.c +++ b/ges/ges-track-object.c @@ -309,8 +309,8 @@ ges_track_object_class_init (GESTrackObjectClass * klass) */ g_object_class_install_property (object_class, PROP_MAX_DURATION, g_param_spec_uint64 ("max-duration", "Maximum duration", - "The duration of the object", GST_CLOCK_TIME_NONE, G_MAXUINT64, - G_MAXUINT64, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + "The maximum duration of the object", 0, G_MAXUINT64, G_MAXUINT64, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /** * GESTrackObject::deep-notify: