Misc win32 portability fixes
Based on a patch by Conrad Poelman
Olivier CrĂȘte
11 years ago
246 | 246 |
AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_32, [Prevent post 2.32 APIs])
|
247 | 247 |
|
248 | 248 |
|
249 | |
PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.32)
|
|
249 |
PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.32, [HAVE_GIO_UNIX=true],[HAVE_GIO_UNIX=false])
|
250 | 250 |
AC_SUBST(GIO_UNIX_CFLAGS)
|
251 | 251 |
AC_SUBST(GIO_UNIX_LIBS)
|
|
252 |
AM_CONDITIONAL(HAVE_GIO_UNIX, test "x$HAVE_GIO_UNIX" = "xyes")
|
252 | 253 |
|
253 | 254 |
dnl checks for gstreamer
|
254 | 255 |
dnl uninstalled is selected preferentially -- see pkg-config(1)
|
0 | 0 |
|
1 | |
noinst_PROGRAMS = simple-call simple-call-shm
|
|
1 |
if HAVE_GIO_UNIX
|
|
2 |
SIMPLE_CALL_SHM = simple-call-shm
|
|
3 |
else
|
|
4 |
SIMPLE_CALL_SHM =
|
|
5 |
endif
|
|
6 |
|
|
7 |
noinst_PROGRAMS = simple-call $(SIMPLE_CALL_SHM)
|
2 | 8 |
|
3 | 9 |
|
4 | 10 |
AM_CFLAGS = \
|
46 | 46 |
|
47 | 47 |
libfarstream_@FS_APIVERSION@_la_CFLAGS = \
|
48 | 48 |
$(FS_INTERNAL_CFLAGS) $(FS_CFLAGS) \
|
49 | |
$(GLIB_FLAGS) \
|
|
49 |
$(GLIB_CFLAGS) \
|
50 | 50 |
$(GST_PLUGINS_BASE_CFLAGS) \
|
51 | 51 |
$(GST_BASE_CFLAGS) \
|
52 | 52 |
$(GST_CFLAGS)
|
47 | 47 |
#include "fs-raw-stream.h"
|
48 | 48 |
#include "fs-raw-session.h"
|
49 | 49 |
|
50 | |
#include <arpa/inet.h>
|
51 | |
#include <fcntl.h>
|
52 | |
#include <netinet/in.h>
|
53 | |
#include <sys/socket.h>
|
54 | 50 |
#include <string.h>
|
55 | 51 |
#include <unistd.h>
|
56 | 52 |
|
913 | 913 |
x_recv = GST_READ_UINT32_BE (buf);
|
914 | 914 |
buf += 4;
|
915 | 915 |
loss_event_rate = (gdouble) GST_READ_UINT32_BE (buf) / (gdouble) G_MAXUINT;
|
916 | |
GST_LOG_OBJECT (self, "Got RTCP TFRC packet last_sent_ts: %u"
|
917 | |
" delay: %u x_recv: %u loss_event_rate: %f", ts, delay, x_recv,
|
918 | |
loss_event_rate);
|
|
916 |
GST_LOG_OBJECT (self, "Got RTCP TFRC packet last_sent_ts: %"
|
|
917 |
G_GUINT64_FORMAT " delay: %u x_recv: %u loss_event_rate: %f", ts,
|
|
918 |
delay, x_recv, loss_event_rate);
|
919 | 919 |
|
920 | 920 |
GST_OBJECT_LOCK (self);
|
921 | 921 |
|
|
967 | 967 |
|
968 | 968 |
if (rtt > 10 * 1000 * 1000)
|
969 | 969 |
{
|
970 | |
GST_WARNING_OBJECT (self, "Impossible RTT %u ms, ignoring", rtt);
|
|
970 |
GST_WARNING_OBJECT (self, "Impossible RTT %" G_GUINT64_FORMAT
|
|
971 |
" ms, ignoring", rtt);
|
971 | 972 |
goto done;
|
972 | 973 |
}
|
973 | 974 |
|
11 | 11 |
$(CFLAGS)
|
12 | 12 |
|
13 | 13 |
LDADD = \
|
|
14 |
$(top_builddir)/gst/fsrtpconference/libfsrtpconference-convenience.la \
|
14 | 15 |
$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
|
15 | |
$(top_builddir)/gst/fsrtpconference/libfsrtpconference-convenience.la \
|
16 | 16 |
$(GST_CHECK_LIBS) \
|
17 | 17 |
$(GST_PLUGINS_BASE_LIBS) \
|
18 | 18 |
$(GST_LIBS) \
|
41 | 41 |
#include <farstream/fs-conference.h>
|
42 | 42 |
#include <farstream/fs-plugin.h>
|
43 | 43 |
|
44 | |
#include <agent.h>
|
45 | |
|
46 | 44 |
#include <string.h>
|
47 | 45 |
#include <sys/types.h>
|
48 | 46 |
|
27 | 27 |
#include <farstream/fs-transmitter.h>
|
28 | 28 |
|
29 | 29 |
#include <gst/gst.h>
|
30 | |
#include <agent.h>
|
|
30 |
#include <nice/agent.h>
|
31 | 31 |
|
32 | 32 |
G_BEGIN_DECLS
|
33 | 33 |
|
561 | 561 |
socket_dir = g_build_filename (g_get_tmp_dir (),
|
562 | 562 |
"farstream-shm-XXXXXX", NULL);
|
563 | 563 |
|
564 | |
if (mkdtemp (socket_dir) == NULL)
|
|
564 |
if (g_mkdtemp (socket_dir) == NULL)
|
565 | 565 |
return FALSE;
|
566 | 566 |
|
567 | 567 |
self->priv->socket_dir = socket_dir;
|