various style fixes
[platform/upstream/gstreamer.git] / gst / gstconfig.h.in
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *               2004,2005 Wim Taymans <wim@fluendo.com>
4  *
5  * gstconfig.h: GST_DISABLE_* macros for build configuration
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 /**
24  * SECTION:gstconfig
25  * @short_description: Build configuration options
26  *
27  * This describes the configuration options for GStreamer. When building
28  * GStreamer there are a lot of parts (known internally as "subsystems" ) that
29  * can be disabled for various reasons. The most common reasons are speed and
30  * size, which is important because GStreamer is designed to run on embedded
31  * systems.
32  *
33  * If a subsystem is disabled, most of this changes are done in an API
34  * compatible way, so you don't need to adapt your code in most cases. It is
35  * never done in an ABI compatible way though. So if you want to disable a
36  * suybsystem, you have to rebuild all programs depending on GStreamer, too.
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>
41  * <title>Doing subsystem specific things</title>
42  * <programlisting>
43  * &hash;ifndef GST_DISABLE_GST_DEBUG
44  * // do stuff specific to the debugging subsystem
45  * &hash;endif // GST_DISABLE_GST_DEBUG
46  * </programlisting>
47  * </example>
48  */
49
50 #ifndef __GST_CONFIG_H__
51 #define __GST_CONFIG_H__
52
53 /* trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
54
55 #if 0
56 #define GST_DISABLE_LOADSAVE_REGISTRY 1
57 #define GST_DISABLE_GST_DEBUG 1
58 #define GST_DISABLE_LOADSAVE 1
59 #define GST_DISABLE_PARSE 1
60 #define GST_DISABLE_TRACE 1
61 #define GST_DISABLE_ALLOC_TRACE 1
62 #define GST_DISABLE_REGISTRY 1
63 #define GST_DISABLE_ENUMTYPES 1
64 #define GST_DISABLE_INDEX 1
65 #define GST_DISABLE_PLUGIN 1
66 #define GST_DISABLE_URI 1
67 #define GST_HAVE_GLIB_2_8 1
68 #endif
69
70 /***** default padding of structures *****/
71 #define GST_PADDING             4
72 #define GST_PADDING_INIT        {0}
73
74 /***** disabling of subsystems *****/
75
76 /* wether or not the debugging subsystem is enabled */
77 @GST_DISABLE_GST_DEBUG_DEFINE@
78
79 /* DOES NOT WORK */
80 @GST_DISABLE_LOADSAVE_DEFINE@
81
82 /* DOES NOT WORK */
83 @GST_DISABLE_PARSE_DEFINE@
84
85 /* DOES NOT WORK */
86 @GST_DISABLE_TRACE_DEFINE@
87
88 /* DOES NOT WORK */
89 @GST_DISABLE_ALLOC_TRACE_DEFINE@
90
91 /* DOES NOT WORK */
92 @GST_DISABLE_REGISTRY_DEFINE@
93
94 /* DOES NOT WORK */
95 @GST_DISABLE_ENUMTYPES_DEFINE@
96
97 /* DOES NOT WORK */
98 @GST_DISABLE_INDEX_DEFINE@
99
100 /* DOES NOT WORK */
101 @GST_DISABLE_PLUGIN_DEFINE@
102
103 /* DOES NOT WORK */
104 @GST_DISABLE_URI_DEFINE@
105
106 /* printf extension format */
107 /**
108  * GST_PTR_FORMAT:
109  *
110  * printf format type used to debug GStreamer types.
111  * This can only be used on types whose size is >= sizeof(gpointer).
112  */
113 @GST_PRINTF_EXTENSION_FORMAT_DEFINE@
114
115 /* whether or not the CPU supports unaligned access */
116 @GST_HAVE_UNALIGNED_ACCESS_DEFINE@
117
118 /* whether or not we are using glib 2.8 api, e.g. atomic gobject
119    refcounting */
120 @GST_HAVE_GLIB_2_8_DEFINE@
121
122 /***** Deal with XML stuff, we have to handle both loadsave and registry *****/
123
124 #if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
125 # include <libxml/parser.h>
126 #else
127 # define GST_DISABLE_LOADSAVE_REGISTRY
128 #endif
129
130 /**
131  * GST_EXPORT:
132  *
133  * Export the given variable from the built shared object.
134  *
135  * On Windows, this exports the variable from the DLL.
136  * On other platforms, this gets defined to "extern".
137  */
138 /**
139  * GST_PLUGIN_EXPORT:
140  *
141  * Export the plugin's definition.
142  *
143  * On Windows, this exports the plugin definition from the DLL.
144  * On other platforms, this gets defined as a no-op.
145  */
146 #if defined(WIN32) && (!defined(__MINGW32__))
147 #define GST_PLUGIN_EXPORT __declspec(dllexport) extern
148 #ifdef GST_EXPORTS
149 #define GST_EXPORT __declspec(dllexport) extern
150 #else
151 #define GST_EXPORT __declspec(dllimport) extern
152 #endif
153 #else /* not WIN32 */
154 #define GST_PLUGIN_EXPORT
155 #define GST_EXPORT extern
156 #endif
157
158 #endif /* __GST_CONFIG_H__ */