Coverage Report

Created: 2026-01-22 06:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gstreamer/subprojects/gst-plugins-base/gst-libs/gst/pbutils/gstpluginsbaseversion.c
Line
Count
Source
1
/* GStreamer base plugins libraries version information
2
 * Copyright (C) 2010 Tim-Philipp Müller <tim centricular net>
3
 *
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.
8
 *
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.
13
 *
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., 51 Franklin St, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 */
19
20
/**
21
 * SECTION:gstpluginsbaseversion
22
 * @title: Version
23
 * @short_description: GStreamer gst-plugins-base libraries version macros.
24
 *
25
 * Use the GST_PLUGINS_BASE_VERSION_* macros e.g. to check what version of
26
 * gst-plugins-base you are building against, and gst_plugins_base_version()
27
 * if you need to check at runtime what version of the gst-plugins-base
28
 * libraries are being used / you are currently linked against.
29
 *
30
 * The version macros get defined by including <gst/pbutils/pbutils.h>.
31
 */
32
#ifdef HAVE_CONFIG_H
33
#include "config.h"
34
#endif
35
36
#include "gstpluginsbaseversion.h"
37
38
/**
39
 * gst_plugins_base_version:
40
 * @major: (out): pointer to a guint to store the major version number, or %NULL
41
 * @minor: (out): pointer to a guint to store the minor version number, or %NULL
42
 * @micro: (out): pointer to a guint to store the micro version number, or %NULL
43
 * @nano:  (out): pointer to a guint to store the nano version number, or %NULL
44
 *
45
 * Gets the version number of the GStreamer Plugins Base libraries.
46
 */
47
void
48
gst_plugins_base_version (guint * major, guint * minor, guint * micro,
49
    guint * nano)
50
0
{
51
0
  if (major)
52
0
    *major = GST_PLUGINS_BASE_VERSION_MAJOR;
53
0
  if (minor)
54
0
    *minor = GST_PLUGINS_BASE_VERSION_MINOR;
55
0
  if (micro)
56
0
    *micro = GST_PLUGINS_BASE_VERSION_MICRO;
57
0
  if (nano)
58
0
    *nano = GST_PLUGINS_BASE_VERSION_NANO;
59
0
}
60
61
/**
62
 * gst_plugins_base_version_string:
63
 *
64
 * This function returns a string that is useful for describing this version
65
 * of GStreamer's gst-plugins-base libraries to the outside world: user agent
66
 * strings, logging, about dialogs ...
67
 *
68
 * Returns: a newly allocated string describing this version of gst-plugins-base
69
 */
70
gchar *
71
gst_plugins_base_version_string (void)
72
0
{
73
0
  return g_strdup_printf ("GStreamer Base Plugins %d.%d.%d%s",
74
0
      GST_PLUGINS_BASE_VERSION_MAJOR, GST_PLUGINS_BASE_VERSION_MINOR,
75
0
      GST_PLUGINS_BASE_VERSION_MICRO,
76
0
      ((GST_PLUGINS_BASE_VERSION_NANO == 0) ? "" :
77
0
          ((GST_PLUGINS_BASE_VERSION_NANO == 1) ? " (GIT)" : " (prerelease)")));
78
0
}