gstconfig.h.in 4.22 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* GStreamer
 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
 *               2004,2005 Wim Taymans <wim@fluendo.com>
 *
 * gstconfig.h: GST_DISABLE_* macros for build configuration
 *
 * 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
Tim-Philipp Müller's avatar
Tim-Philipp Müller committed
19 20
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
21
 */
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
22

23 24 25 26
/**
 * SECTION:gstconfig
 * @short_description: Build configuration options
 *
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
27
 * This describes the configuration options for GStreamer. When building
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
28 29 30 31 32 33 34 35
 * GStreamer there are a lot of parts (known internally as "subsystems" ) that
 * can be disabled for various reasons. The most common reasons are speed and
 * size, which is important because GStreamer is designed to run on embedded
 * systems.
 *
 * If a subsystem is disabled, most of this changes are done in an API
 * compatible way, so you don't need to adapt your code in most cases. It is
 * never done in an ABI compatible way though. So if you want to disable a
36
 * subsystem, you have to rebuild all programs depending on GStreamer, too.
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
37 38
 *
 * If a subsystem is disabled in GStreamer, a value is defined in
39
 * &lt;gst/gst.h&gt;. You can check this if you do subsystem-specific stuff.
40
 * <example id="example-gstconfig">
41 42 43 44 45 46 47 48
 * <title>Doing subsystem specific things</title>
 * <programlisting>
 * &hash;ifndef GST_DISABLE_GST_DEBUG
 * // do stuff specific to the debugging subsystem
 * &hash;endif // GST_DISABLE_GST_DEBUG
 * </programlisting>
 * </example>
 */
49 50 51 52

#ifndef __GST_CONFIG_H__
#define __GST_CONFIG_H__

Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
53
/* trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
54 55 56 57 58 59 60 61

#if 0
#define GST_DISABLE_GST_DEBUG 1
#define GST_DISABLE_PARSE 1
#define GST_DISABLE_REGISTRY 1
#define GST_DISABLE_PLUGIN 1
#endif

Wim Taymans's avatar
Wim Taymans committed
62 63
/***** default padding of structures *****/
#define GST_PADDING		4
64
#define GST_PADDING_INIT	{ NULL }
65

66 67 68
/***** padding for very extensible base classes *****/
#define GST_PADDING_LARGE	20

69 70
/***** disabling of subsystems *****/

71 72 73 74 75
/**
 * GST_DISABLE_GST_DEBUG:
 *
 * Configures the inclusion of the debugging subsystem
 */
76 77
@GST_DISABLE_GST_DEBUG_DEFINE@

78 79 80
/**
 * GST_DISABLE_PARSE:
 *
81
 * Configures the inclusion of the gst-launch parser
82
 */
83 84
@GST_DISABLE_PARSE_DEFINE@

85 86 87
/**
 * GST_DISABLE_REGISTRY:
 *
88 89
 * Configures the use of the plugin registry.
 * If one disables this, required plugins need to be loaded and registered
90
 * manually
91
 */
92 93
@GST_DISABLE_REGISTRY_DEFINE@

94 95
/* FIXME: test and document these! */
/* Configures the use of external plugins */
96 97
@GST_DISABLE_PLUGIN_DEFINE@

98 99 100
/* whether or not the CPU supports unaligned access */
@GST_HAVE_UNALIGNED_ACCESS_DEFINE@

101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
/**
 * GST_EXPORT:
 *
 * Export the given variable from the built shared object.
 *
 * On Windows, this exports the variable from the DLL.
 * On other platforms, this gets defined to "extern".
 */
/**
 * GST_PLUGIN_EXPORT:
 *
 * Export the plugin's definition.
 *
 * On Windows, this exports the plugin definition from the DLL.
 * On other platforms, this gets defined as a no-op.
 */
117 118 119 120 121 122 123
/* Macro _WIN32 is defined on 32-bit and 64-bit Windows; by both GCC and MSVC
 *
 * NOTE: To link to Windows statically on Windows, you must define
 * GST_STATIC_COMPILATION or the prototypes will cause the compiler to search
 * for the symbol inside a DLL
 */
#if defined(_WIN32) && !defined(GST_STATIC_COMPILATION)
124
# define GST_PLUGIN_EXPORT __declspec(dllexport)
125
# ifdef GST_EXPORTS
126
#  define GST_EXPORT __declspec(dllexport)
127 128 129
# else
#  define GST_EXPORT __declspec(dllimport) extern
# endif
130
#else /* !_WIN32 */
131 132 133 134 135 136
# define GST_PLUGIN_EXPORT
# if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
#  define GST_EXPORT extern __attribute__ ((visibility ("default")))
# else
#  define GST_EXPORT extern
# endif
137
#endif
138

139
#endif /* __GST_CONFIG_H__ */