blob: 18c50919d2d2d7262cb867d17a6f95da2b4e3523 [file] [log] [blame]
--- farstream-0.2.4/farstream/fs-session.h
+++ farstream-0.2.4/farstream/fs-session.h
@@ -64,7 +64,6 @@
*/
typedef enum _FsDTMFEvent
{
- /*< protected >*/
FS_DTMF_EVENT_0 = 0,
FS_DTMF_EVENT_1 = 1,
FS_DTMF_EVENT_2 = 2,
--- farstream-0.2.4/gst/fsmsnconference/fs-msn-connection.c
+++ farstream-0.2.4/gst/fsmsnconference/fs-msn-connection.c
@@ -30,12 +30,19 @@
#include "fs-msn-connection.h"
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#define strerror_r(code, msg, msg_size) strerror_s((msg), (msg_size), (code))
+typedef int socklen_t;
+#else
#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#endif
#include <errno.h>
#include <fcntl.h>
-#include <netinet/in.h>
#include <string.h>
-#include <sys/socket.h>
#include <unistd.h>
#include <stdio.h>
#ifdef HAVE_STDLIB_H
@@ -484,8 +491,10 @@
goto error;
}
+#ifndef _WIN32
// set non-blocking mode
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
+#endif
for (;;) {
GST_DEBUG ("Attempting to listen on port %d.....",port);
memset(&myaddr, 0, sizeof(myaddr));
@@ -532,7 +541,7 @@
done:
- if (getsockname (fd, (struct sockaddr *) &myaddr, &myaddr_len) < 0) {
+ if (getsockname (fd, (struct sockaddr *) &myaddr, (void*)&myaddr_len) < 0) {
gchar error_str[256];
strerror_r (errno, error_str, 256);
g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
@@ -600,8 +609,10 @@
return FALSE;
}
+#ifndef _WIN32
// set non-blocking mode
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
+#endif
theiraddr.sin_family = AF_INET;
theiraddr.sin_addr.s_addr = inet_addr (candidate->ip);
--- farstream-0.2.4/gst/fsmsnconference/fs-msn-stream.c
+++ farstream-0.2.4/gst/fsmsnconference/fs-msn-stream.c
@@ -49,10 +49,15 @@
#include "fs-msn-stream.h"
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <arpa/inet.h>
-#include <fcntl.h>
#include <netinet/in.h>
#include <sys/socket.h>
+#endif
+#include <fcntl.h>
#include <string.h>
#include <unistd.h>
@@ -828,12 +833,12 @@
if (self->priv->fd < 0)
return;
- if (setsockopt (self->priv->fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0)
+ if (setsockopt (self->priv->fd, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof (tos)) < 0)
GST_WARNING ( "could not set socket ToS: %s", g_strerror (errno));
#ifdef IPV6_TCLASS
if (setsockopt (self->priv->fd, IPPROTO_IPV6, IPV6_TCLASS,
- &tos, sizeof (tos)) < 0)
+ (const void *)&tos, sizeof (tos)) < 0)
GST_WARNING ("could not set TCLASS: %s", g_strerror (errno));
#endif
}
--- farstream-0.2.4/gst/fsmsnconference/Makefile.am
+++ farstream-0.2.4/gst/fsmsnconference/Makefile.am
@@ -42,7 +42,8 @@
$(FS_LIBS) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
- $(NICE_LIBS)
+ $(NICE_LIBS) \
+ -lws2_32
--- farstream-0.2.4/transmitters/multicast/fs-multicast-transmitter.c
+++ farstream-0.2.4/transmitters/multicast/fs-multicast-transmitter.c
@@ -687,12 +687,12 @@
}
if (setsockopt (sock, IPPROTO_IP, IP_TOS,
- &type_of_service, sizeof (type_of_service)) < 0)
+ (const void*)&type_of_service, sizeof (type_of_service)) < 0)
GST_WARNING ("could not set socket ToS: %s", g_strerror (errno));
#ifdef IPV6_TCLASS
if (setsockopt (sock, IPPROTO_IPV6, IPV6_TCLASS,
- &type_of_service, sizeof (type_of_service)) < 0)
+ (const void*)&type_of_service, sizeof (type_of_service)) < 0)
GST_WARNING ("could not set TCLASS: %s", g_strerror (errno));
#endif
@@ -1223,12 +1223,12 @@
UdpSock *udpsock = item->data;
if (setsockopt (udpsock->fd, IPPROTO_IP, IP_TOS,
- &tos, sizeof (tos)) < 0)
+ (const void*)&tos, sizeof (tos)) < 0)
GST_WARNING ( "could not set socket tos: %s", g_strerror (errno));
#ifdef IPV6_TCLASS
if (setsockopt (udpsock->fd, IPPROTO_IPV6, IPV6_TCLASS,
- &tos, sizeof (tos)) < 0)
+ (const void*)&tos, sizeof (tos)) < 0)
GST_WARNING ("could not set TCLASS: %s", g_strerror (errno));
#endif
}
--- farstream-0.2.4/transmitters/multicast/Makefile.am
+++ farstream-0.2.4/transmitters/multicast/Makefile.am
@@ -21,7 +21,8 @@
$(FS_LIBS) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
- $(GIO_LIBS)
+ $(GIO_LIBS) \
+ -lws2_32
noinst_HEADERS = \
fs-multicast-transmitter.h \
--- farstream-0.2.4/transmitters/rawudp/fs-rawudp-transmitter.c
+++ farstream-0.2.4/transmitters/rawudp/fs-rawudp-transmitter.c
@@ -618,11 +618,11 @@
fd = g_socket_get_fd (socket);
- if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0)
+ if (setsockopt (fd, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof (tos)) < 0)
GST_WARNING ("could not set socket ToS: %s", g_strerror (errno));
#ifdef IPV6_TCLASS
- if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0)
+ if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, (const void *)&tos, sizeof (tos)) < 0)
GST_WARNING ("could not set TCLASS: %s", g_strerror (errno));
#endif
@@ -1299,11 +1299,11 @@
UdpPort *udpport = item->data;
int fd = g_socket_get_fd (udpport->socket);
- if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0)
+ if (setsockopt (fd, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof (tos)) < 0)
GST_WARNING ( "could not set socket ToS: %s", g_strerror (errno));
#ifdef IPV6_TCLASS
- if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0)
+ if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, (const void *)&tos, sizeof (tos)) < 0)
GST_WARNING ("could not set TCLASS: %s", g_strerror (errno));
#endif
}
--- farstream-0.2.4/transmitters/rawudp/Makefile.am
+++ farstream-0.2.4/transmitters/rawudp/Makefile.am
@@ -27,7 +27,8 @@
$(NICE_LIBS) \
$(GUPNP_LIBS) \
$(GIO_LIBS) \
- -lgstnet-@GST_API_VERSION@
+ -lgstnet-@GST_API_VERSION@ \
+ -lws2_32
noinst_HEADERS = \
fs-rawudp-transmitter.h \