gst: we can now use GLib 2.24 API unconditionally

This commit is contained in:
Tim-Philipp Müller 2011-05-25 16:02:10 +01:00
parent 430e98413d
commit 8a3721a1ca
4 changed files with 1 additions and 20 deletions

View file

@ -966,12 +966,7 @@ gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs)
g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n"); g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n");
type = GST_TYPE_DATE; type = GST_TYPE_DATE;
} }
#if GLIB_CHECK_VERSION(2,23,3)
G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err); G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err);
#else
g_value_init (&value, type);
G_VALUE_COLLECT (&value, varargs, 0, &err);
#endif
if (G_UNLIKELY (err)) { if (G_UNLIKELY (err)) {
g_critical ("%s", err); g_critical ("%s", err);
return; return;

View file

@ -391,13 +391,9 @@ gst_child_proxy_set_valist (GstObject * object,
if (!gst_child_proxy_lookup (object, name, &target, &pspec)) if (!gst_child_proxy_lookup (object, name, &target, &pspec))
goto not_found; goto not_found;
#if GLIB_CHECK_VERSION(2,23,3)
G_VALUE_COLLECT_INIT (&value, pspec->value_type, var_args, G_VALUE_COLLECT_INIT (&value, pspec->value_type, var_args,
G_VALUE_NOCOPY_CONTENTS, &error); G_VALUE_NOCOPY_CONTENTS, &error);
#else
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error);
#endif
if (error) if (error)
goto cant_copy; goto cant_copy;

View file

@ -565,12 +565,7 @@ gst_structure_set_valist_internal (GstStructure * structure,
g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n"); g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n");
type = GST_TYPE_DATE; type = GST_TYPE_DATE;
} }
#if GLIB_CHECK_VERSION(2,23,3)
G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err); G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err);
#else
g_value_init (&field.value, type);
G_VALUE_COLLECT (&field.value, varargs, 0, &err);
#endif
if (G_UNLIKELY (err)) { if (G_UNLIKELY (err)) {
g_critical ("%s", err); g_critical ("%s", err);
return; return;

View file

@ -1011,12 +1011,7 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode,
g_warning ("unknown tag '%s'", tag); g_warning ("unknown tag '%s'", tag);
return; return;
} }
#if GLIB_CHECK_VERSION(2,23,3)
G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error); G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error);
#else
g_value_init (&value, info->type);
G_VALUE_COLLECT (&value, var_args, 0, &error);
#endif
if (error) { if (error) {
g_warning ("%s: %s", G_STRLOC, error); g_warning ("%s: %s", G_STRLOC, error);
g_free (error); g_free (error);