[xiph-commits] r3138 - liboggplay/trunk/plugin
laser13 at svn.annodex.net
laser13 at svn.annodex.net
Thu Jun 28 18:12:12 PDT 2007
Author: laser13
Date: 2007-06-28 18:12:11 -0700 (Thu, 28 Jun 2007)
New Revision: 3138
Modified:
liboggplay/trunk/plugin/plugin_cmml.c
Log:
Changes to make CMML retrieval compile under Win32.
Modified: liboggplay/trunk/plugin/plugin_cmml.c
===================================================================
--- liboggplay/trunk/plugin/plugin_cmml.c 2007-06-29 01:06:12 UTC (rev 3137)
+++ liboggplay/trunk/plugin/plugin_cmml.c 2007-06-29 01:12:11 UTC (rev 3138)
@@ -48,9 +48,13 @@
#include <oggplay/oggplay.h>
#ifdef WIN32
+
#include <process.h>
#include <io.h>
+#include <winsock2.h>
+#define snprintf _snprintf
+
#else
#include <sys/types.h>
#include <sys/select.h>
@@ -61,10 +65,10 @@
#include <time.h>
#include <netdb.h>
#include <unistd.h>
+#include <pthread.h>
#endif
#include <assert.h>
-#include <pthread.h>
#include "plugin_cmml.h"
@@ -352,7 +356,12 @@
CmmlThreadInfo * info;
char * mdot = strrchr(movie, '.');
char * fname = malloc(mdot - movie + 6);
+#ifdef WIN32
+ HANDLE thread;
+ int tid;
+#else
pthread_t thread;
+#endif
strcpy(fname, movie);
strcpy(fname + (mdot - movie), ".cmml");
@@ -363,6 +372,11 @@
info->proxyPort = proxyPort;
info->plugin = i;
+#ifdef WIN32
+ thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)cmml_thread,
+ (LPVOID)info, 0, &tid);
+#else
pthread_create(&thread, NULL, cmml_thread, (void *)info);
+#endif
}
More information about the commits
mailing list