From 82159882d73e86a1fa0d0c908ea66b8d9c85b1cc Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 7 Feb 2020 09:39:39 -0300 Subject: [PATCH] ges: Ignore deprecation of GParameter GParameter is part of our API, and for GLib < 2.54 we do not even have a way around avoiding it (namely `g_object_new_with_properties`). We should stop using GParameter once we depend on GLib 2.54. Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/86 --- ges/ges-asset.c | 3 +++ ges/ges-effect-clip.c | 3 +++ ges/ges-effect.c | 3 +++ ges/ges-extractable.c | 5 +++++ ges/ges-extractable.h | 2 ++ ges/ges-internal.h | 3 +++ ges/ges-timeline-element.c | 3 +++ ges/ges-transition-clip.c | 3 +++ ges/ges-uri-clip.c | 4 ++++ 9 files changed, 29 insertions(+) diff --git a/ges/ges-asset.c b/ges/ges-asset.c index 5971b484aa..d801a2335e 100644 --- a/ges/ges-asset.c +++ b/ges/ges-asset.c @@ -286,6 +286,7 @@ ges_asset_start_loading_default (GESAsset * asset, GError ** error) return GES_ASSET_LOADING_OK; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; static GESExtractable * ges_asset_extract_default (GESAsset * asset, GError ** error) { @@ -330,6 +331,8 @@ ges_asset_extract_default (GESAsset * asset, GError ** error) return n_extractable; } +G_GNUC_END_IGNORE_DEPRECATIONS; + static gboolean ges_asset_request_id_update_default (GESAsset * self, gchar ** proposed_new_id, GError * error) diff --git a/ges/ges-effect-clip.c b/ges/ges-effect-clip.c index 32e961595d..7bfd46ad4e 100644 --- a/ges/ges-effect-clip.c +++ b/ges/ges-effect-clip.c @@ -63,6 +63,7 @@ static void ges_effect_clip_finalize (GObject * object); static GESTrackElement *_create_track_element (GESClip * self, GESTrackType type); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ static GParameter * extractable_get_parameters_from_id (const gchar * id, guint * n_params) { @@ -103,6 +104,8 @@ extractable_get_parameters_from_id (const gchar * id, guint * n_params) return params; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ + static gchar * extractable_check_id (GType type, const gchar * id, GError ** error) { diff --git a/ges/ges-effect.c b/ges/ges-effect.c index 3dd08a711b..9d69ee50c3 100644 --- a/ges/ges-effect.c +++ b/ges/ges-effect.c @@ -84,6 +84,7 @@ extractable_check_id (GType type, const gchar * id, GError ** error) return real_id; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ static GParameter * extractable_get_parameters_from_id (const gchar * id, guint * n_params) { @@ -107,6 +108,8 @@ extractable_get_parameters_from_id (const gchar * id, guint * n_params) return params; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ + static gchar * extractable_get_id (GESExtractable * self) { diff --git a/ges/ges-extractable.c b/ges/ges-extractable.c index 9d7d3f1349..0c75986d5d 100644 --- a/ges/ges-extractable.c +++ b/ges/ges-extractable.c @@ -52,6 +52,7 @@ ges_extractable_get_real_extractable_type_default (GType type, const gchar * id) return type; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ static GParameter * extractable_get_parameters_from_id (const gchar * id, guint * n_params) { @@ -60,6 +61,7 @@ extractable_get_parameters_from_id (const gchar * id, guint * n_params) return NULL; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ static gchar * extractable_get_id (GESExtractable * self) { @@ -152,6 +154,7 @@ ges_extractable_get_id (GESExtractable * self) return GES_EXTRACTABLE_GET_INTERFACE (self)->get_id (self); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ /** * ges_extractable_type_get_parameters_for_id: * @type: The #GType implementing #GESExtractable @@ -183,6 +186,8 @@ ges_extractable_type_get_parameters_from_id (GType type, const gchar * id, return ret; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ + /** * ges_extractable_type_get_asset_type: * @type: The #GType implementing #GESExtractable diff --git a/ges/ges-extractable.h b/ges/ges-extractable.h index 334783003d..fc99b65bc0 100644 --- a/ges/ges-extractable.h +++ b/ges/ges-extractable.h @@ -55,6 +55,7 @@ typedef gchar* (*GESExtractableCheckId) (GType type, const gchar *id, /** * GESExtractable: */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS struct _GESExtractableInterface { GTypeInterface parent; @@ -84,6 +85,7 @@ struct _GESExtractableInterface gpointer _ges_reserved[GES_PADDING]; }; +G_GNUC_END_IGNORE_DEPRECATIONS GES_API GESAsset* ges_extractable_get_asset (GESExtractable *self); diff --git a/ges/ges-internal.h b/ges/ges-internal.h index b5dfa472a3..a620aa969f 100644 --- a/ges/ges-internal.h +++ b/ges/ges-internal.h @@ -198,9 +198,12 @@ ges_extractable_type_get_asset_type (GType type); G_GNUC_INTERNAL gchar * ges_extractable_type_check_id (GType type, const gchar *id, GError **error); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; G_GNUC_INTERNAL GParameter * ges_extractable_type_get_parameters_from_id (GType type, const gchar *id, guint *n_params); +G_GNUC_END_IGNORE_DEPRECATIONS; + G_GNUC_INTERNAL GType ges_extractable_get_real_extractable_type_for_id (GType type, const gchar * id); diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index 8dedee7d3b..4764cee2ff 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -1214,6 +1214,7 @@ ges_timeline_element_trim (GESTimelineElement * self, GstClockTime start) * * Returns: (transfer floating): The newly create #GESTimelineElement, copied from @self */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ GESTimelineElement * ges_timeline_element_copy (GESTimelineElement * self, gboolean deep) { @@ -1295,6 +1296,8 @@ ges_timeline_element_copy (GESTimelineElement * self, gboolean deep) return ret; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ + /** * ges_timeline_element_get_toplevel_parent: * @self: The #GESTimelineElement to get the toplevel parent from diff --git a/ges/ges-transition-clip.c b/ges/ges-transition-clip.c index c405cc3db4..d0fb494f90 100644 --- a/ges/ges-transition-clip.c +++ b/ges/ges-transition-clip.c @@ -108,12 +108,14 @@ ges_transition_clip_update_vtype_internal (GESClip * } /* GESExtractable interface overrides */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ static GParameter * extractable_get_parameters_from_id (const gchar * id, guint * n_params) { GEnumClass *enum_class = g_type_class_peek (GES_VIDEO_STANDARD_TRANSITION_TYPE_TYPE); GParameter *params = g_new0 (GParameter, 1); + GEnumValue *value = g_enum_get_value_by_nick (enum_class, id); params[0].name = "vtype"; @@ -124,6 +126,7 @@ extractable_get_parameters_from_id (const gchar * id, guint * n_params) return params; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ static gchar * extractable_check_id (GType type, const gchar * id) { diff --git a/ges/ges-uri-clip.c b/ges/ges-uri-clip.c index d7d44eb4d0..8ec8085715 100644 --- a/ges/ges-uri-clip.c +++ b/ges/ges-uri-clip.c @@ -242,6 +242,8 @@ extractable_check_id (GType type, const gchar * id) return NULL; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Start ignoring GParameter deprecation */ + static GParameter * extractable_get_parameters_from_id (const gchar * id, guint * n_params) { @@ -256,6 +258,8 @@ extractable_get_parameters_from_id (const gchar * id, guint * n_params) return params; } +G_GNUC_END_IGNORE_DEPRECATIONS; /* End ignoring GParameter deprecation */ + static gchar * extractable_get_id (GESExtractable * self) {