gst/goom/: Fix build with MSVC: include glib.h to define inline appropriately, use header guards where needed.

Original commit message from CVS:
* gst/goom/convolve_fx.c:
* gst/goom/filters.c:
* gst/goom/goom_config.h:
* gst/goom/goom_core.c:
* gst/goom/goom_tools.h:
Fix build with MSVC: include glib.h to define inline appropriately,
use header guards where needed.
* gst/udp/gstudpnetutils.c:
* gst/udp/gstudpsrc.c:
Fix build with MSVC: use WSA* constants/functions where appropriate, use
g_snprintf rather than snprintf.
Fixes #544433.
This commit is contained in:
Michael Smith 2008-07-23 22:01:20 +00:00
parent da2d6b62e9
commit 90fdf92640
8 changed files with 52 additions and 13 deletions

View file

@ -1,3 +1,18 @@
2008-07-23 Michael Smith <msmith@songbirdnest.com>
* gst/goom/convolve_fx.c:
* gst/goom/filters.c:
* gst/goom/goom_config.h:
* gst/goom/goom_core.c:
* gst/goom/goom_tools.h:
Fix build with MSVC: include glib.h to define inline appropriately,
use header guards where needed.
* gst/udp/gstudpnetutils.c:
* gst/udp/gstudpsrc.c:
Fix build with MSVC: use WSA* constants/functions where appropriate, use
g_snprintf rather than snprintf.
Fixes #544433.
2008-07-22 Stefan Kost <ensonic@users.sf.net>
* gst/debug/gsttaginject.c:

View file

@ -22,8 +22,6 @@ typedef char Motif[CONV_MOTIF_W][CONV_MOTIF_W];
#define NB_THETA 512
#define MAX 2.0f
typedef struct _CONV_DATA
{
PluginParam light;

View file

@ -14,11 +14,18 @@
/* #define _DEBUG_PIXEL */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include "goom_filters.h"
#include "goom_graphic.h"

View file

@ -1,3 +1,5 @@
#include <glib.h>
#if WORDS_BIGENDIAN
#define COLOR_ARGB
#else
@ -18,15 +20,8 @@
#define ALPHA 0
#endif
#ifndef guint32
#define guint8 unsigned char
#define guin16 unsigned short
#define guint32 unsigned int
#define gint8 signed char
#define gint16 signed short int
#define gint32 signed int
#endif
#if defined (BUILD_MMX) && defined (HAVE_GCC_ASM)
#define HAVE_MMX
#endif

View file

@ -7,12 +7,18 @@
* (c)2000-2003, by iOS-software.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include "goom.h"
#include "goom_tools.h"

View file

@ -1,6 +1,8 @@
#ifndef _GOOMTOOLS_H
#define _GOOMTOOLS_H
#include "goom_config.h"
/**
* Random number generator wrapper for faster random number.
*/

View file

@ -69,7 +69,7 @@ gst_udp_get_addr (const char *hostname, int port, struct sockaddr_storage *addr)
memset (&hints, 0, sizeof (hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
snprintf (service, sizeof (service) - 1, "%d", port);
g_snprintf (service, sizeof (service) - 1, "%d", port);
service[sizeof (service) - 1] = '\0';
if ((ret = getaddrinfo (hostname, (port == -1) ? NULL : service, &hints,
@ -176,7 +176,11 @@ gst_udp_join_group (int sockfd, struct sockaddr_storage *addr)
break;
}
default:
#ifdef G_OS_WIN32
WSASetLastError (WSAEAFNOSUPPORT);
#else
errno = EAFNOSUPPORT;
#endif
}
return ret;
}
@ -219,7 +223,11 @@ gst_udp_leave_group (int sockfd, struct sockaddr_storage *addr)
break;
default:
#ifdef G_OS_WIN32
WSASetLastError (WSAEAFNOSUPPORT);
#else
errno = EAFNOSUPPORT;
#endif
}
return ret;
@ -248,7 +256,11 @@ gst_udp_is_multicast (struct sockaddr_storage *addr)
break;
default:
#ifdef G_OS_WIN32
WSASetLastError (WSAEAFNOSUPPORT);
#else
errno = EAFNOSUPPORT;
#endif
}
return ret;

View file

@ -518,7 +518,11 @@ no_select:
}
break;
default:
#ifdef G_OS_WIN32
WSASetLastError (WSAEAFNOSUPPORT);
#else
errno = EAFNOSUPPORT;
#endif
goto receive_error;
}
GST_LOG_OBJECT (udpsrc, "read %d bytes", (int) readsize);