video-transition: Make smpte props children properties
authorThibault Saunier <tsaunier@igalia.com>
Fri, 4 Sep 2020 01:15:16 +0000 (21:15 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 9 Sep 2020 01:45:11 +0000 (01:45 +0000)
And deprecate old style accessors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/207>

ges/ges-video-transition.c
ges/ges-video-transition.h

index e5f5916..e84af25 100644 (file)
@@ -167,6 +167,7 @@ ges_video_transition_class_init (GESVideoTransitionClass * klass)
    *
    * The #GESVideoStandardTransitionType currently applied on the object
    *
+   * Deprecated:1.20: Use ges_timeline_element_[sg]et_child_property instead.
    */
   properties[PROP_TRANSITION_TYPE] =
       g_param_spec_enum ("transition-type", "Transition type",
@@ -180,6 +181,7 @@ ges_video_transition_class_init (GESVideoTransitionClass * klass)
    *
    * This value represents the direction of the transition.
    *
+    * Deprecated:1.20: Use ges_timeline_element_[sg]et_child_property instead.
    */
   properties[PROP_INVERT] =
       g_param_spec_boolean ("invert", "Invert",
@@ -334,6 +336,7 @@ ges_video_transition_create_element (GESTrackElement * object)
   GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src;
   GESVideoTransition *self;
   GESVideoTransitionPrivate *priv;
+  const gchar *smpte_properties[] = { "invert", "border", NULL };
 
   self = GES_VIDEO_TRANSITION (object);
   priv = self->priv;
@@ -418,6 +421,9 @@ ges_video_transition_create_element (GESTrackElement * object)
 
   priv->pending_type = GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE;
 
+  ges_track_element_add_children_props (GES_TRACK_ELEMENT (self),
+      priv->smpte, NULL, NULL, smpte_properties);
+
   return topbin;
 }
 
@@ -565,6 +571,8 @@ ges_video_transition_set_transition_type_internal (GESVideoTransition
  * 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.
+ *
+ * Deprecated:1.20: Use ges_timeline_element_set_child_property instead.
  */
 void
 ges_video_transition_set_border (GESVideoTransition * self, guint value)
@@ -583,6 +591,8 @@ ges_video_transition_set_border (GESVideoTransition * self, guint value)
  *
  * Returns: The border values of @self or -1 if not meaningful
  * (this will happen when not using a smpte transition).
+ *
+ * Deprecated:1.20: Use ges_timeline_element_get_child_property instead.
  */
 gint
 ges_video_transition_get_border (GESVideoTransition * self)
@@ -607,6 +617,8 @@ ges_video_transition_get_border (GESVideoTransition * self)
  * the direction of the transition. In case this value does
  * not make sense for the current transition type, it is cached
  * for later use.
+ *
+ * Deprecated:1.20: Use ges_timeline_element_set_child_property instead.
  */
 void
 ges_video_transition_set_inverted (GESVideoTransition * self, gboolean inverted)
@@ -624,6 +636,8 @@ ges_video_transition_set_inverted (GESVideoTransition * self, gboolean inverted)
  * the direction of the transition.
  *
  * Returns: The invert value of @self
+ *
+ * Deprecated:1.20: Use ges_timeline_element_get_child_property instead.
  */
 gboolean
 ges_video_transition_is_inverted (GESVideoTransition * self)
index d53fd7b..398f17d 100644 (file)
@@ -67,16 +67,16 @@ gboolean ges_video_transition_set_transition_type (GESVideoTransition * self,
 GES_API GESVideoStandardTransitionType
 ges_video_transition_get_transition_type          (GESVideoTransition * trans);
 
-GES_API
+GES_DEPRECATED_FOR(ges_timeline_element_set_children_properties)
 void ges_video_transition_set_border              (GESVideoTransition * self,
                                                          guint value);
-GES_API
+GES_DEPRECATED_FOR(ges_timeline_element_get_children_properties)
 gint ges_video_transition_get_border              (GESVideoTransition * self);
 
-GES_API
+GES_DEPRECATED_FOR(ges_timeline_element_set_children_properties)
 void ges_video_transition_set_inverted            (GESVideoTransition * self,
                                                          gboolean inverted);
-GES_API
+GES_DEPRECATED_FOR(ges_timeline_element_get_children_properties)
 gboolean ges_video_transition_is_inverted        (GESVideoTransition * self);
 
 G_END_DECLS