tee: Check for the removed pad flag also in the slow pushing path
[platform/upstream/gstreamer.git] / gst / gstconfig.h.in
index 7af2496..7be1b19 100644 (file)
@@ -16,8 +16,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 /**
@@ -33,7 +33,7 @@
  * 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
- * suybsystem, you have to rebuild all programs depending on GStreamer, too.
+ * subsystem, you have to rebuild all programs depending on GStreamer, too.
  *
  * If a subsystem is disabled in GStreamer, a value is defined in
  * <gst/gst.h>. You can check this if you do subsystem-specific stuff.
 #if 0
 #define GST_DISABLE_GST_DEBUG 1
 #define GST_DISABLE_PARSE 1
-#define GST_DISABLE_TRACE 1
-#define GST_DISABLE_ALLOC_TRACE 1
 #define GST_DISABLE_REGISTRY 1
 #define GST_DISABLE_PLUGIN 1
-#define GST_HAVE_GLIB_2_8 1
 #endif
 
 /***** default padding of structures *****/
 /**
  * GST_DISABLE_PARSE:
  *
- * Configures the inclusion of the gst-lauch parser
+ * Configures the inclusion of the gst-launch parser
  */
 @GST_DISABLE_PARSE_DEFINE@
 
 /**
- * GST_DISABLE_TRACE:
- *
- * Configures the inclusion of a resource tracing facillity
- * (seems to be unused)
- */
-@GST_DISABLE_TRACE_DEFINE@
-
-/**
- * GST_DISABLE_ALLOC_TRACE:
- *
- * Configures the use of a memory tracer based on the resource tracer
- * if TRACE is disabled, ALLOC_TRACE is disabled as well
- */
-@GST_DISABLE_ALLOC_TRACE_DEFINE@
-
-/**
  * GST_DISABLE_REGISTRY:
  *
  * Configures the use of the plugin registry.
  */
 @GST_DISABLE_REGISTRY_DEFINE@
 
-/* FIXME: test and document these! */
-/* Configures the use of external plugins */
-@GST_DISABLE_PLUGIN_DEFINE@
-
-/* printf extension format */
 /**
- * GST_PTR_FORMAT:
+ * GST_DISABLE_CAST_CHECKS:
  *
- * printf format type used to debug GStreamer types.
- * This can only be used on types whose size is >= sizeof(gpointer).
+ * Disable run-time GObject cast checks
  */
-@GST_PRINTF_EXTENSION_POINTER_FORMAT_DEFINE@
+#define GST_DISABLE_CAST_CHECKS @GST_DISABLE_CAST_CHECKS_DEFINE@
+
 /**
- * GST_SEGMENT_FORMAT:
+ * GST_DISABLE_GLIB_ASSERTS:
  *
- * printf format type used to debug GStreamer segments.
- * This can only be used on pointers to GstSegment structures.
+ * Disable GLib assertion
+ */
+#define GST_DISABLE_GLIB_ASSERTS @GST_DISABLE_GLIB_ASSERTS_DEFINE@
+
+/**
+ * GST_DISABLE_GLIB_CHECKS:
  *
- * Since: 0.10.10
+ * Disable GLib checks such as API guards
  */
-@GST_PRINTF_EXTENSION_SEGMENT_FORMAT_DEFINE@
+#define GST_DISABLE_GLIB_CHECKS @GST_DISABLE_GLIB_CHECKS_DEFINE@
 
-/* whether or not GST_PTR_FORMAT or GST_SEGMENT_FORMAT are using
- * the printf extension mechanism. This is for internal use in our
- * header files so we know whether we can use G_GNUC_PRINTF or not */
-@GST_USING_PRINTF_EXTENSION_DEFINE@
 
-/* GST_DISABLE_PRINTF_EXTENSION:
- *
- * Define this to debug your debug log messages and make gcc spew warnings
- * if printf format string and arguments don't match up (this is usually
- * not the case when libc and gcc are used because printf format warnings
- * have to be disabled when the printf extension mechanism is in use).
- *
- * Note that using this option disables 'pretty logging' of GStreamer objects
- * like caps, tags, structures, events, pads etc., so that only their address
- * will be printed in the log.
- *
- * This define only disables use of the special registered printf format
- * extensions in the code compiled with it defined. It does not stop
- * GStreamer from registering these extensions in the first place if it
- * was compiled against a libc that supports this.
+/* FIXME: test and document these! */
+/* Configures the use of external plugins */
+@GST_DISABLE_PLUGIN_DEFINE@
+
+/* Whether or not the CPU supports unaligned access
+ * The macros used are defined consistently by GCC, Clang, MSVC, Sun, and ICC
  *
- * (not official API)
+ * References:
+ * https://sourceforge.net/p/predef/wiki/Architectures/
+ * https://msdn.microsoft.com/en-us/library/b0084kay.aspx
+ * http://docs.oracle.com/cd/E19205-01/820-4155/c++_faq.html#Vers6
+ * https://software.intel.com/en-us/node/583402
  */
-/* If GLib is not using the system printf, we can't use the registered
- * extensions because the GLib-internal printf won't know how to parse them */
-#if defined(GST_DISABLE_PRINTF_EXTENSION) || !defined(GLIB_USING_SYSTEM_PRINTF)
-  #undef GST_PTR_FORMAT
-  #define GST_PTR_FORMAT "p"
-  #undef GST_SEGMENT_FORMAT
-  #define GST_SEGMENT_FORMAT "p"
-  #undef GST_USING_PRINTF_EXTENSION
+#if defined(__alpha__) || defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__bfin) || defined(__hppa__) || defined(__nios2__) || defined(__MICROBLAZE__) || defined(__mips__) || defined(__or1k__) || defined(__sh__) || defined(__SH4__) || defined(__sparc__) || defined(__sparc) || defined(__ia64__) || defined(_M_ALPHA) || defined(_M_ARM) || defined(_M_IA64) || defined(__xtensa__) || defined(__e2k__) || defined(__riscv)
+#  define GST_HAVE_UNALIGNED_ACCESS 0
+#elif defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__ppc__) || defined(__ppc64__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__m68k__) || defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || defined(__s390__) || defined(__s390x__) || defined(__zarch__)
+#  define GST_HAVE_UNALIGNED_ACCESS 1
+#else
+#  error "Could not detect architecture; don't know whether it supports unaligned access! Please file a bug."
 #endif
 
-/* whether or not the CPU supports unaligned access */
-@GST_HAVE_UNALIGNED_ACCESS_DEFINE@
-
 /**
  * GST_EXPORT:
  *
  * On Windows, this exports the plugin definition from the DLL.
  * On other platforms, this gets defined as a no-op.
  */
-#ifdef _MSC_VER
-#define GST_PLUGIN_EXPORT __declspec(dllexport) extern
-#ifdef GST_EXPORTS
-#define GST_EXPORT __declspec(dllexport) extern
+/* Only use __declspec(dllexport/import) when we have been built with MSVC or
+ * the user is linking to us with MSVC. The only remaining case is when we were
+ * built with MinGW and are linking with MinGW in which case we rely on the
+ * linker to auto-export/import symbols. Of course all this is only used when
+ * not linking statically.
+ *
+ * NOTE: To link to GStreamer 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 (@GSTCONFIG_BUILT_WITH_MSVC@ || defined(_MSC_VER)) && !defined(GST_STATIC_COMPILATION)
+# define GST_PLUGIN_EXPORT __declspec(dllexport)
+# ifdef GST_EXPORTS
+#  define GST_EXPORT __declspec(dllexport)
+# else
+#  define GST_EXPORT __declspec(dllimport) extern
+# endif
+#else
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#  define GST_PLUGIN_EXPORT __attribute__ ((visibility ("default")))
+#  define GST_EXPORT extern __attribute__ ((visibility ("default")))
+# else
+#  define GST_PLUGIN_EXPORT
+#  define GST_EXPORT extern
+# endif
+#endif
+
+#if defined(_MSC_VER) && !defined(GST_STATIC_COMPILATION)
+# define GST_API_IMPORT __declspec(dllimport) extern
 #else
-#define GST_EXPORT __declspec(dllimport) extern
+# define GST_API_IMPORT extern
 #endif
-#else /* not _MSC_VER */
-#define GST_PLUGIN_EXPORT
-#define GST_EXPORT extern
+
+#ifndef GST_API
+# ifdef BUILDING_GST
+#  define GST_API GST_API_EXPORT        /* from config.h */
+# else
+#  define GST_API GST_API_IMPORT
+# endif
+#endif
+
+/* These macros are used to mark deprecated functions in GStreamer headers,
+ * and thus have to be exposed in installed headers. But please
+ * do *not* use them in other projects. Instead, use G_DEPRECATED
+ * or define your own wrappers around it. */
+#ifndef GST_DISABLE_DEPRECATED
+#define GST_DEPRECATED GST_API
+#define GST_DEPRECATED_FOR(f) GST_API
+#else
+#define GST_DEPRECATED G_DEPRECATED GST_API
+#define GST_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) GST_API
 #endif
 
 #endif /* __GST_CONFIG_H__ */