Commit 82159882 authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

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 #86
parent 000edd26
Pipeline #106357 passed with stages
in 164 minutes
......@@ -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)
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment