Fix a couple of missing includes for MSVC2005 and a C99 issue. Also, starting with...
authorOle André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
Wed, 31 Oct 2007 22:01:03 +0000 (22:01 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 31 Oct 2007 22:01:03 +0000 (22:01 +0000)
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* gst/gsttrace.c:
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
* libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send):
* libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_new):
Fix a couple of missing includes for MSVC2005 and a C99 issue. Also,
starting with 2.14.0, GLib won't provide a pipe() macro any longer,
so use _pipe() directly (#492077).
* win32/common/dirent.c: (_treaddir):
Add a couple of casts to make it build without warnings with MSVC.
* win32/common/libgstreamer.def:
Add some more symbols that need to be exported.

ChangeLog
gst/gsttrace.c
libs/gst/net/gstnetclientclock.c
libs/gst/net/gstnettimepacket.c
libs/gst/net/gstnettimeprovider.c
win32/common/dirent.c
win32/common/libgstreamer.def

index 0ef2333..ff31434 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2007-10-31  Tim-Philipp Müller  <tim at centricular dot net>
 
+       Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
+
+       * gst/gsttrace.c:
+       * libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
+       * libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send):
+       * libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_new):
+         Fix a couple of missing includes for MSVC2005 and a C99 issue. Also,
+         starting with 2.14.0, GLib won't provide a pipe() macro any longer,
+         so use _pipe() directly (#492077).
+
+       * win32/common/dirent.c: (_treaddir):
+         Add a couple of casts to make it build without warnings with MSVC.
+
+       * win32/common/libgstreamer.def:
+         Add some more symbols that need to be exported.
+
+2007-10-31  Tim-Philipp Müller  <tim at centricular dot net>
+
        * tests/examples/metadata/read-metadata.c: (message_loop):
          Use _KEEP as merge mode rather than _KEEP_ALL, so tags
          arriving in a second or third tag message are added to
index cdf3442..709800e 100644 (file)
 #include <fcntl.h>
 #include <string.h>
 
+#if defined (_MSC_VER) && _MSC_VER >= 1400
+# include <io.h>
+#endif
+
 #include "gst_private.h"
 #include "gstinfo.h"
 
index 895175b..687dc48 100644 (file)
 #include "config.h"
 #endif
 
-#include <unistd.h>
-
 #include "gstnettimepacket.h"
 #include "gstnetclientclock.h"
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if defined (_MSC_VER) && _MSC_VER >= 1400
+#include <io.h>
+#endif
+
 GST_DEBUG_CATEGORY_STATIC (ncc_debug);
 #define GST_CAT_DEFAULT (ncc_debug)
 
@@ -610,7 +616,7 @@ gst_net_client_clock_new (gchar * name, const gchar * remote_address,
 
 #ifdef G_OS_WIN32
   GST_DEBUG_OBJECT (ret, "creating pipe");
-  if ((iret = pipe (CONTROL_SOCKETS (ret))) < 0)
+  if ((iret = _pipe (CONTROL_SOCKETS (ret), 4096, _O_BINARY)) < 0)
     goto no_socket_pair;
 #else
   GST_DEBUG_OBJECT (ret, "creating socket pair");
index 6893f08..a87d544 100644 (file)
@@ -188,6 +188,7 @@ gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
   fcntl (fd, F_SETFL, fdflags | O_NONBLOCK);
 #elif defined G_OS_WIN32
   flags = 1;
+  send_flags = 0;
 #else
   send_flags = MSG_DONTWAIT;
 #endif
@@ -196,11 +197,10 @@ gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
 
 #ifdef G_OS_WIN32
   ioctlsocket (fd, FIONBIO, &flags);    /* Set nonblocking mode */
-  ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, NULL, addr, len);
-#else
-  ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr, len);
 #endif
 
+  ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr, len);
+
 #ifdef __CYGWIN__
   fcntl (fd, F_SETFL, fdflags);
 #endif
index e7ca61c..3d93441 100644 (file)
 
 #include <glib.h>
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
+#if defined (_MSC_VER) && _MSC_VER >= 1400
+#include <io.h>
+#endif
+
 #ifndef G_OS_WIN32
 #include <sys/ioctl.h>
 #endif
@@ -522,7 +529,7 @@ gst_net_time_provider_new (GstClock * clock, const gchar * address, gint port)
 
 #ifdef G_OS_WIN32
   GST_DEBUG_OBJECT (ret, "creating pipe");
-  if ((iret = pipe (CONTROL_SOCKETS (ret))) < 0)
+  if ((iret = _pipe (CONTROL_SOCKETS (ret), 4096, _O_BINARY)) < 0)
     goto no_socket_pair;
 #else
   GST_DEBUG_OBJECT (ret, "creating socket pair");
index 093ab1c..85be9cb 100644 (file)
@@ -285,7 +285,7 @@ _treaddir (_TDIR * dirp)
 
     /* Start the search */
 
-    dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
+    dirp->dd_handle = (long) _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
 
 
     if (dirp->dd_handle == -1) {
@@ -353,7 +353,7 @@ _treaddir (_TDIR * dirp)
 
      * file name. */
 
-    dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dta.name);
+    dirp->dd_dir.d_namlen = (unsigned short) _tcslen (dirp->dd_dta.name);
 
     _tcscpy (dirp->dd_dir.d_name, dirp->dd_dta.name);
 
index cad739b..5cbb987 100644 (file)
@@ -103,6 +103,7 @@ EXPORTS
        GST_CAT_CALL_TRACE DATA
        GST_CAT_CAPS DATA
        GST_CAT_CLOCK DATA
+       GST_CAT_DEFAULT DATA
        GST_CAT_ELEMENT_PADS DATA
        GST_CAT_ERROR_SYSTEM DATA
        GST_CAT_EVENT DATA
@@ -349,6 +350,8 @@ EXPORTS
        gst_message_new_element
        gst_message_new_eos
        gst_message_new_error
+       gst_message_new_info
+       gst_message_new_latency
        gst_message_new_new_clock
        gst_message_new_segment_done
        gst_message_new_segment_start