From: <sl...@ke...> - 2008-04-01 13:55:29
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: slomo Date: Tue Apr 01 2008 13:55:35 UTC Log message: * 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. Modified files: . : ChangeLog configure.ac gst : glib-compat-private.h gstcaps.c gstclock.c gstpoll.c gstsegment.c gststructure.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.3739&r2=1.3740 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/configure.ac.diff?r1=1.537&r2=1.538 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/glib-compat-private.h.diff?r1=1.3&r2=1.4 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcaps.c.diff?r1=1.184&r2=1.185 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstclock.c.diff?r1=1.103&r2=1.104 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpoll.c.diff?r1=1.5&r2=1.6 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstsegment.c.diff?r1=1.30&r2=1.31 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gststructure.c.diff?r1=1.97&r2=1.98 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.3739 retrieving revision 1.3740 diff -u -d -r1.3739 -r1.3740 --- ChangeLog 1 Apr 2008 13:48:57 -0000 1.3739 +++ ChangeLog 1 Apr 2008 13:55:18 -0000 1.3740 @@ -1,5 +1,21 @@ 2008-04-01 Sebastian Dröge <sl...@ci...> + * 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 <sl...@ci...> * gst/parse/Makefile.am: * gst/parse/grammar.tab.pre.c: * gst/parse/grammar.tab.pre.h: Index: configure.ac RCS file: /cvs/gstreamer/gstreamer/configure.ac,v retrieving revision 1.537 retrieving revision 1.538 diff -u -d -r1.537 -r1.538 --- configure.ac 1 Apr 2008 10:25:35 -0000 1.537 +++ configure.ac 1 Apr 2008 13:55:19 -0000 1.538 @@ -471,8 +471,9 @@ dnl *** checks for dependency libraries *** 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 GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1" Index: glib-compat-private.h RCS file: /cvs/gstreamer/gstreamer/gst/glib-compat-private.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- glib-compat-private.h 19 Sep 2007 13:28:34 -0000 1.3 +++ glib-compat-private.h 1 Apr 2008 13:55:20 -0000 1.4 @@ -14,9 +14,4 @@ /* 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 Index: gstcaps.c RCS file: /cvs/gstreamer/gstreamer/gst/gstcaps.c,v retrieving revision 1.184 retrieving revision 1.185 diff -u -d -r1.184 -r1.185 --- gstcaps.c 24 Mar 2008 10:33:41 -0000 1.184 +++ gstcaps.c 1 Apr 2008 13:55:20 -0000 1.185 @@ -91,14 +91,6 @@ #define IS_WRITABLE(caps) \ (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) /* lock to protect multiple invocations of static caps to caps conversion */ G_LOCK_DEFINE_STATIC (static_caps_lock); @@ -139,7 +131,7 @@ GstCaps * gst_caps_new_empty (void) { - GstCaps *caps = ALLOC_CAPS (); + GstCaps *caps = g_slice_new (GstCaps); caps->type = GST_TYPE_CAPS; caps->refcount = 1; @@ -309,7 +301,7 @@ #ifdef DEBUG_REFCOUNT GST_CAT_LOG (GST_CAT_CAPS, "freeing caps %p", caps); #endif - FREE_CAPS (caps); + g_slice_free (GstCaps, caps); } /** Index: gstclock.c RCS file: /cvs/gstreamer/gstreamer/gst/gstclock.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- gstclock.c 22 Mar 2008 14:56:12 -0000 1.103 +++ gstclock.c 1 Apr 2008 13:55:20 -0000 1.104 @@ -116,14 +116,6 @@ static GstAllocTrace *_gst_clock_entry_trace; -#define ALLOC_ENTRY() g_slice_new (GstClockEntry) -#define FREE_ENTRY(entry) g_slice_free (GstClockEntry, entry) -#define ALLOC_ENTRY() g_new (GstClockEntry, 1) -#define FREE_ENTRY(entry) g_free (entry) /* #define DEBUGGING_ENABLED */ #define DEFAULT_STATS FALSE @@ -162,7 +154,7 @@ GstClockEntry *entry; - entry = ALLOC_ENTRY (); + entry = g_slice_new (GstClockEntry); #ifndef GST_DISABLE_TRACE gst_alloc_trace_new (_gst_clock_entry_trace, entry); @@ -211,7 +203,7 @@ gst_alloc_trace_free (_gst_clock_entry_trace, id); - FREE_ENTRY (id); + g_slice_free (GstClockEntry, id); Index: gstpoll.c RCS file: /cvs/gstreamer/gstreamer/gst/gstpoll.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstpoll.c 18 Mar 2008 10:54:52 -0000 1.5 +++ gstpoll.c 1 Apr 2008 13:55:20 -0000 1.6 @@ -462,7 +462,7 @@ GstPoll *nset; - nset = g_new0 (GstPoll, 1); + nset = g_slice_new0 (GstPoll); nset->lock = g_mutex_new (); #ifndef G_OS_WIN32 nset->mode = GST_POLL_MODE_AUTO; @@ -530,7 +530,7 @@ g_array_free (set->active_fds, TRUE); g_array_free (set->fds, TRUE); g_mutex_free (set->lock); - g_free (set); + g_slice_free (GstPoll, set); Index: gstsegment.c RCS file: /cvs/gstreamer/gstreamer/gst/gstsegment.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- gstsegment.c 29 Feb 2008 15:22:34 -0000 1.30 +++ gstsegment.c 1 Apr 2008 13:55:20 -0000 1.31 @@ -121,7 +121,7 @@ GstSegment *result; - result = g_new0 (GstSegment, 1); + result = g_slice_new0 (GstSegment); gst_segment_init (result, GST_FORMAT_UNDEFINED); return result; @@ -136,7 +136,7 @@ void gst_segment_free (GstSegment * segment) - g_free (segment); + g_slice_free (GstSegment, segment); Index: gststructure.c RCS file: /cvs/gstreamer/gstreamer/gst/gststructure.c,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- gststructure.c 3 Mar 2008 10:07:21 -0000 1.97 +++ gststructure.c 1 Apr 2008 13:55:20 -0000 1.98 @@ -113,7 +113,7 @@ GstStructure *structure; - structure = g_new0 (GstStructure, 1); + structure = g_slice_new0 (GstStructure); structure->type = gst_structure_get_type (); structure->name = quark; structure->fields = @@ -330,7 +330,7 @@ #ifdef USE_POISONING memset (structure, 0xff, sizeof (GstStructure)); - g_free (structure); + g_slice_free (GstStructure, structure); |