1 /* GStreamer base plugins libraries version information
2 * Copyright (C) 2010 Tim-Philipp Müller <tim centricular net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * SECTION:gstpluginsbaseversion
22 * @short_description: GStreamer gst-plugins-base libraries version macros.
24 * Use the GST_PLUGINS_BASE_VERSION_* macros e.g. to check what version of
25 * gst-plugins-base you are building against, and gst_plugins_base_version()
26 * if you need to check at runtime what version of the gst-plugins-base
27 * libraries are being used / you are currently linked against.
29 * The version macros get defined by including <gst/pbutils/pbutils.h>.
32 #include "gstpluginsbaseversion.h"
35 * gst_plugins_base_version:
36 * @major: (out): pointer to a guint to store the major version number, or %NULL
37 * @minor: (out): pointer to a guint to store the minor version number, or %NULL
38 * @micro: (out): pointer to a guint to store the micro version number, or %NULL
39 * @nano: (out): pointer to a guint to store the nano version number, or %NULL
41 * Gets the version number of the GStreamer Plugins Base libraries.
46 gst_plugins_base_version (guint * major, guint * minor, guint * micro,
50 *major = GST_PLUGINS_BASE_VERSION_MAJOR;
52 *minor = GST_PLUGINS_BASE_VERSION_MINOR;
54 *micro = GST_PLUGINS_BASE_VERSION_MICRO;
56 *nano = GST_PLUGINS_BASE_VERSION_NANO;
60 * gst_plugins_base_version_string:
62 * This function returns a string that is useful for describing this version
63 * of GStreamer's gst-plugins-base libraries to the outside world: user agent
64 * strings, logging, about dialogs ...
66 * Returns: a newly allocated string describing this version of gst-plugins-base
71 gst_plugins_base_version_string (void)
73 return g_strdup_printf ("GStreamer Base Plugins %d.%d.%d%s",
74 GST_PLUGINS_BASE_VERSION_MAJOR, GST_PLUGINS_BASE_VERSION_MINOR,
75 GST_PLUGINS_BASE_VERSION_MICRO,
76 ((GST_PLUGINS_BASE_VERSION_NANO == 0) ? "" :
77 ((GST_PLUGINS_BASE_VERSION_NANO == 1) ? " (GIT)" : " (prerelease)")));