Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We can't change most of
these in 0.10 because they're part of our API and ABI.
See #651514 for details. It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new. Thus, macros and a version check.
Original commit message from CVS:
* gst/glib-compat-private.h:
Add compatibility macro for g_intern_string() for
GLib-2.8 (any reason we can't just bump the
requirement to at least 2.10?)
* gst/gstpadtemplate.h:
* gst/gstelementfactory.c:
* gst/gstregistryxml.c:
* gst/gstregistrybinary.c:
Make GstStaticPadTemplate's templ_name field a const gchar * and fix
up the internal code accordingly. This shouldn't be a problem, since
there is no reason external code could ever assume the string in such
a structure is dynamically allocated unless it did that itself; the
use of g_strdup() is private to element factories. The new code also
saves some memory by putting pad template name strings into the GLib
quark table instead of allocating them dynamically.
Declaring this field constant fixes warnings with g++-4.2 when using
the GST_STATIC_PAD_TEMPLATE macro in c++ code (#478092).
Original commit message from CVS:
2005-11-21 Andy Wingo <wingo@pobox.com>
* gst/gst.h: Include glib-compat.h.
* gst/glib-compat.h: Add G_GNUC_NULL_TERMINATED.
* gst/glib-compat.c: Include the public and the private header.
* gst/glib-compat-private.h: Copied here from glib-compat.h.
* gst/gstvalue.c:
* gst/gstpad.c:
* gst/gstregistryxml.c: s/glib-compat/glib-compat-private/.