In many cases the unistd.h includes weren't actually needed.
Don't build tests that need it on windows with MSVC
(multifdsink, multisocketsink, pipelines/tcp).
Preparation for making tests work on Windows with MSVC.
# include <valgrind/valgrind.h>
#endif
-#include <unistd.h>
-
#include <gst/check/gstcheck.h>
#include <gst/check/gstconsistencychecker.h>
#include <gst/base/gstbasesrc.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/app/gstappsink.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/audio/audio.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
* Boston, MA 02110-1301, USA.
*/
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/audio/audio.h>
#include <gst/check/gstcheck.h>
#include <gst/base/gstbaseparse.h>
-#include <unistd.h>
static const gchar dummytext[] =
"Quick Brown Fox Jumps over a Lazy Frog Quick Brown "
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <unistd.h>
#include <sys/ioctl.h>
* Boston, MA 02110-1301, USA.
*/
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/check/gstharness.h>
#include <gst/check/gstcheck.h>
#include <gst/base/gstpushsrc.h>
-#include <unistd.h>
#ifndef GST_DISABLE_REGISTRY
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
-/* FIXME: GValueArray is deprecated, but there is currently no viabla alternative
+/* FIXME: GValueArray is deprecated, but there is currently no viable alternatives
* See https://bugzilla.gnome.org/show_bug.cgi?id=667228 */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/video/video.h>
* Boston, MA 02110-1301, USA.
*/
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/video/video-overlay-composition.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
# include <valgrind/valgrind.h>
#endif
-#include <unistd.h>
-
#include <gst/check/gstcheck.h>
#include <gst/check/gstharness.h>
* Boston, MA 02110-1301, USA.
*/
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/base/gstbasetransform.h>
#include <gst/check/gstcheck.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
-#include <unistd.h>
#include <glib.h>
#include <vorbis/codec.h>
* Boston, MA 02110-1301, USA.
*/
-#include <unistd.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
# include "config.h"
#endif
-#include <unistd.h>
#include <gmodule.h>
#include <gst/check/gstcheck.h>
#include "config.h"
#endif
-#include <unistd.h>
-
#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <gst/check/gstcheck.h>
#include <gst/app/gstappsrc.h>
#include <sys/stat.h> /* for chmod() */
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for unlink() */
+#ifdef G_OS_UNIX
+#include <unistd.h> /* for getpid() */
#endif
static void
done:
- unlink (path);
+ g_unlink (path);
g_free (path);
#endif /* G_OS_UNIX */
}
#include "config.h"
#endif
-/* #include <fcntl.h> */
-#include <unistd.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <gst/check/gstcheck.h>
#include <gst/pbutils/encoding-profile.h>
#include <gst/pbutils/encoding-target.h>
+#ifdef G_OS_UNIX
+#include <unistd.h> /* For R_OK etc. */
+#endif
+
static inline gboolean
gst_caps_is_equal_unref (GstCaps * caps1, GstCaps * caps2)
{
gchar *gst_dir;
/* cehck if we can create profiles */
+#ifdef G_OS_UNIX
gst_dir = g_build_filename (g_get_user_data_dir (), "gstreamer-1.0", NULL);
can_write = (g_access (gst_dir, R_OK | W_OK | X_OK) == 0);
g_free (gst_dir);
+#else
+ can_write = FALSE; /* FIXME: fix can_write test on Windows */
+#endif
suite_add_tcase (s, tc_chain);
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
#include <gst/check/gstcheck.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
#include <gst/check/gstcheck.h>
#include <gst/check/gstcheck.h>
#include <gst/rtsp/gstrtspconnection.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
#include <string.h>
# include <valgrind/valgrind.h>
#endif
-#include <unistd.h>
-
#include <gst/check/gstcheck.h>
#include <gst/video/video.h>
[ 'elements/audiorate.c' ],
[ 'elements/audiotestsrc.c' ],
[ 'elements/audioresample.c' ],
- [ 'elements/libvisual.c', not libvisual_dep.found() ],
+ [ 'elements/libvisual.c', not is_variable('libvisual_dep') or not libvisual_dep.found() ],
[ 'elements/decodebin.c' ],
[ 'elements/encodebin.c', not theoraenc_dep.found() or not vorbisenc_dep.found() ],
- [ 'elements/multifdsink.c' ],
- [ 'elements/multisocketsink.c' ],
+ [ 'elements/multifdsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
+ # FIXME: multisocketsink test on windows/msvc
+ [ 'elements/multisocketsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
[ 'elements/playbin.c' ],
[ 'elements/playbin-complex.c', not ogg_dep.found() ],
[ 'elements/playsink.c' ],
[ 'pipelines/gio.c' ],
[ 'pipelines/oggmux.c', not ogg_dep.found(), [ ogg_dep, ] ],
[ 'pipelines/streamsynchronizer.c' ],
- [ 'pipelines/tcp.c' ], # FIXME: -DHAVE_GIO_UNIX_2_0=1
+ # FIXME: tcp test on windows/msvc
+ [ 'pipelines/tcp.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
[ 'pipelines/theoraenc.c', not theoraenc_dep.found(), [ theoraenc_dep ] ],
[ 'pipelines/vorbisenc.c', not vorbisenc_dep.found() ],
[ 'pipelines/vorbisdec.c', not vorbisenc_dep.found(),],
/* Ideally this would be in core, but using videotestsrc makes it easier */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <gst/check/gstcheck.h>
#define FIRST_CAPS "video/x-raw,width=(int)480,height=(int)320"
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
-#include <unistd.h>
-#include <sys/socket.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gio/gio.h>
#include <gst/check/gstcheck.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/socket.h>
#include <unistd.h>
static gboolean
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>