mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
configure.ac: Require GLib 2.12.
Original commit message from CVS: * configure.ac: Require GLib 2.12. * gst/glib-compat-private.h: * gst/gstcaps.c: (gst_caps_new_empty), (_gst_caps_free): * gst/gstclock.c: (gst_clock_entry_new), (_gst_clock_id_free): Unconditionally use GSlice for allocation. * gst/gstpoll.c: (gst_poll_new), (gst_poll_free): * gst/gstsegment.c: (gst_segment_new), (gst_segment_free): * gst/gststructure.c: (gst_structure_id_empty_new_with_size), (gst_structure_free): Use GSlice for allocation.
This commit is contained in:
parent
91ba942748
commit
1e0128c47e
8 changed files with 28 additions and 32 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
||||||
|
2008-04-01 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
Require GLib 2.12.
|
||||||
|
|
||||||
|
* gst/glib-compat-private.h:
|
||||||
|
* gst/gstcaps.c: (gst_caps_new_empty), (_gst_caps_free):
|
||||||
|
* gst/gstclock.c: (gst_clock_entry_new), (_gst_clock_id_free):
|
||||||
|
Unconditionally use GSlice for allocation.
|
||||||
|
|
||||||
|
* gst/gstpoll.c: (gst_poll_new), (gst_poll_free):
|
||||||
|
* gst/gstsegment.c: (gst_segment_new), (gst_segment_free):
|
||||||
|
* gst/gststructure.c: (gst_structure_id_empty_new_with_size),
|
||||||
|
(gst_structure_free):
|
||||||
|
Use GSlice for allocation.
|
||||||
|
|
||||||
2008-04-01 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-04-01 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* gst/parse/Makefile.am:
|
* gst/parse/Makefile.am:
|
||||||
|
|
|
@ -471,8 +471,9 @@ LIBS="$save_libs"
|
||||||
dnl *** checks for dependency libraries ***
|
dnl *** checks for dependency libraries ***
|
||||||
|
|
||||||
dnl GLib
|
dnl GLib
|
||||||
|
GLIB_REQ=2.12
|
||||||
|
|
||||||
AG_GST_GLIB_CHECK([2.8])
|
AG_GST_GLIB_CHECK([$GLIB_REQ])
|
||||||
|
|
||||||
dnl FIXME: 0.11: Guess we need to keep this around until 0.11
|
dnl FIXME: 0.11: Guess we need to keep this around until 0.11
|
||||||
GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
|
GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
|
||||||
|
|
|
@ -14,9 +14,4 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
/* adaptations */
|
/* adaptations */
|
||||||
|
|
||||||
/* FIXME: remove once we depend on GLib 2.10 */
|
|
||||||
#if (!GLIB_CHECK_VERSION (2, 10, 0))
|
|
||||||
#define g_intern_string(s) g_quark_to_string(g_quark_from_string(s))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -91,14 +91,6 @@
|
||||||
#define IS_WRITABLE(caps) \
|
#define IS_WRITABLE(caps) \
|
||||||
(g_atomic_int_get (&(caps)->refcount) == 1)
|
(g_atomic_int_get (&(caps)->refcount) == 1)
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 10, 0)
|
|
||||||
#define ALLOC_CAPS() g_slice_new (GstCaps)
|
|
||||||
#define FREE_CAPS(caps) g_slice_free (GstCaps, caps)
|
|
||||||
#else
|
|
||||||
#define ALLOC_CAPS() g_new (GstCaps, 1)
|
|
||||||
#define FREE_CAPS(caps) g_free (caps)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* lock to protect multiple invocations of static caps to caps conversion */
|
/* lock to protect multiple invocations of static caps to caps conversion */
|
||||||
G_LOCK_DEFINE_STATIC (static_caps_lock);
|
G_LOCK_DEFINE_STATIC (static_caps_lock);
|
||||||
|
|
||||||
|
@ -139,7 +131,7 @@ gst_caps_get_type (void)
|
||||||
GstCaps *
|
GstCaps *
|
||||||
gst_caps_new_empty (void)
|
gst_caps_new_empty (void)
|
||||||
{
|
{
|
||||||
GstCaps *caps = ALLOC_CAPS ();
|
GstCaps *caps = g_slice_new (GstCaps);
|
||||||
|
|
||||||
caps->type = GST_TYPE_CAPS;
|
caps->type = GST_TYPE_CAPS;
|
||||||
caps->refcount = 1;
|
caps->refcount = 1;
|
||||||
|
@ -309,7 +301,7 @@ _gst_caps_free (GstCaps * caps)
|
||||||
#ifdef DEBUG_REFCOUNT
|
#ifdef DEBUG_REFCOUNT
|
||||||
GST_CAT_LOG (GST_CAT_CAPS, "freeing caps %p", caps);
|
GST_CAT_LOG (GST_CAT_CAPS, "freeing caps %p", caps);
|
||||||
#endif
|
#endif
|
||||||
FREE_CAPS (caps);
|
g_slice_free (GstCaps, caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -116,14 +116,6 @@
|
||||||
static GstAllocTrace *_gst_clock_entry_trace;
|
static GstAllocTrace *_gst_clock_entry_trace;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 10, 0)
|
|
||||||
#define ALLOC_ENTRY() g_slice_new (GstClockEntry)
|
|
||||||
#define FREE_ENTRY(entry) g_slice_free (GstClockEntry, entry)
|
|
||||||
#else
|
|
||||||
#define ALLOC_ENTRY() g_new (GstClockEntry, 1)
|
|
||||||
#define FREE_ENTRY(entry) g_free (entry)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* #define DEBUGGING_ENABLED */
|
/* #define DEBUGGING_ENABLED */
|
||||||
|
|
||||||
#define DEFAULT_STATS FALSE
|
#define DEFAULT_STATS FALSE
|
||||||
|
@ -162,7 +154,7 @@ gst_clock_entry_new (GstClock * clock, GstClockTime time,
|
||||||
{
|
{
|
||||||
GstClockEntry *entry;
|
GstClockEntry *entry;
|
||||||
|
|
||||||
entry = ALLOC_ENTRY ();
|
entry = g_slice_new (GstClockEntry);
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
gst_alloc_trace_new (_gst_clock_entry_trace, entry);
|
gst_alloc_trace_new (_gst_clock_entry_trace, entry);
|
||||||
#endif
|
#endif
|
||||||
|
@ -211,7 +203,7 @@ _gst_clock_id_free (GstClockID id)
|
||||||
#ifndef GST_DISABLE_TRACE
|
#ifndef GST_DISABLE_TRACE
|
||||||
gst_alloc_trace_free (_gst_clock_entry_trace, id);
|
gst_alloc_trace_free (_gst_clock_entry_trace, id);
|
||||||
#endif
|
#endif
|
||||||
FREE_ENTRY (id);
|
g_slice_free (GstClockEntry, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -462,7 +462,7 @@ gst_poll_new (gboolean controllable)
|
||||||
{
|
{
|
||||||
GstPoll *nset;
|
GstPoll *nset;
|
||||||
|
|
||||||
nset = g_new0 (GstPoll, 1);
|
nset = g_slice_new0 (GstPoll);
|
||||||
nset->lock = g_mutex_new ();
|
nset->lock = g_mutex_new ();
|
||||||
#ifndef G_OS_WIN32
|
#ifndef G_OS_WIN32
|
||||||
nset->mode = GST_POLL_MODE_AUTO;
|
nset->mode = GST_POLL_MODE_AUTO;
|
||||||
|
@ -530,7 +530,7 @@ gst_poll_free (GstPoll * set)
|
||||||
g_array_free (set->active_fds, TRUE);
|
g_array_free (set->active_fds, TRUE);
|
||||||
g_array_free (set->fds, TRUE);
|
g_array_free (set->fds, TRUE);
|
||||||
g_mutex_free (set->lock);
|
g_mutex_free (set->lock);
|
||||||
g_free (set);
|
g_slice_free (GstPoll, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -121,7 +121,7 @@ gst_segment_new (void)
|
||||||
{
|
{
|
||||||
GstSegment *result;
|
GstSegment *result;
|
||||||
|
|
||||||
result = g_new0 (GstSegment, 1);
|
result = g_slice_new0 (GstSegment);
|
||||||
gst_segment_init (result, GST_FORMAT_UNDEFINED);
|
gst_segment_init (result, GST_FORMAT_UNDEFINED);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -136,7 +136,7 @@ gst_segment_new (void)
|
||||||
void
|
void
|
||||||
gst_segment_free (GstSegment * segment)
|
gst_segment_free (GstSegment * segment)
|
||||||
{
|
{
|
||||||
g_free (segment);
|
g_slice_free (GstSegment, segment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -113,7 +113,7 @@ gst_structure_id_empty_new_with_size (GQuark quark, guint prealloc)
|
||||||
{
|
{
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
|
|
||||||
structure = g_new0 (GstStructure, 1);
|
structure = g_slice_new0 (GstStructure);
|
||||||
structure->type = gst_structure_get_type ();
|
structure->type = gst_structure_get_type ();
|
||||||
structure->name = quark;
|
structure->name = quark;
|
||||||
structure->fields =
|
structure->fields =
|
||||||
|
@ -330,7 +330,7 @@ gst_structure_free (GstStructure * structure)
|
||||||
#ifdef USE_POISONING
|
#ifdef USE_POISONING
|
||||||
memset (structure, 0xff, sizeof (GstStructure));
|
memset (structure, 0xff, sizeof (GstStructure));
|
||||||
#endif
|
#endif
|
||||||
g_free (structure);
|
g_slice_free (GstStructure, structure);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue