gst/gstutils.*: API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used now that we depend on new enou...

Original commit message from CVS:
* gst/gstutils.c:
* gst/gstutils.h:
API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used
now that we depend on new enough GLib.
* gst/gstcaps.c: (gst_static_caps_get):
* gst/gstclock.c: (gst_clock_entry_new):
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_set_colored),
(gst_debug_set_default_threshold), (_gst_debug_category_new),
(gst_debug_category_set_threshold):
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_set_qos_enabled):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Use g_atomic_int_set() instead of gst_atomic_int_set().
This commit is contained in:
Sebastian Dröge 2008-04-17 07:14:46 +00:00
parent 2f6b52d6f3
commit 3e914a83b3
8 changed files with 37 additions and 12 deletions

View file

@ -1,3 +1,21 @@
2008-04-17 Sebastian Dröge <slomo@circular-chaos.org>
* gst/gstutils.c:
* gst/gstutils.h:
API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used
now that we depend on new enough GLib.
* gst/gstcaps.c: (gst_static_caps_get):
* gst/gstclock.c: (gst_clock_entry_new):
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_set_colored),
(gst_debug_set_default_threshold), (_gst_debug_category_new),
(gst_debug_category_set_threshold):
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_set_qos_enabled):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Use g_atomic_int_set() instead of gst_atomic_int_set().
2008-04-16 Stefan Kost <ensonic@users.sf.net>
* gst/gstquery.c:

View file

@ -453,7 +453,7 @@ gst_static_caps_get (GstStaticCaps * static_caps)
/* initialize the caps to a refcount of 1 so the caps can be writable for
* the next statement */
gst_atomic_int_set (&temp.refcount, 1);
g_atomic_int_set (&temp.refcount, 1);
/* convert to string */
if (G_UNLIKELY (!gst_caps_from_string_inplace (&temp, string)))
@ -464,7 +464,7 @@ gst_static_caps_get (GstStaticCaps * static_caps)
caps->flags = temp.flags;
caps->structs = temp.structs;
/* and bump the refcount so other threads can now read */
gst_atomic_int_set (&caps->refcount, 1);
g_atomic_int_set (&caps->refcount, 1);
GST_CAT_LOG (GST_CAT_CAPS, "created %p", static_caps);
done:

View file

@ -161,7 +161,7 @@ gst_clock_entry_new (GstClock * clock, GstClockTime time,
GST_CAT_DEBUG_OBJECT (GST_CAT_CLOCK, clock,
"created entry %p, time %" GST_TIME_FORMAT, entry, GST_TIME_ARGS (time));
gst_atomic_int_set (&entry->refcount, 1);
g_atomic_int_set (&entry->refcount, 1);
entry->clock = clock;
entry->type = type;
entry->time = time;

View file

@ -277,8 +277,8 @@ _priv_gst_in_valgrind (void)
void
_gst_debug_init (void)
{
gst_atomic_int_set (&__default_level, GST_LEVEL_DEFAULT);
gst_atomic_int_set (&__use_color, 1);
g_atomic_int_set (&__default_level, GST_LEVEL_DEFAULT);
g_atomic_int_set (&__use_color, 1);
/* get time we started for debugging messages */
_priv_gst_info_start_time = gst_util_get_timestamp ();
@ -847,7 +847,7 @@ gst_debug_remove_log_function_by_data (gpointer data)
void
gst_debug_set_colored (gboolean colored)
{
gst_atomic_int_set (&__use_color, colored ? 1 : 0);
g_atomic_int_set (&__use_color, colored ? 1 : 0);
}
/**
@ -906,7 +906,7 @@ gst_debug_is_active (void)
void
gst_debug_set_default_threshold (GstDebugLevel level)
{
gst_atomic_int_set (&__default_level, level);
g_atomic_int_set (&__default_level, level);
gst_debug_reset_all_thresholds ();
}
@ -1044,7 +1044,7 @@ _gst_debug_category_new (const gchar * name, guint color,
} else {
cat->description = g_strdup ("no description");
}
gst_atomic_int_set (&cat->threshold, 0);
g_atomic_int_set (&cat->threshold, 0);
gst_debug_reset_threshold (cat, NULL);
/* add to category list */
@ -1102,7 +1102,7 @@ gst_debug_category_set_threshold (GstDebugCategory * category,
__gst_debug_min = level;
}
gst_atomic_int_set (&category->threshold, level);
g_atomic_int_set (&category->threshold, level);
}
/**

View file

@ -2828,7 +2828,11 @@ gst_pad_query_peer_convert (GstPad * pad, GstFormat src_format, gint64 src_val,
* @value: value to set
*
* Unconditionally sets the atomic integer to @value.
*
* Deprecated: Use g_atomic_int_set().
*
*/
#ifndef GST_REMOVE_DEPRECATED
void
gst_atomic_int_set (gint * atomic_int, gint value)
{
@ -2838,6 +2842,7 @@ gst_atomic_int_set (gint * atomic_int, gint value)
/* read acts as a memory barrier */
ignore = g_atomic_int_get (atomic_int);
}
#endif
/**
* gst_pad_add_data_probe:

View file

@ -661,7 +661,9 @@ void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src);
#endif /* GST_DISABLE_DEPRECATED */
/* atomic functions */
#ifndef GST_DISABLE_DEPRECATED
void gst_atomic_int_set (gint * atomic_int, gint value);
#endif
/* probes */
gulong gst_pad_add_data_probe (GstPad * pad,

View file

@ -548,7 +548,7 @@ gst_base_sink_init (GstBaseSink * basesink, gpointer g_class)
basesink->sync = DEFAULT_SYNC;
basesink->abidata.ABI.max_lateness = DEFAULT_MAX_LATENESS;
gst_atomic_int_set (&priv->qos_enabled, DEFAULT_QOS);
g_atomic_int_set (&priv->qos_enabled, DEFAULT_QOS);
priv->async_enabled = DEFAULT_ASYNC;
priv->ts_offset = DEFAULT_TS_OFFSET;
@ -679,7 +679,7 @@ gst_base_sink_set_qos_enabled (GstBaseSink * sink, gboolean enabled)
{
g_return_if_fail (GST_IS_BASE_SINK (sink));
gst_atomic_int_set (&sink->priv->qos_enabled, enabled);
g_atomic_int_set (&sink->priv->qos_enabled, enabled);
}
/**

View file

@ -314,7 +314,7 @@ gst_net_time_provider_set_property (GObject * object, guint prop_id,
(GstObject *) g_value_get_object (value));
break;
case PROP_ACTIVE:
gst_atomic_int_set (&self->active.active, g_value_get_boolean (value));
g_atomic_int_set (&self->active.active, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);