From: Thibault Saunier Date: Fri, 7 Feb 2020 12:39:39 +0000 (-0300) Subject: ges: Ignore deprecation of GParameter X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82159882d73e86a1fa0d0c908ea66b8d9c85b1cc;p=platform%2Fupstream%2Fgst-editing-services.git 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 --- diff --git a/ges/ges-asset.c b/ges/ges-asset.c index 5971b48..d801a23 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 32e9615..7bfd46a 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 3dd08a7..9d69ee5 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 9d7d3f1..0c75986 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 3347830..fc99b65 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 b5dfa47..a620aa9 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 8dedee7..4764cee 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 c405cc3..d0fb494 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 d7d44eb..8ec8085 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) {