whitespace fixes
[platform/upstream/gstreamer.git] / win32 / common / gstconfig.h
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  * SECTION:gstconfig
24  * @short_description: Build configuration options
25  *
26  * This describes the configuration options for GStreamer. When building
27  * GStreamer there are a lot of parts (known internally as "subsystems" ) that can
28  * be disabled for various reasons. The most common reasons are speed and size,
29  * which is important because GStreamer is designed to run on embedded systems.
30  *
31  * If a subsystem is disabled, most of this changes are done in an API compatible
32  * way, so you don't need to adapt your code in most cases. It is never done in an
33  * ABI compatible way though. So if you want to disable a suybsystem, you have to
34  * rebuild all programs depending on GStreamer, too.
35  *
36  * If a subsystem is disabled in GStreamer, a value is defined in
37  * &lt;gst/gst.h&gt;. You can check this if you do subsystem-specific stuff.
38  * <example>
39  * <title>Doing subsystem specific things</title>
40  * <programlisting>
41  * &hash;ifndef GST_DISABLE_GST_DEBUG
42  * // do stuff specific to the debugging subsystem
43  * &hash;endif // GST_DISABLE_GST_DEBUG
44  * </programlisting>
45  * </example>
46  */
47
48 #ifndef __GST_CONFIG_H__
49 #define __GST_CONFIG_H__
50
51 /***** trick gtk-doc into believing these symbols are defined (yes, it's ugly) */
52
53 #if 0
54 #define GST_DISABLE_LOADSAVE_REGISTRY 1
55 #define GST_DISABLE_GST_DEBUG 1
56 #define GST_DISABLE_LOADSAVE 1
57 #define GST_DISABLE_PARSE 1
58 #define GST_DISABLE_TRACE 1
59 #define GST_DISABLE_ALLOC_TRACE 1
60 #define GST_DISABLE_REGISTRY 1
61 #define GST_DISABLE_ENUMTYPES 1
62 #define GST_DISABLE_INDEX 1
63 #define GST_DISABLE_PLUGIN 1
64 #define GST_DISABLE_URI 1
65 #define GST_HAVE_GLIB_2_8 1
66 #endif
67
68 /***** default padding of structures *****/
69 #define GST_PADDING             4
70 #define GST_PADDING_INIT        {0}
71
72 /***** disabling of subsystems *****/
73
74 /* wether or not the debugging subsystem is enabled */
75 /* #undef GST_DISABLE_GST_DEBUG */
76
77 /* DOES NOT WORK */
78 /* #undef GST_DISABLE_LOADSAVE */
79
80 /* DOES NOT WORK */
81 /* #undef GST_DISABLE_PARSE */
82
83 /* DOES NOT WORK */
84 /* #undef GST_DISABLE_TRACE */
85
86 /* DOES NOT WORK */
87 /* #undef GST_DISABLE_ALLOC_TRACE */
88
89 /* DOES NOT WORK */
90 /* #undef GST_DISABLE_REGISTRY */
91
92 /* DOES NOT WORK */
93 /* #undef GST_DISABLE_ENUMTYPES */
94
95 /* DOES NOT WORK */
96 /* #undef GST_DISABLE_INDEX */
97
98 /* DOES NOT WORK */
99 /* #undef GST_DISABLE_PLUGIN */
100
101 /* DOES NOT WORK */
102 /* #undef GST_DISABLE_URI */
103
104 /* printf extension format */
105 /**
106  * GST_PTR_FORMAT:
107  *
108  * printf format type used to debug GStreamer types.
109  * This can only be used on types whose size is >= sizeof(gpointer).
110  */
111 #define GST_PTR_FORMAT "p"
112
113 /* whether or not the CPU supports unaligned access */
114 #define GST_HAVE_UNALIGNED_ACCESS 1
115
116 /* whether or not we are using glib 2.8 api, e.g. atomic gobject
117    refcounting */
118 #define GST_HAVE_GLIB_2_8 1
119
120 /***** Deal with XML stuff, we have to handle both loadsave and registry *****/
121
122 #if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
123 # include <libxml/parser.h>
124 #else
125 # define GST_DISABLE_LOADSAVE_REGISTRY
126 #endif
127
128 /**
129  * GST_EXPORT:
130  *
131  * Export the given variable from the built shared object.
132  *
133  * On Windows, this exports the variable from the DLL.
134  * On other platforms, this gets defined to "extern".
135  */
136 /**
137  * GST_PLUGIN_EXPORT:
138  *
139  * Export the plugin's definition.
140  *
141  * On Windows, this exports the plugin definition from the DLL.
142  * On other platforms, this gets defined as a no-op.
143  */
144 #if defined(WIN32) && (!defined(__MINGW32__))
145 #define GST_PLUGIN_EXPORT __declspec(dllexport) extern
146 #ifdef GST_EXPORTS
147 #define GST_EXPORT __declspec(dllexport) extern
148 #else
149 #define GST_EXPORT __declspec(dllimport) extern
150 #endif
151 #else /* not WIN32 */
152 #define GST_PLUGIN_EXPORT
153 #define GST_EXPORT extern
154 #endif
155
156 #endif /* __GST_CONFIG_H__ */