#include "ges.h"
#include "ges-internal.h"
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <gst/gst.h>
GST_DEBUG_CATEGORY_STATIC (ges_asset_debug);
GESAssetPrivate *priv = asset->priv;
GESExtractable *n_extractable;
+
params = ges_extractable_type_get_parameters_from_id (priv->extractable_type,
priv->id, &n_params);
+#if GLIB_CHECK_VERSION(2, 53, 1)
+ {
+ gint i;
+ GValue *values;
+ const gchar **names;
+
+ values = g_malloc0 (sizeof (GValue) * n_params);
+ names = g_malloc0 (sizeof (gchar **) * n_params);
+
+ for (i = 0; i < n_params; i++) {
+ values[i] = params[i].value;
+ names[i] = params[i].name;
+ }
+
+ n_extractable =
+ GES_EXTRACTABLE (g_object_new_with_properties (priv->extractable_type,
+ n_params, names, values));
+ g_free (names);
+ g_free (values);
+ }
+#else
n_extractable = g_object_newv (priv->extractable_type, n_params, params);
+#endif
while (n_params--)
g_value_unset (¶ms[n_params].value);
- if (params)
- g_free (params);
+
+ g_free (params);
return n_extractable;
}
}
}
+#if GLIB_CHECK_VERSION(2, 53, 1)
+ {
+ gint i;
+ GValue *values;
+ const gchar **names;
+ values = g_malloc0 (sizeof (GValue) * n_specs);
+ names = g_malloc0 (sizeof (gchar **) * n_specs);
+
+ for (i = 0; i < n_params; i++) {
+ values[i] = params[i].value;
+ names[i] = params[i].name;
+ }
+
+ ret =
+ GES_TIMELINE_ELEMENT (g_object_new_with_properties (G_OBJECT_TYPE
+ (self), n_params, names, values));
+ g_free (names);
+ g_free (values);
+ }
+#else
ret = g_object_newv (G_OBJECT_TYPE (self), n_params, params);
+#endif
+
+ while (n_params--)
+ g_value_unset (¶ms[n_params].value);
g_free (specs);
g_free (params);