gst/gst.c: Add a check and output a g_warning when GStreamer is built against GLib 2.6 but running against 2.8 or hig...

Original commit message from CVS:
* gst/gst.c:
Add a check and output a g_warning when GStreamer is built
against GLib 2.6 but running against 2.8 or higher, and vice
versa. (Closes: #323542)
This commit is contained in:
Jan Schmidt 2006-03-03 16:58:51 +00:00
parent 88806ceb90
commit 47304efe10
2 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2006-03-03 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gst.c:
Add a check and output a g_warning when GStreamer is built
against GLib 2.6 but running against 2.8 or higher, and vice
versa. (Closes: #323542)
2006-03-03 Jan Schmidt <thaytan@mad.scientist.com>
* gst/parse/parse.l:

View file

@ -463,6 +463,23 @@ split_and_iterate (const gchar * stringlist, gchar * separator, GFunc iterator,
static gboolean
init_pre (void)
{
#ifdef GST_HAVE_GLIB_2_8
/* GStreamer was built against a GLib >= 2.8 and is therefore not doing
* the refcount hack. Check that it isn't being run against an older GLib */
if (glib_major_version < 2 ||
(glib_major_version == 2 && glib_minor_version < 8)) {
#else
/* GStreamer was built against a GLib < 2.8 and is therefore doing
* the refcount hack. Check that it isn't being run against a newer GLib */
if (glib_major_version > 2 ||
(glib_major_version == 2 && glib_minor_version >= 8)) {
#endif
g_warning ("GStreamer was compiled against GLib %d.%d.%d but is running"
" against %d.%d.%d. This will cause reference counting issues",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION,
glib_major_version, glib_minor_version, glib_micro_version);
}
g_type_init ();
if (g_thread_supported ()) {