#include <locale.h>
#include <glib.h>
-#include <glib-unix.h>
#include <gst/gst.h>
#include <gst/sdp/sdp.h>
+#ifdef G_OS_UNIX
+#include <glib-unix.h>
+#endif
+
#define GST_USE_UNSTABLE_API
#include <gst/webrtc/webrtc.h>
static gchar *get_string_from_json_object (JsonObject * object);
-gboolean exit_sighandler (gpointer user_data);
-
return text;
}
-
+#ifdef G_OS_UNIX
gboolean
exit_sighandler (gpointer user_data)
{
g_main_loop_quit (mainloop);
return TRUE;
}
-
+#endif
int
main (int argc, char *argv[])
mainloop = g_main_loop_new (NULL, FALSE);
g_assert (mainloop != NULL);
+#ifdef G_OS_UNIX
g_unix_signal_add (SIGINT, exit_sighandler, mainloop);
g_unix_signal_add (SIGTERM, exit_sighandler, mainloop);
+#endif
soup_server =
soup_server_new (SOUP_SERVER_SERVER_HEADER, "webrtc-soup-server", NULL);
#include <locale.h>
#include <glib.h>
-#include <glib-unix.h>
#include <gst/gst.h>
#include <gst/sdp/sdp.h>
+#ifdef G_OS_UNIX
+#include <glib-unix.h>
+#endif
+
#define GST_USE_UNSTABLE_API
#include <gst/webrtc/webrtc.h>
static gchar *get_string_from_json_object (JsonObject * object);
-gboolean exit_sighandler (gpointer user_data);
-
struct _ReceiverEntry
{
SoupWebsocketConnection *connection;
return text;
}
-
+#ifdef G_OS_UNIX
gboolean
exit_sighandler (gpointer user_data)
{
g_main_loop_quit (mainloop);
return TRUE;
}
-
+#endif
int
main (int argc, char *argv[])
mainloop = g_main_loop_new (NULL, FALSE);
g_assert (mainloop != NULL);
+#ifdef G_OS_UNIX
g_unix_signal_add (SIGINT, exit_sighandler, mainloop);
g_unix_signal_add (SIGTERM, exit_sighandler, mainloop);
+#endif
soup_server =
soup_server_new (SOUP_SERVER_SERVER_HEADER, "webrtc-soup-server", NULL);