2 * Copyright (C) 2005 Benjamin Otte <otte@gnome.org>
4 * tools.h: header for common stuff of all GStreamer tools
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #ifndef __GST_TOOLS_H__
24 #define __GST_TOOLS_H__
29 #include "gst/gst-i18n-app.h"
32 * This is a kind of hacky way to make all the tools use the same version code.
33 * If anyone knows a less hacky way to get this done, feel free to implement it.
35 * It also includes all the files that all the tools require.
38 static gboolean __gst_tools_version = FALSE;
40 #define GST_TOOLS_GOPTION_VERSION \
41 { "version", 0, 0, G_OPTION_ARG_NONE, &__gst_tools_version, \
42 N_("Print version information and exit"), NULL }
45 gst_tools_print_version (void)
47 if (__gst_tools_version) {
50 version_str = gst_version_string ();
51 g_print ("%s version %d.%d.%d\n", g_get_prgname (),
52 GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO);
53 g_print ("%s\n", version_str);
54 g_print ("%s\n", GST_PACKAGE_ORIGIN);
60 #endif /* __GST_TOOLS_H__ */