From be04e7c294ebb62ae497a9a119ebb0b24020caca Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 1 Nov 2007 13:28:59 +0000 Subject: [PATCH] gst-libs/gst/fft/: Include our own _stdint.h instead of sys/types.h, makes MingW happy (#492306). Original commit message from CVS: Patch by: Vincent Torri * gst-libs/gst/fft/kiss_fft_s16.h: (KISS_FFT_S16_MALLOC): * gst-libs/gst/fft/kiss_fft_s32.h: (KISS_FFT_S32_MALLOC): Include our own _stdint.h instead of sys/types.h, makes MingW happy (#492306). * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_create): Use _pipe directly, GLib doesn't have a pipe() macro any longer (it disappeared in GLib 2.14.0) (#492306). * gst-libs/gst/sdp/Makefile.am: * gst-libs/gst/sdp/gstsdpmessage.c: Fix includes and LIBS for win32/Mingw (#492306). * tests/examples/dynamic/addstream.c (pause_play_stream): Use more portable g_usleep() instead of sleep() (#492306). --- ChangeLog | 20 ++++++++++++++++++++ gst-libs/gst/fft/kiss_fft_s16.h | 3 ++- gst-libs/gst/fft/kiss_fft_s32.h | 3 ++- gst-libs/gst/rtsp/gstrtspconnection.c | 2 +- gst-libs/gst/sdp/Makefile.am | 2 +- gst-libs/gst/sdp/gstsdpmessage.c | 13 +++++++++++++ tests/examples/dynamic/addstream.c | 4 +--- 7 files changed, 40 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index bbbcc10d88..7b74642999 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2007-11-01 Tim-Philipp Müller + + Patch by: Vincent Torri + + * gst-libs/gst/fft/kiss_fft_s16.h: (KISS_FFT_S16_MALLOC): + * gst-libs/gst/fft/kiss_fft_s32.h: (KISS_FFT_S32_MALLOC): + Include our own _stdint.h instead of sys/types.h, makes MingW happy + (#492306). + + * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_create): + Use _pipe directly, GLib doesn't have a pipe() macro any longer + (it disappeared in GLib 2.14.0) (#492306). + + * gst-libs/gst/sdp/Makefile.am: + * gst-libs/gst/sdp/gstsdpmessage.c: + Fix includes and LIBS for win32/Mingw (#492306). + + * tests/examples/dynamic/addstream.c (pause_play_stream): + Use more portable g_usleep() instead of sleep() (#492306). + 2007-11-01 Tim-Philipp Müller Patch by: Ole André Vadla Ravnås diff --git a/gst-libs/gst/fft/kiss_fft_s16.h b/gst-libs/gst/fft/kiss_fft_s16.h index e607dfd6ea..ed735e630b 100644 --- a/gst-libs/gst/fft/kiss_fft_s16.h +++ b/gst-libs/gst/fft/kiss_fft_s16.h @@ -26,7 +26,8 @@ extern "C" { #define KISS_FFT_S16_MALLOC malloc -#include +#include "_stdint.h" + #define kiss_fft_s16_scalar int16_t typedef struct { diff --git a/gst-libs/gst/fft/kiss_fft_s32.h b/gst-libs/gst/fft/kiss_fft_s32.h index 8a42768dce..103eaf98d2 100644 --- a/gst-libs/gst/fft/kiss_fft_s32.h +++ b/gst-libs/gst/fft/kiss_fft_s32.h @@ -27,7 +27,8 @@ extern "C" { #define KISS_FFT_S32_MALLOC malloc -#include +#include "_stdint.h" + #define kiss_fft_s32_scalar int32_t typedef struct { diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 14ba397998..1da824d810 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -163,7 +163,7 @@ gst_rtsp_connection_create (GstRTSPUrl * url, GstRTSPConnection ** conn) #ifdef G_OS_WIN32 /* This should work on UNIX too. PF_UNIX sockets replaced with pipe */ /* pipe( CONTROL_SOCKETS(newconn) ) */ - if ((ret = pipe (CONTROL_SOCKETS (newconn))) < 0) + if ((ret = _pipe (CONTROL_SOCKETS (newconn), 4096, _O_BINARY)) < 0) goto no_socket_pair; ioctlsocket (READ_SOCKET (newconn), FIONBIO, &flags); diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am index fedab63ff6..14d4cb6b3b 100644 --- a/gst-libs/gst/sdp/Makefile.am +++ b/gst-libs/gst/sdp/Makefile.am @@ -8,5 +8,5 @@ lib_LTLIBRARIES = libgstsdp-@GST_MAJORMINOR@.la libgstsdp_@GST_MAJORMINOR@_la_SOURCES = gstsdpmessage.c libgstsdp_@GST_MAJORMINOR@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstsdp_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) +libgstsdp_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) $(WIN32_LIBS) libgstsdp_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) diff --git a/gst-libs/gst/sdp/gstsdpmessage.c b/gst-libs/gst/sdp/gstsdpmessage.c index d5386030af..af49747a0a 100644 --- a/gst-libs/gst/sdp/gstsdpmessage.c +++ b/gst-libs/gst/sdp/gstsdpmessage.c @@ -54,12 +54,25 @@ * Last reviewed on 2007-07-24 (0.10.14) */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include + +#ifdef HAVE_SYS_TYPES_H #include +#endif + +#include /* for G_OS_WIN32 */ + +#ifdef G_OS_WIN32 +#include +#else #include #include +#endif #include "gstsdpmessage.h" diff --git a/tests/examples/dynamic/addstream.c b/tests/examples/dynamic/addstream.c index dc7cad99db..3c4a263bc9 100644 --- a/tests/examples/dynamic/addstream.c +++ b/tests/examples/dynamic/addstream.c @@ -25,8 +25,6 @@ #include "config.h" #endif -#include - #include static GstElement *pipeline; @@ -93,7 +91,7 @@ pause_play_stream (GstElement * bin, gint seconds) } if (seconds) - sleep (seconds); + g_usleep (seconds * G_USEC_PER_SEC); if (punch_in) { /* new bin has to be aligned with previous running_time. We do this by taking