+/* 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