X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=gst-plugins-base-subtitles0.10%2Fgst-libs%2Fgst%2Fpbutils%2Fgstpluginsbaseversion.c;fp=gst-plugins-base-subtitles0.10%2Fgst-libs%2Fgst%2Fpbutils%2Fgstpluginsbaseversion.c;h=997a0b8363b3c7249261d3d0c30591e257dcadf6;hb=57ba96e291a055f69dbfd4ae9f1ae2390e36986e;hp=0000000000000000000000000000000000000000;hpb=be2c98fb83895d10ac44af7b9a9c3e00ca54bf49;p=mafwsubrenderer diff --git a/gst-plugins-base-subtitles0.10/gst-libs/gst/pbutils/gstpluginsbaseversion.c b/gst-plugins-base-subtitles0.10/gst-libs/gst/pbutils/gstpluginsbaseversion.c new file mode 100644 index 0000000..997a0b8 --- /dev/null +++ b/gst-plugins-base-subtitles0.10/gst-libs/gst/pbutils/gstpluginsbaseversion.c @@ -0,0 +1,78 @@ +/* GStreamer base plugins libraries version information + * Copyright (C) 2010 Tim-Philipp Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:gstpluginsbaseversion + * @short_description: GStreamer gst-plugins-base libraries version macros. + * + * Use the GST_PLUGINS_BASE_VERSION_* macros e.g. to check what version of + * gst-plugins-base you are building against, and gst_plugins_base_version() + * if you need to check at runtime what version of the gst-plugins-base + * libraries are being used / you are currently linked against. + * + * The version macros get defined by including . + */ + +#include "gstpluginsbaseversion.h" + +/** + * gst_plugins_base_version: + * @major: (out): pointer to a guint to store the major version number, or %NULL + * @minor: (out): pointer to a guint to store the minor version number, or %NULL + * @micro: (out): pointer to a guint to store the micro version number, or %NULL + * @nano: (out): pointer to a guint to store the nano version number, or %NULL + * + * Gets the version number of the GStreamer Plugins Base libraries. + * + * Since: 0.10.31 + */ +void +gst_plugins_base_version (guint * major, guint * minor, guint * micro, + guint * nano) +{ + if (major) + *major = GST_PLUGINS_BASE_VERSION_MAJOR; + if (minor) + *minor = GST_PLUGINS_BASE_VERSION_MINOR; + if (micro) + *micro = GST_PLUGINS_BASE_VERSION_MICRO; + if (nano) + *nano = GST_PLUGINS_BASE_VERSION_NANO; +} + +/** + * gst_plugins_base_version_string: + * + * This function returns a string that is useful for describing this version + * of GStreamer's gst-plugins-base libraries to the outside world: user agent + * strings, logging, about dialogs ... + * + * Returns: a newly allocated string describing this version of gst-plugins-base + * + * Since: 0.10.31 + */ +gchar * +gst_plugins_base_version_string (void) +{ + return g_strdup_printf ("GStreamer Base Plugins %d.%d.%d%s", + GST_PLUGINS_BASE_VERSION_MAJOR, GST_PLUGINS_BASE_VERSION_MINOR, + GST_PLUGINS_BASE_VERSION_MICRO, + ((GST_PLUGINS_BASE_VERSION_NANO == 0) ? "" : + ((GST_PLUGINS_BASE_VERSION_NANO == 1) ? " (GIT)" : " (prerelease)"))); +}