gstfunnel: avoid access of freed pad
[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 id="example-gstconfig">
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_GST_DEBUG 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_PLUGIN 1
62 #define GST_HAVE_GLIB_2_8 1
63 #endif
64
65 /***** default padding of structures *****/
66 #define GST_PADDING             4
67 #define GST_PADDING_INIT        { NULL }
68
69 /***** padding for very extensible base classes *****/
70 #define GST_PADDING_LARGE       20
71
72 /***** disabling of subsystems *****/
73
74 /**
75  * GST_DISABLE_GST_DEBUG:
76  *
77  * Configures the inclusion of the debugging subsystem
78  */
79 @GST_DISABLE_GST_DEBUG_DEFINE@
80
81 /**
82  * GST_DISABLE_PARSE:
83  *
84  * Configures the inclusion of the gst-lauch parser
85  */
86 @GST_DISABLE_PARSE_DEFINE@
87
88 /**
89  * GST_DISABLE_TRACE:
90  *
91  * Configures the inclusion of a resource tracing facillity
92  * (seems to be unused)
93  */
94 @GST_DISABLE_TRACE_DEFINE@
95
96 /**
97  * GST_DISABLE_ALLOC_TRACE:
98  *
99  * Configures the use of a memory tracer based on the resource tracer
100  * if TRACE is disabled, ALLOC_TRACE is disabled as well
101  */
102 @GST_DISABLE_ALLOC_TRACE_DEFINE@
103
104 /**
105  * GST_DISABLE_REGISTRY:
106  *
107  * Configures the use of the plugin registry.
108  * If one disables this, required plugins need to be loaded and registered
109  * manually
110  */
111 @GST_DISABLE_REGISTRY_DEFINE@
112
113 /* FIXME: test and document these! */
114 /* Configures the use of external plugins */
115 @GST_DISABLE_PLUGIN_DEFINE@
116
117 /* printf extension format */
118 /**
119  * GST_PTR_FORMAT:
120  *
121  * printf format type used to debug GStreamer types.
122  * This can only be used on types whose size is >= sizeof(gpointer).
123  */
124 @GST_PRINTF_EXTENSION_POINTER_FORMAT_DEFINE@
125 /**
126  * GST_SEGMENT_FORMAT:
127  *
128  * printf format type used to debug GStreamer segments.
129  * This can only be used on pointers to GstSegment structures.
130  *
131  * Since: 0.10.10
132  */
133 @GST_PRINTF_EXTENSION_SEGMENT_FORMAT_DEFINE@
134
135 /* whether or not GST_PTR_FORMAT or GST_SEGMENT_FORMAT are using
136  * the printf extension mechanism. This is for internal use in our
137  * header files so we know whether we can use G_GNUC_PRINTF or not */
138 @GST_USING_PRINTF_EXTENSION_DEFINE@
139
140 /* GST_DISABLE_PRINTF_EXTENSION:
141  *
142  * Define this to debug your debug log messages and make gcc spew warnings
143  * if printf format string and arguments don't match up (this is usually
144  * not the case when libc and gcc are used because printf format warnings
145  * have to be disabled when the printf extension mechanism is in use).
146  *
147  * Note that using this option disables 'pretty logging' of GStreamer objects
148  * like caps, tags, structures, events, pads etc., so that only their address
149  * will be printed in the log.
150  *
151  * This define only disables use of the special registered printf format
152  * extensions in the code compiled with it defined. It does not stop
153  * GStreamer from registering these extensions in the first place if it
154  * was compiled against a libc that supports this.
155  *
156  * (not official API)
157  */
158 /* If GLib is not using the system printf, we can't use the registered
159  * extensions because the GLib-internal printf won't know how to parse them */
160 #if defined(GST_DISABLE_PRINTF_EXTENSION) || !defined(GLIB_USING_SYSTEM_PRINTF)
161   #undef GST_PTR_FORMAT
162   #define GST_PTR_FORMAT "p"
163   #undef GST_SEGMENT_FORMAT
164   #define GST_SEGMENT_FORMAT "p"
165   #undef GST_USING_PRINTF_EXTENSION
166 #endif
167
168 /* whether or not the CPU supports unaligned access */
169 @GST_HAVE_UNALIGNED_ACCESS_DEFINE@
170
171 /**
172  * GST_EXPORT:
173  *
174  * Export the given variable from the built shared object.
175  *
176  * On Windows, this exports the variable from the DLL.
177  * On other platforms, this gets defined to "extern".
178  */
179 /**
180  * GST_PLUGIN_EXPORT:
181  *
182  * Export the plugin's definition.
183  *
184  * On Windows, this exports the plugin definition from the DLL.
185  * On other platforms, this gets defined as a no-op.
186  */
187 #ifdef _MSC_VER
188 #define GST_PLUGIN_EXPORT __declspec(dllexport) extern
189 #ifdef GST_EXPORTS
190 #define GST_EXPORT __declspec(dllexport) extern
191 #else
192 #define GST_EXPORT __declspec(dllimport) extern
193 #endif
194 #else /* not _MSC_VER */
195 #define GST_PLUGIN_EXPORT
196 #if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
197 #define GST_EXPORT extern __attribute__ ((visibility ("default")))
198 #else
199 #define GST_EXPORT extern
200 #endif
201 #endif
202
203 #endif /* __GST_CONFIG_H__ */