Commit a7b2dcf0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove WinCE

parent a5b8b24f
...@@ -14,20 +14,15 @@ AM_CFLAGS = $(CFLAGS_vlc) ...@@ -14,20 +14,15 @@ AM_CFLAGS = $(CFLAGS_vlc)
if !HAVE_WIN32 if !HAVE_WIN32
if !HAVE_WINCE
bin_PROGRAMS += vlc-wrapper bin_PROGRAMS += vlc-wrapper
vlc_SOURCES = vlc.c override.c vlc_SOURCES = vlc.c override.c
endif endif
endif
EXTRA_vlc_SOURCES = vlc.c winvlc.c EXTRA_vlc_SOURCES = vlc.c winvlc.c
if HAVE_WIN32 if HAVE_WIN32
vlc_SOURCES = winvlc.c vlc_SOURCES = winvlc.c
noinst_DATA += vlc_win32_rc.rc noinst_DATA += vlc_win32_rc.rc
endif endif
if HAVE_WINCE
vlc_SOURCES = winvlc.c
endif
vlc_wrapper_SOURCES = rootwrap.c vlc_wrapper_SOURCES = rootwrap.c
vlc_wrapper_LDADD = $(SOCKET_LIBS) vlc_wrapper_LDADD = $(SOCKET_LIBS)
......
...@@ -33,23 +33,20 @@ ...@@ -33,23 +33,20 @@
#include <windows.h> #include <windows.h>
#include <shellapi.h> #include <shellapi.h>
#if !defined(UNDER_CE) #ifndef _WIN32_IE
# ifndef _WIN32_IE # define _WIN32_IE 0x501
# define _WIN32_IE 0x501 #endif
# endif #include <fcntl.h>
# include <fcntl.h> #include <io.h>
# include <io.h> #include <shlobj.h>
# include <shlobj.h> #include <wininet.h>
# include <wininet.h> #define PSAPI_VERSION 1
# define PSAPI_VERSION 1 #include <psapi.h>
# include <psapi.h> #define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1
# define HeapEnableTerminationOnCorruption (HEAP_INFORMATION_CLASS)1
static void check_crashdump(void); static void check_crashdump(void);
LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo); LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo);
static const wchar_t *crashdump_path; static const wchar_t *crashdump_path;
#endif
#ifndef UNDER_CE
static char *FromWide (const wchar_t *wide) static char *FromWide (const wchar_t *wide)
{ {
size_t len; size_t len;
...@@ -60,67 +57,13 @@ static char *FromWide (const wchar_t *wide) ...@@ -60,67 +57,13 @@ static char *FromWide (const wchar_t *wide)
WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL); WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL);
return out; return out;
} }
#else
static int parse_cmdline (char *line, char ***argvp)
{
char **argv = malloc (sizeof (char *));
int argc = 0;
while (*line != '\0')
{
char quote = 0;
/* Skips white spaces */
while (strchr ("\t ", *line))
line++;
if (!*line)
break;
/* Starts a new parameter */
argv = realloc (argv, (argc + 2) * sizeof (char *));
if (*line == '"')
{
quote = '"';
line++;
}
argv[argc++] = line;
more:
while (*line && !strchr ("\t ", *line))
line++;
if (line > argv[argc - 1] && line[-1] == quote)
/* End of quoted parameter */
line[-1] = 0;
else
if (*line && quote)
{
/* Space within a quote */
line++;
goto more;
}
else
/* End of unquoted parameter */
if (*line)
*line++ = 0;
}
argv[argc] = NULL;
*argvp = argv;
return argc;
}
#endif
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
#ifndef UNDER_CE
LPSTR lpCmdLine, LPSTR lpCmdLine,
#else
LPWSTR lpCmdLine,
#endif
int nCmdShow ) int nCmdShow )
{ {
int argc; int argc;
#ifndef UNDER_CE
/* VLC does not change the thread locale, so gettext/libintil will use the /* VLC does not change the thread locale, so gettext/libintil will use the
* user default locale as reference. */ * user default locale as reference. */
/* gettext versions 0.18-0.18.1 will use the Windows Vista locale name /* gettext versions 0.18-0.18.1 will use the Windows Vista locale name
...@@ -198,15 +141,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -198,15 +141,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
_setmode( STDIN_FILENO, _O_BINARY ); /* Needed for pipes */ _setmode( STDIN_FILENO, _O_BINARY ); /* Needed for pipes */
#else /* UNDER_CE */
char **argv, psz_cmdline[wcslen(lpCmdLine) * 4];
WideCharToMultiByte( CP_UTF8, 0, lpCmdLine, -1,
psz_cmdline, sizeof (psz_cmdline), NULL, NULL );
argc = parse_cmdline (psz_cmdline, &argv);
#endif
/* Initialize libvlc */ /* Initialize libvlc */
libvlc_instance_t *vlc; libvlc_instance_t *vlc;
vlc = libvlc_new (argc, (const char **)argv); vlc = libvlc_new (argc, (const char **)argv);
...@@ -227,7 +161,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -227,7 +161,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
return 0; return 0;
} }
#if !defined( UNDER_CE )
/* Crashdumps handling */ /* Crashdumps handling */
static void check_crashdump(void) static void check_crashdump(void)
{ {
...@@ -402,4 +335,3 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) ...@@ -402,4 +335,3 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
exit( 1 ); exit( 1 );
} }
} }
#endif
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
int fsync (int fd) int fsync (int fd)
{ {
#if defined(WIN32) && !defined(UNDER_CE) #if defined(WIN32)
/* WinCE can use FlushFileBuffers() but it operates on file handles */ /* WinCE can use FlushFileBuffers() but it operates on file handles */
return _commit (fd); return _commit (fd);
#else #else
......
...@@ -209,10 +209,6 @@ case "${host_os}" in ...@@ -209,10 +209,6 @@ case "${host_os}" in
AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.]) AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
case "${host_os}" in case "${host_os}" in
*wince* | *mingwce* | *mingw32ce*)
SYS=mingwce
dnl Sadly CeGCC still needs non-wince macros
;;
*mingw32*) *mingw32*)
SYS=mingw32 SYS=mingw32
;; ;;
...@@ -251,12 +247,6 @@ case "${host_os}" in ...@@ -251,12 +247,6 @@ case "${host_os}" in
AC_SUBST(PROGRAMFILES) AC_SUBST(PROGRAMFILES)
fi fi
if test "${SYS}" = "mingwce"; then
VLC_ADD_LIBS([libvlccore],[-lmmtimer])
AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
ac_default_prefix="`pwd`/_wince"
DESTDIR="`pwd`/_wince/"
fi
;; ;;
*nto*) *nto*)
SYS=nto SYS=nto
...@@ -283,7 +273,6 @@ AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux") ...@@ -283,7 +273,6 @@ AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2") AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1")
AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian") AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
dnl dnl
...@@ -422,7 +411,7 @@ dnl ...@@ -422,7 +411,7 @@ dnl
AM_ICONV AM_ICONV
dnl Check for broken versions of mingw-runtime compatability library dnl Check for broken versions of mingw-runtime compatability library
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [ AS_IF([test "${SYS}" = "mingw32"], [
AC_MSG_CHECKING(for broken mingw-runtime) AC_MSG_CHECKING(for broken mingw-runtime)
AC_PREPROC_IFELSE([AC_LANG_SOURCE([ AC_PREPROC_IFELSE([AC_LANG_SOURCE([
#include <_mingw.h> #include <_mingw.h>
...@@ -567,9 +556,6 @@ AC_SEARCH_LIBS(connect, [socket], [ ...@@ -567,9 +556,6 @@ AC_SEARCH_LIBS(connect, [socket], [
AS_IF([test "${SYS}" = "mingw32"], [ AS_IF([test "${SYS}" = "mingw32"], [
SOCKET_LIBS="-lws2_32" SOCKET_LIBS="-lws2_32"
]) ])
AS_IF([test "${SYS}" = "mingwce"], [
SOCKET_LIBS="-lws2"
])
]) ])
AC_SEARCH_LIBS([getaddrinfo], [nsl], [ AC_SEARCH_LIBS([getaddrinfo], [nsl], [
...@@ -609,9 +595,7 @@ AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define. ...@@ -609,9 +595,7 @@ AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.
AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage, AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
[AC_TRY_COMPILE( [AC_TRY_COMPILE(
[#include <sys/types.h> [#include <sys/types.h>
#if defined( UNDER_CE ) #if defined( WIN32 )
# include <winsock2.h>
#elif defined( WIN32 )
# include <winsock2.h> # include <winsock2.h>
#else #else
# include <sys/socket.h> # include <sys/socket.h>
...@@ -658,7 +642,7 @@ AC_SEARCH_LIBS(dlopen, [dl svld], [ ...@@ -658,7 +642,7 @@ AC_SEARCH_LIBS(dlopen, [dl svld], [
VLC_RESTORE_FLAGS VLC_RESTORE_FLAGS
# Windows # Windows
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [ AS_IF([test "${SYS}" = "mingw32"], [
LIBDL="" LIBDL=""
have_dynamic_objects="yes" #assume we can use shared objects have_dynamic_objects="yes" #assume we can use shared objects
]) ])
...@@ -678,7 +662,7 @@ AC_SUBST(LIBDL) ...@@ -678,7 +662,7 @@ AC_SUBST(LIBDL)
VLC_ADD_LIBS([lua],[$LIBDL]) VLC_ADD_LIBS([lua],[$LIBDL])
dnl Check for thread library dnl Check for thread library
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then if test "${SYS}" != "mingw32"; then
VLC_SAVE_FLAGS VLC_SAVE_FLAGS
LIBS="" LIBS=""
...@@ -702,7 +686,7 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then ...@@ -702,7 +686,7 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
dnl HP/UX port dnl HP/UX port
AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])]) AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
]) ])
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" fi # end "${SYS}" != "mingw32"
dnl Check for headers dnl Check for headers
AC_CHECK_HEADERS([search.h]) AC_CHECK_HEADERS([search.h])
...@@ -719,11 +703,11 @@ AC_CHECK_HEADERS([sys/mount.h], [], [], ...@@ -719,11 +703,11 @@ AC_CHECK_HEADERS([sys/mount.h], [], [],
#include <sys/param.h> #include <sys/param.h>
]) ])
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then if test "${SYS}" != "mingw32"; then
AC_CHECK_HEADERS(machine/param.h sys/shm.h) AC_CHECK_HEADERS(machine/param.h sys/shm.h)
AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h]) AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
AC_CHECK_HEADERS(syslog.h mntent.h) AC_CHECK_HEADERS(syslog.h mntent.h)
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" fi # end "${SYS}" != "mingw32"
dnl LP64 and LLP64 architectures had better define ssize_t by themselves... dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.]) dnl ` (fix VIM syntax highlight AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.]) dnl ` (fix VIM syntax highlight
...@@ -732,9 +716,9 @@ AC_CHECK_TYPE(ssize_t,, [ ...@@ -732,9 +716,9 @@ AC_CHECK_TYPE(ssize_t,, [
]) ])
dnl Check for threads library dnl Check for threads library
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then if test "${SYS}" != "mingw32"; then
AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(pthread.h)
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" fi # end "${SYS}" != "mingw32"
dnl It seems that autoconf detects pkg-config only during the first dnl It seems that autoconf detects pkg-config only during the first
dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case, dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
...@@ -746,7 +730,7 @@ PKG_PROG_PKG_CONFIG() ...@@ -746,7 +730,7 @@ PKG_PROG_PKG_CONFIG()
dnl On some OS we need static linking dnl On some OS we need static linking
AS_IF([test -n "${PKG_CONFIG}" ],[ AS_IF([test -n "${PKG_CONFIG}" ],[
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[ AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
PKG_CONFIG="${PKG_CONFIG} --static" PKG_CONFIG="${PKG_CONFIG} --static"
]) ])
]) ])
...@@ -793,7 +777,7 @@ AC_ARG_ENABLE(dbus, ...@@ -793,7 +777,7 @@ AC_ARG_ENABLE(dbus,
[compile D-Bus message bus support (default enabled)])]) [compile D-Bus message bus support (default enabled)])])
case "${SYS}" in case "${SYS}" in
linux*|*bsd*) linux*|*bsd*)
if test "${enable_dbus}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" if test "${enable_dbus}" != "no" -a "${SYS}" != "mingw32"
then then
dnl api stable dbus dnl api stable dbus
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0], PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0],
...@@ -896,7 +880,7 @@ AS_IF([test "${enable_coverage}" != "no"], [ ...@@ -896,7 +880,7 @@ AS_IF([test "${enable_coverage}" != "no"], [
LDFLAGS="-lgcov ${LDFLAGS}" LDFLAGS="-lgcov ${LDFLAGS}"
]) ])
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [ AS_IF([test "${SYS}" != "mingw32"], [
VLC_SAVE_FLAGS VLC_SAVE_FLAGS
CFLAGS="${CFLAGS} -fvisibility=hidden" CFLAGS="${CFLAGS} -fvisibility=hidden"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden" CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
...@@ -1076,13 +1060,9 @@ dnl Some plugins aren't useful on some platforms ...@@ -1076,13 +1060,9 @@ dnl Some plugins aren't useful on some platforms
dnl dnl
if test "${SYS}" = "os2"; then if test "${SYS}" = "os2"; then
VLC_ADD_PLUGIN([dynamicoverlay]) VLC_ADD_PLUGIN([dynamicoverlay])
elif test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then elif test "${SYS}" != "mingw32"; then
VLC_ADD_PLUGIN([dynamicoverlay access_shm]) VLC_ADD_PLUGIN([dynamicoverlay access_shm])
elif test "${SYS}" != "mingwce"; then elif test "${SYS}" = "darwin"; then
VLC_ADD_PLUGIN([access_smb dmo globalhotkeys])
VLC_ADD_LIBS([dmo],[-lole32 -luuid])
fi
if test "${SYS}" = "darwin"; then
VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices]) VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
fi fi
...@@ -1664,9 +1644,6 @@ You can get an updated one from http://www.live555.com/liveMedia .]) ...@@ -1664,9 +1644,6 @@ You can get an updated one from http://www.live555.com/liveMedia .])
AS_IF([test "${SYS}" = "mingw32"], [ AS_IF([test "${SYS}" = "mingw32"], [
# add ws2_32 for closesocket, select, recv # add ws2_32 for closesocket, select, recv
other_libs="$other_libs -lws2_32" other_libs="$other_libs -lws2_32"
], [test "${SYS}" = "mingwce"], [
# add ws2 for closesocket, select, recv
other_libs="$other_libs -lws2"
]) ])
dnl We need to check for pic because live555 don't provide shared libs dnl We need to check for pic because live555 don't provide shared libs
...@@ -3011,7 +2988,7 @@ dnl X C Bindings modules ...@@ -3011,7 +2988,7 @@ dnl X C Bindings modules
dnl dnl
AC_ARG_ENABLE(xcb, AC_ARG_ENABLE(xcb,
[ --enable-xcb X11 support with XCB (default enabled)],, [ [ --enable-xcb X11 support with XCB (default enabled)],, [
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin" -a "${SYS}" != "symbian"], [ AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" -a "${SYS}" != "symbian"], [
enable_xcb="yes" enable_xcb="yes"
], [ ], [
enable_xcb="no" enable_xcb="no"
...@@ -3214,7 +3191,7 @@ dnl ...@@ -3214,7 +3191,7 @@ dnl
dnl Windows DirectX module dnl Windows DirectX module
dnl dnl
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" if test "${SYS}" = "mingw32"
then then
VLC_ADD_PLUGIN([panoramix]) VLC_ADD_PLUGIN([panoramix])
fi fi
...@@ -3222,7 +3199,7 @@ fi ...@@ -3222,7 +3199,7 @@ fi
AC_ARG_ENABLE(directx, AC_ARG_ENABLE(directx,
[AS_HELP_STRING([--enable-directx], [AS_HELP_STRING([--enable-directx],
[Microsoft DirectX support (default enabled on Windows)])],, [ [Microsoft DirectX support (default enabled on Windows)])],, [
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [ AS_IF([test "${SYS}" = "mingw32"], [
enable_directx="yes" enable_directx="yes"
], [ ], [
enable_directx="no" enable_directx="no"
...@@ -3260,7 +3237,7 @@ dnl Windows Direct2D plugin ...@@ -3260,7 +3237,7 @@ dnl Windows Direct2D plugin
dnl dnl
AC_ARG_ENABLE(direct2d, AC_ARG_ENABLE(direct2d,
[ --enable-direct2d Win7/VistaPU Direct2D support (default auto on Win32)],, [ [ --enable-direct2d Win7/VistaPU Direct2D support (default auto on Win32)],, [
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [ AS_IF([test "${SYS}" != "mingw32"], [
enable_direct2d="no" enable_direct2d="no"
]) ])
]) ])
...@@ -3283,11 +3260,6 @@ if test "${enable_wingdi}" != "no"; then ...@@ -3283,11 +3260,6 @@ if test "${enable_wingdi}" != "no"; then
VLC_ADD_PLUGIN([wingdi]) VLC_ADD_PLUGIN([wingdi])
VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32 -luuid]) VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32 -luuid])
fi fi
if test "${SYS}" = "mingwce"; then
VLC_ADD_PLUGIN([wingdi wingapi])
VLC_ADD_LIBS([wingdi],[-laygshell])
VLC_ADD_LIBS([wingapi],[-laygshell])
fi
fi fi
...@@ -3473,7 +3445,7 @@ dnl ...@@ -3473,7 +3445,7 @@ dnl
AC_ARG_ENABLE(oss, AC_ARG_ENABLE(oss,
[AS_HELP_STRING([--enable-oss], [AS_HELP_STRING([--enable-oss],
[support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)])],, [ [support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)])],, [
AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [ AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
enable_oss="no" enable_oss="no"
]) ])
]) ])
...@@ -3537,9 +3509,6 @@ if test "${enable_waveout}" != "no"; then ...@@ -3537,9 +3509,6 @@ if test "${enable_waveout}" != "no"; then
VLC_ADD_PLUGIN([waveout]) VLC_ADD_PLUGIN([waveout])
VLC_ADD_LIBS([waveout],[-lwinmm]) VLC_ADD_LIBS([waveout],[-lwinmm])
fi fi
if test "${SYS}" = "mingwce"; then
VLC_ADD_PLUGIN([waveout])
fi
fi fi
dnl dnl
...@@ -3667,7 +3636,7 @@ AS_IF([test "${enable_qt}" != "no"], [ ...@@ -3667,7 +3636,7 @@ AS_IF([test "${enable_qt}" != "no"], [
VLC_RESTORE_FLAGS VLC_RESTORE_FLAGS
AC_LANG_POP([C++]) AC_LANG_POP([C++])
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [ AS_IF([test "${SYS}" = "mingw32"], [
VLC_ADD_LIBS([qt4],[-lole32]) VLC_ADD_LIBS([qt4],[-lole32])
]) ])
AS_IF([test "${SYS}" = "darwin" ],[ AS_IF([test "${SYS}" = "darwin" ],[
...@@ -4082,7 +4051,7 @@ AC_ARG_WITH(kde-solid, ...@@ -4082,7 +4051,7 @@ AC_ARG_WITH(kde-solid,
AS_HELP_STRING([--with-kde-solid=PATH], AS_HELP_STRING([--with-kde-solid=PATH],
[KDE Solid actions directory (auto)]),, [ [KDE Solid actions directory (auto)]),, [
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin" ; then if test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ; then
with_kde_solid="yes" with_kde_solid="yes"
fi fi
]) ])
......
...@@ -10,14 +10,9 @@ win32_xpi_destdir=$(abs_top_builddir)/vlc-plugin-$(VERSION) ...@@ -10,14 +10,9 @@ win32_xpi_destdir=$(abs_top_builddir)/vlc-plugin-$(VERSION)
7Z_OPTS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on 7Z_OPTS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on
if HAVE_WINCE
build-npapi:
touch $@
else
if HAVE_WIN32 if HAVE_WIN32
include extras/package/npapi.am include extras/package/npapi.am
endif endif
endif
if HAVE_WIN64 if HAVE_WIN64
WINVERSION=vlc-$(VERSION)-win64 WINVERSION=vlc-$(VERSION)-win64
...@@ -67,12 +62,10 @@ if BUILD_OSDMENU ...@@ -67,12 +62,10 @@ if BUILD_OSDMENU
done done
endif endif
if !HAVE_WINCE
cp "$(top_builddir)/npapi-vlc/activex/axvlc.dll.manifest" "$(win32_destdir)/" cp "$(top_builddir)/npapi-vlc/activex/axvlc.dll.manifest" "$(win32_destdir)/"
cp "$(top_builddir)/npapi-vlc/installed/lib/axvlc.dll" "$(win32_destdir)/" cp "$(top_builddir)/npapi-vlc/installed/lib/axvlc.dll" "$(win32_destdir)/"
cp "$(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest" "$(win32_destdir)/" cp "$(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest" "$(win32_destdir)/"
cp "$(top_builddir)/npapi-vlc/installed/lib/npvlc.dll" "$(win32_destdir)/" cp "$(top_builddir)/npapi-vlc/installed/lib/npvlc.dll" "$(win32_destdir)/"
endif
# Compiler shared DLLs, when using compilers built with --enable-shared # Compiler shared DLLs, when using compilers built with --enable-shared
# If gcc_s_sjlj/stdc++-6 DLLs exist, our C++ modules were linked to them # If gcc_s_sjlj/stdc++-6 DLLs exist, our C++ modules were linked to them
...@@ -84,13 +77,11 @@ endif ...@@ -84,13 +77,11 @@ endif
cp -r $(prefix)/include "$(win32_destdir)/sdk" cp -r $(prefix)/include "$(win32_destdir)/sdk"
cp -r $(prefix)/lib/pkgconfig "$(win32_destdir)/sdk/lib" cp -r $(prefix)/lib/pkgconfig "$(win32_destdir)/sdk/lib"
cd $(prefix)/lib && cp -rv libvlc.dll.a libvlc.la libvlccore.dll.a libvlccore.la "$(win32_destdir)/sdk/lib/" cd $(prefix)/lib && cp -rv libvlc.dll.a libvlc.la libvlccore.dll.a libvlccore.la "$(win32_destdir)/sdk/lib/"
if !HAVE_WINCE
$(DLLTOOL) -D libvlc.dll -l "$(win32_destdir)/sdk/lib/libvlc.lib" -d "$(top_builddir)/lib/.libs/libvlc.dll.def" "$(prefix)/bin/libvlc.dll" $(DLLTOOL) -D libvlc.dll -l "$(win32_destdir)/sdk/lib/libvlc.lib" -d "$(top_builddir)/lib/.libs/libvlc.dll.def" "$(prefix)/bin/libvlc.dll"
$(DLLTOOL) -D libvlccore.dll -l "$(win32_destdir)/sdk/lib/libvlccore.lib" -d "$(top_builddir)/src/.libs/libvlccore.dll.def" "$(prefix)/bin/libvlccore.dll" $(DLLTOOL) -D libvlccore.dll -l "$(win32_destdir)/sdk/lib/libvlccore.lib" -d "$(top_builddir)/src/.libs/libvlccore.dll.def" "$(prefix)/bin/libvlccore.dll"
mkdir -p "$(win32_destdir)/sdk/activex/" mkdir -p "$(win32_destdir)/sdk/activex/"
cd $(top_builddir)/npapi-vlc && cp activex/README.TXT share/test.html $(win32_destdir)/sdk/activex/ cd $(top_builddir)/npapi-vlc && cp activex/README.TXT share/test.html $(win32_destdir)/sdk/activex/
endif
# Convert to DOS line endings # Convert to DOS line endings
find $(win32_destdir) -type f \( -name "*xml" -or -name "*html" -or -name '*js' -or -name '*css' -or -name '*hosts' -or -iname '*txt' -or -name '*.cfg' -or -name '*.lua' \) -exec $(U2D) {} \; find $(win32_destdir) -type f \( -name "*xml" -or -name "*html" -or -name '*js' -or -name '*css' -or -name '*hosts' -or -iname '*txt' -or -name '*.cfg' -or -name '*.lua' \) -exec $(U2D) {} \;
......
...@@ -40,7 +40,7 @@ static inline void *realloc_down( void *ptr, size_t size ) ...@@ -40,7 +40,7 @@ static inline void *realloc_down( void *ptr, size_t size )
/** /**
* Simple dynamic array handling. Array is realloced at each insert/removal * Simple dynamic array handling. Array is realloced at each insert/removal
*/ */
#if defined( _MSC_VER ) && _MSC_VER < 1300 && !defined( UNDER_CE ) #if defined( _MSC_VER ) && _MSC_VER < 1300
# define VLCCVP (void**) /* Work-around for broken compiler */ # define VLCCVP (void**) /* Work-around for broken compiler */
#else #else
# define VLCCVP # define VLCCVP
......
...@@ -65,15 +65,13 @@ static inline void vlc_rewinddir( DIR *dir ) ...@@ -65,15 +65,13 @@ static inline void vlc_rewinddir( DIR *dir )
# define rewinddir vlc_rewinddir # define rewinddir vlc_rewinddir
# include <sys/stat.h> # include <sys/stat.h>
# ifndef UNDER_CE # ifndef stat
# ifndef stat # define stat _stati64
# define stat _stati64
# endif
# ifndef fstat
# define fstat _fstati64
# endif
# define lseek _lseeki64
# endif # endif
# ifndef fstat
# define fstat _fstati64
# endif
#define lseek _lseeki64
#endif #endif
#ifdef __ANDROID__ #ifdef __ANDROID__
......
...@@ -126,7 +126,7 @@ VLC_API void vlc_Unsubscribe(msg_subscription_t *); ...@@ -126,7 +126,7 @@ VLC_API void vlc_Unsubscribe(msg_subscription_t *);
/*@}*/ /*@}*/
#if defined( WIN32 ) && !defined( UNDER_CE ) #if defined( WIN32 )
# define CONSOLE_INTRO_MSG \ # define CONSOLE_INTRO_MSG \
if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \ if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \
{ \ { \
......
...@@ -33,10 +33,8 @@ ...@@ -33,10 +33,8 @@
*/ */
#if defined( WIN32 ) #if defined( WIN32 )
# if !defined(UNDER_CE) # define _NO_OLDNAMES 1
# define _NO_OLDNAMES 1 # include <io.h>
# include <io.h>
# endif
# include <winsock2.h> # include <winsock2.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
# define net_errno (WSAGetLastError()) # define net_errno (WSAGetLastError())
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
* *
*/ */
#if defined( UNDER_CE ) #if defined( WIN32 )
#elif defined( WIN32 )
# include <process.h> /* Win32 API */ # include <process.h> /* Win32 API */
#elif defined( __OS2__ ) /* OS/2 API */ #elif defined( __OS2__ ) /* OS/2 API */
...@@ -456,7 +455,7 @@ static inline void vlc_spin_destroy (vlc_spinlock_t *spin) ...@@ -456,7 +455,7 @@ static inline void vlc_spin_destroy (vlc_spinlock_t *spin)
pthread_spin_destroy (spin); pthread_spin_destroy (spin);
} }
#elif defined (WIN32) && !defined (UNDER_CE) #elif defined (WIN32)
typedef CRITICAL_SECTION vlc_spinlock_t; typedef CRITICAL_SECTION vlc_spinlock_t;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
# include <fcntl.h> # include <fcntl.h>
#elif defined( WIN32 ) && !defined( UNDER_CE ) #elif defined( WIN32 )
# include <io.h> # include <io.h>
#endif #endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( WIN32 ) && !defined( UNDER_CE ) #elif defined( WIN32 )
# include <io.h> # include <io.h>
#endif #endif
......
...@@ -114,7 +114,7 @@ static bool IsRemote (int fd) ...@@ -114,7 +114,7 @@ static bool IsRemote (int fd)
#else /* WIN32 || __OS2__ */ #else /* WIN32 || __OS2__ */
static bool IsRemote (const char *path) static bool IsRemote (const char *path)
{ {
# if !defined(UNDER_CE) && !defined(__OS2__) # if !defined(__OS2__)
wchar_t *wpath = ToWide (path); wchar_t *wpath = ToWide (path);
bool is_remote = (wpath != NULL && PathIsNetworkPathW (wpath)); bool is_remote = (wpath != NULL && PathIsNetworkPathW (wpath));
free (wpath); free (wpath);
......
...@@ -1023,10 +1023,6 @@ static int mms_CommandSend( access_t *p_access, int i_command, ...@@ -1023,10 +1023,6 @@ static int mms_CommandSend( access_t *p_access, int i_command,
static int NetFillBuffer( access_t *p_access ) static int NetFillBuffer( access_t *p_access )
{ {
#ifdef UNDER_CE
return -1;
#else
access_sys_t *p_sys = p_access->p_sys; access_sys_t *p_sys = p_access->p_sys;
int i_ret; int i_ret;
struct pollfd ufd[2]; struct pollfd ufd[2];
...@@ -1143,7 +1139,6 @@ static int NetFillBuffer( access_t *p_access ) ...@@ -1143,7 +1139,6 @@ static int NetFillBuffer( access_t *p_access )
if( i_udp_read > 0 ) p_sys->i_buffer_udp += i_udp_read; if( i_udp_read > 0 ) p_sys->i_buffer_udp += i_udp_read;
return i_tcp_read + i_udp_read; return i_tcp_read + i_udp_read;
#endif
} }
static int mms_ParseCommand( access_t *p_access, static int mms_ParseCommand( access_t *p_access,
......
...@@ -50,7 +50,7 @@ See http://www.vdr-wiki.de/ and http://www.tvdr.de/ for more information. ...@@ -50,7 +50,7 @@ See http://www.vdr-wiki.de/ and http://www.tvdr.de/ for more information.
#include <fcntl.h> #include <fcntl.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( WIN32 ) && !defined( UNDER_CE ) #elif defined( WIN32 )
# include <io.h> # include <io.h>
#endif #endif
......
...@@ -136,7 +136,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -136,7 +136,6 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
} }
#ifndef UNDER_CE
else else
if( !strcmp( p_access->psz_path, "-" ) ) if( !strcmp( p_access->psz_path, "-" ) )
{ {
...@@ -151,7 +150,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -151,7 +150,6 @@ static int Open( vlc_object_t *p_this )
} }
msg_Dbg( p_access, "using stdout" ); msg_Dbg( p_access, "using stdout" );
} }
#endif
else else
{ {
char *psz_tmp = str_format_time( p_access->psz_path ); char *psz_tmp = str_format_time( p_access->psz_path );
......
...@@ -296,7 +296,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -296,7 +296,6 @@ static int Open( vlc_object_t *p_this )
aout_PacketInit( p_aout, &p_aout->sys->packet, FRAME_SIZE ); aout_PacketInit( p_aout, &p_aout->sys->packet, FRAME_SIZE );
#ifndef UNDER_CE
/* Check for hardware volume support */ /* Check for hardware volume support */
if( waveOutGetDevCaps( (UINT_PTR)p_aout->sys->h_waveout, if( waveOutGetDevCaps( (UINT_PTR)p_aout->sys->h_waveout,
&wocaps, sizeof(wocaps) ) == MMSYSERR_NOERROR &wocaps, sizeof(wocaps) ) == MMSYSERR_NOERROR
...@@ -308,7 +307,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -308,7 +307,6 @@ static int Open( vlc_object_t *p_this )
p_aout->sys->mute = false; p_aout->sys->mute = false;
} }
else else
#endif
aout_SoftVolumeInit( p_aout ); aout_SoftVolumeInit( p_aout );
} }
...@@ -1000,7 +998,6 @@ static void* WaveOutThread( void *data ) ...@@ -1000,7 +998,6 @@ static void* WaveOutThread( void *data )
return NULL; return NULL;
} }
#ifndef UNDER_CE
static int VolumeSet( audio_output_t *aout, float volume ) static int VolumeSet( audio_output_t *aout, float volume )
{ {
aout_sys_t *sys = aout->sys; aout_sys_t *sys = aout->sys;
...@@ -1030,7 +1027,6 @@ static int MuteSet( audio_output_t * p_aout, bool mute ) ...@@ -1030,7 +1027,6 @@ static int MuteSet( audio_output_t * p_aout, bool mute )
waveOutSetVolume( hwo, vol | (vol << 16) ); waveOutSetVolume( hwo, vol | (vol << 16) );
return 0; return 0;
} }
#endif
/* /*
reload the configuration drop down list, of the Audio Devices reload the configuration drop down list, of the Audio Devices
......
...@@ -71,9 +71,7 @@ typedef struct { ...@@ -71,9 +71,7 @@ typedef struct {
} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE; } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
#endif #endif
#ifndef UNDER_CE #include <dsound.h>
# include <dsound.h>
#endif
#ifndef SPEAKER_FRONT_LEFT #ifndef SPEAKER_FRONT_LEFT
# define SPEAKER_FRONT_LEFT 0x1 # define SPEAKER_FRONT_LEFT 0x1
......
...@@ -107,11 +107,7 @@ vlc_module_begin () ...@@ -107,11 +107,7 @@ vlc_module_begin ()
set_description( N_("MPEG audio layer I/II/III decoder") ) set_description( N_("MPEG audio layer I/II/III decoder") )
set_category( CAT_INPUT ) set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACODEC ) set_subcategory( SUBCAT_INPUT_ACODEC )
#if defined(UNDER_CE)
set_capability( "decoder", 5 )
#else
set_capability( "decoder", 100 ) set_capability( "decoder", 100 )
#endif
set_callbacks( OpenDecoder, CloseDecoder ) set_callbacks( OpenDecoder, CloseDecoder )
add_submodule () add_submodule ()
......
...@@ -20,9 +20,7 @@ libvlc_LTLIBRARIES += \ ...@@ -20,9 +20,7 @@ libvlc_LTLIBRARIES += \
libdummy_plugin.la \ libdummy_plugin.la \
libgestures_plugin.la \ libgestures_plugin.la \
libnetsync_plugin.la \ libnetsync_plugin.la \
libhotkeys_plugin.la libhotkeys_plugin.la \
if !HAVE_WINCE
libvlc_LTLIBRARIES += \
liboldrc_plugin.la liboldrc_plugin.la
if !HAVE_WIN32 if !HAVE_WIN32
libvlc_LTLIBRARIES += \ libvlc_LTLIBRARIES += \
...@@ -30,5 +28,4 @@ libvlc_LTLIBRARIES += \ ...@@ -30,5 +28,4 @@ libvlc_LTLIBRARIES += \
else else
libvlc_LTLIBRARIES += \ libvlc_LTLIBRARIES += \
libntservice_plugin.la libntservice_plugin.la
endif
endif endif
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_fs.h> #include <vlc_fs.h>
#if defined( WIN32 ) && !defined( UNDER_CE ) #if defined( WIN32 )
# include <mmsystem.h> # include <mmsystem.h>
#elif defined(__linux__) #elif defined(__linux__)
# include <sys/types.h> # include <sys/types.h>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "../commands/cmd_dialogs.hpp" #include "../commands/cmd_dialogs.hpp"
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( WIN32 ) && !defined( UNDER_CE ) #elif defined( WIN32 )
# include <direct.h> # include <direct.h>
#endif #endif
......
...@@ -38,10 +38,6 @@ SOURCES_lua = \ ...@@ -38,10 +38,6 @@ SOURCES_lua = \
if HAVE_WIN32 if HAVE_WIN32
SOURCES_lua += libs/win.c SOURCES_lua += libs/win.c
else
if HAVE_WINCE
SOURCES_lua += libs/win.c
endif
endif endif
libvlc_LTLIBRARIES += liblua_plugin.la libvlc_LTLIBRARIES += liblua_plugin.la
...@@ -16,7 +16,5 @@ libvlc_LTLIBRARIES += libstream_filter_httplive_plugin.la ...@@ -16,7 +16,5 @@ libvlc_LTLIBRARIES += libstream_filter_httplive_plugin.la
endif endif
if !HAVE_WIN32 if !HAVE_WIN32
if !HAVE_WINCE
libvlc_LTLIBRARIES += libdecomp_plugin.la libvlc_LTLIBRARIES += libdecomp_plugin.la
endif endif
endif
...@@ -84,9 +84,6 @@ rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto, ...@@ -84,9 +84,6 @@ rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto,
/* RTP/RTCP mux: duplicate the socket */ /* RTP/RTCP mux: duplicate the socket */
#ifndef WIN32 #ifndef WIN32
fd = vlc_dup (rtp_fd); fd = vlc_dup (rtp_fd);
#elif defined(UNDER_CE)
#warning Muxed RTP/RTCP unimplemented!
fd = -1;
#else #else
WSAPROTOCOL_INFO info; WSAPROTOCOL_INFO info;
WSADuplicateSocket (rtp_fd, GetCurrentProcessId (), &info); WSADuplicateSocket (rtp_fd, GetCurrentProcessId (), &info);
......
...@@ -422,7 +422,7 @@ static void RtspClientAlive( rtsp_session_t *session ) ...@@ -422,7 +422,7 @@ static void RtspClientAlive( rtsp_session_t *session )
static int dup_socket(int oldfd) static int dup_socket(int oldfd)
{ {
int newfd; int newfd;
#if !defined(WIN32) || defined(UNDER_CE) #ifndef WIN32
newfd = vlc_dup(oldfd); newfd = vlc_dup(oldfd);
#else #else
WSAPROTOCOL_INFO info; WSAPROTOCOL_INFO info;
......
...@@ -5,6 +5,3 @@ SOURCES_tdummy = tdummy.c ...@@ -5,6 +5,3 @@ SOURCES_tdummy = tdummy.c
SOURCES_win32text = win32text.c SOURCES_win32text = win32text.c
libvlc_LTLIBRARIES += libtdummy_plugin.la libvlc_LTLIBRARIES += libtdummy_plugin.la
if HAVE_WINCE
libvlc_LTLIBRARIES += libwin32text_plugin.la
endif
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#elif defined( WIN32 ) && !defined( UNDER_CE ) #elif defined( WIN32 )
# include <io.h> # include <io.h>
#endif #endif
......
...@@ -95,7 +95,7 @@ static int Open(vlc_object_t *object) ...@@ -95,7 +95,7 @@ static int Open(vlc_object_t *object)
# endif # endif
#endif #endif
#if defined(WIN32) && !defined(UNDER_CE) #if defined(WIN32)
CONSOLE_SCREEN_BUFFER_INFO csbiInfo; CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
SMALL_RECT rect; SMALL_RECT rect;
COORD coord; COORD coord;
...@@ -216,7 +216,7 @@ error: ...@@ -216,7 +216,7 @@ error:
free(sys); free(sys);
} }
#if defined(WIN32) && !defined(UNDER_CE) #if defined(WIN32)
FreeConsole(); FreeConsole();
#endif #endif
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -237,7 +237,7 @@ static void Close(vlc_object_t *object) ...@@ -237,7 +237,7 @@ static void Close(vlc_object_t *object)
caca_free_display(sys->dp); caca_free_display(sys->dp);
cucul_free_canvas(sys->cv); cucul_free_canvas(sys->cv);
#if defined(WIN32) && !defined(UNDER_CE) #if defined(WIN32)
FreeConsole(); FreeConsole();
#endif #endif
......
...@@ -54,22 +54,13 @@ ...@@ -54,22 +54,13 @@
#include "common.h" #include "common.h"
#ifndef UNDER_CE
#include <vlc_windows_interfaces.h> #include <vlc_windows_interfaces.h>
#endif
#ifdef UNDER_CE
#include <aygshell.h>
//WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState);
#endif
static void CommonChangeThumbnailClip(vout_display_t *, bool show); static void CommonChangeThumbnailClip(vout_display_t *, bool show);
static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen); static int CommonControlSetFullscreen(vout_display_t *, bool is_fullscreen);
#if !defined(UNDER_CE)
static void DisableScreensaver(vout_display_t *); static void DisableScreensaver(vout_display_t *);
static void RestoreScreensaver(vout_display_t *); static void RestoreScreensaver(vout_display_t *);
#endif
/* */ /* */
int CommonInit(vout_display_t *vd) int CommonInit(vout_display_t *vd)
...@@ -124,10 +115,8 @@ int CommonInit(vout_display_t *vd) ...@@ -124,10 +115,8 @@ int CommonInit(vout_display_t *vd)
} }
/* Why not with glwin32 */ /* Why not with glwin32 */
#if !defined(UNDER_CE)
var_Create(vd, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT); var_Create(vd, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
DisableScreensaver (vd); DisableScreensaver (vd);
#endif
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -143,9 +132,7 @@ void CommonClean(vout_display_t *vd) ...@@ -143,9 +132,7 @@ void CommonClean(vout_display_t *vd)
EventThreadDestroy(sys->event); EventThreadDestroy(sys->event);
} }
#if !defined(UNDER_CE)
RestoreScreensaver(vd); RestoreScreensaver(vd);
#endif
} }
void CommonManage(vout_display_t *vd) void CommonManage(vout_display_t *vd)
...@@ -279,7 +266,6 @@ void AlignRect(RECT *r, int align_boundary, int align_size) ...@@ -279,7 +266,6 @@ void AlignRect(RECT *r, int align_boundary, int align_size)
/* */ /* */
static void CommonChangeThumbnailClip(vout_display_t *vd, bool show) static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
{ {
#ifndef UNDER_CE
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
/* Windows 7 taskbar thumbnail code */ /* Windows 7 taskbar thumbnail code */
...@@ -317,7 +303,6 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show) ...@@ -317,7 +303,6 @@ static void CommonChangeThumbnailClip(vout_display_t *vd, bool show)
taskbl->lpVtbl->Release(taskbl); taskbl->lpVtbl->Release(taskbl);
} }
CoUninitialize(); CoUninitialize();
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -527,15 +512,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen) ...@@ -527,15 +512,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
SetWindowLong(hwnd, GWL_STYLE, WS_CLIPCHILDREN | WS_VISIBLE); SetWindowLong(hwnd, GWL_STYLE, WS_CLIPCHILDREN | WS_VISIBLE);
if (sys->hparent) { if (sys->hparent) {
#ifdef UNDER_CE
POINT point = {0,0};
RECT rect;
ClientToScreen(sys->hwnd, &point);
GetClientRect(sys->hwnd, &rect);
SetWindowPos(hwnd, 0, point.x, point.y,
rect.right, rect.bottom,
SWP_NOZORDER|SWP_FRAMECHANGED);
#else
/* Retrieve current window position so fullscreen will happen /* Retrieve current window position so fullscreen will happen
*on the right screen */ *on the right screen */
HMONITOR hmon = MonitorFromWindow(sys->hparent, HMONITOR hmon = MonitorFromWindow(sys->hparent,
...@@ -549,7 +525,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen) ...@@ -549,7 +525,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.right - mi.rcMonitor.left,
mi.rcMonitor.bottom - mi.rcMonitor.top, mi.rcMonitor.bottom - mi.rcMonitor.top,
SWP_NOZORDER|SWP_FRAMECHANGED); SWP_NOZORDER|SWP_FRAMECHANGED);
#endif
} else { } else {
/* Maximize non embedded window */ /* Maximize non embedded window */
ShowWindow(hwnd, SW_SHOWMAXIMIZED); ShowWindow(hwnd, SW_SHOWMAXIMIZED);
...@@ -564,11 +539,7 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen) ...@@ -564,11 +539,7 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
rect.right, rect.bottom, rect.right, rect.bottom,
SWP_NOZORDER|SWP_FRAMECHANGED); SWP_NOZORDER|SWP_FRAMECHANGED);
#ifdef UNDER_CE
HWND topLevelParent = GetParent(sys->hparent);
#else
HWND topLevelParent = GetAncestor(sys->hparent, GA_ROOT); HWND topLevelParent = GetAncestor(sys->hparent, GA_ROOT);
#endif
ShowWindow(topLevelParent, SW_HIDE); ShowWindow(topLevelParent, SW_HIDE);
} }
SetForegroundWindow(hwnd); SetForegroundWindow(hwnd);
...@@ -586,11 +557,7 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen) ...@@ -586,11 +557,7 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
rect.right, rect.bottom, rect.right, rect.bottom,
SWP_NOZORDER|SWP_FRAMECHANGED); SWP_NOZORDER|SWP_FRAMECHANGED);
#ifdef UNDER_CE
HWND topLevelParent = GetParent(sys->hparent);
#else
HWND topLevelParent = GetAncestor(sys->hparent, GA_ROOT); HWND topLevelParent = GetAncestor(sys->hparent, GA_ROOT);
#endif
ShowWindow(topLevelParent, SW_SHOW); ShowWindow(topLevelParent, SW_SHOW);
SetForegroundWindow(sys->hparent); SetForegroundWindow(sys->hparent);
ShowWindow(hwnd, SW_HIDE); ShowWindow(hwnd, SW_HIDE);
...@@ -688,7 +655,6 @@ int CommonControl(vout_display_t *vd, int query, va_list args) ...@@ -688,7 +655,6 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
} }
} }
#if !defined(UNDER_CE)
static void DisableScreensaver(vout_display_t *vd) static void DisableScreensaver(vout_display_t *vd)
{ {
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
...@@ -731,5 +697,3 @@ static void RestoreScreensaver(vout_display_t *vd) ...@@ -731,5 +697,3 @@ static void RestoreScreensaver(vout_display_t *vd)
sys->i_spi_screensaveactive, NULL, 0); sys->i_spi_screensaveactive, NULL, 0);
} }
} }
#endif
...@@ -93,13 +93,9 @@ struct vout_display_sys_t ...@@ -93,13 +93,9 @@ struct vout_display_sys_t
bool is_first_display; bool is_first_display;
bool is_on_top; bool is_on_top;
#ifndef UNDER_CE
/* screensaver system settings to be restored when vout is closed */ /* screensaver system settings to be restored when vout is closed */
UINT i_spi_screensaveactive; UINT i_spi_screensaveactive;
#endif
/* Coordinates of src and dest images (used when blitting to display) */ /* Coordinates of src and dest images (used when blitting to display) */
RECT rect_src; RECT rect_src;
RECT rect_src_clipped; RECT rect_src_clipped;
...@@ -260,58 +256,3 @@ void AlignRect(RECT *, int align_boundary, int align_size); ...@@ -260,58 +256,3 @@ void AlignRect(RECT *, int align_boundary, int align_size);
#define DX_POSITION_CHANGE 0x1000 #define DX_POSITION_CHANGE 0x1000
#define DX_WALLPAPER_CHANGE 0x2000 #define DX_WALLPAPER_CHANGE 0x2000
#define DX_DESKTOP_CHANGE 0x4000 #define DX_DESKTOP_CHANGE 0x4000
/*****************************************************************************
* WinCE helpers
*****************************************************************************/
#ifdef UNDER_CE
#define AdjustWindowRect(a,b,c) AdjustWindowRectEx(a,b,c,0)
#ifndef GCL_HBRBACKGROUND
# define GCL_HBRBACKGROUND (-10)
#endif
//#define FindWindowEx(a,b,c,d) 0
#define GetWindowPlacement(a,b)
#define SetWindowPlacement(a,b)
/*typedef struct _WINDOWPLACEMENT {
UINT length;
UINT flags;
UINT showCmd;
POINT ptMinPosition;
POINT ptMaxPosition;
RECT rcNormalPosition;
} WINDOWPLACEMENT;*/
#ifndef WM_NCMOUSEMOVE
# define WM_NCMOUSEMOVE 160
#endif
#ifndef CS_OWNDC
# define CS_OWNDC 32
#endif
#ifndef SC_SCREENSAVE
# define SC_SCREENSAVE 0xF140
#endif
#ifndef SC_MONITORPOWER
# define SC_MONITORPOWER 0xF170
#endif
#ifndef WM_NCPAINT
# define WM_NCPAINT 133
#endif
#ifndef WS_OVERLAPPEDWINDOW
# define WS_OVERLAPPEDWINDOW 0xcf0000
#endif
#ifndef WS_EX_NOPARENTNOTIFY
# define WS_EX_NOPARENTNOTIFY 4
#endif
#ifndef WS_EX_APPWINDOW
#define WS_EX_APPWINDOW 0x40000
#endif
//#define SetWindowLongPtr SetWindowLong
//#define GetWindowLongPtr GetWindowLong
//#define GWLP_USERDATA GWL_USERDATA
#endif //UNDER_CE
...@@ -56,30 +56,6 @@ ...@@ -56,30 +56,6 @@
#include <vlc_keys.h> #include <vlc_keys.h>
#include "common.h" #include "common.h"
#ifdef UNDER_CE
#include <aygshell.h>
//WINSHELLAPI BOOL WINAPI SHFullScreen(HWND hwndRequester, DWORD dwState);
UINT GetMenuState(HMENU hMenu, UINT id, UINT flags)
{
MENUITEMINFO info;
memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info);
info.fMask = MIIM_STATE;
if (!GetMenuItemInfo(hMenu, id, (flags & MF_BYPOSITION) != 0, &info))
return -1;
/* XXX Submenu handling is missing... */
return info.fState;
}
#endif
/*#if defined(UNDER_CE) && !defined(__PLUGIN__) --FIXME*/
/*# define SHFS_SHOWSIPBUTTON 0x0004
# define SHFS_HIDESIPBUTTON 0x0008
# define MENU_HEIGHT 26
BOOL SHFullScreen(HWND hwndRequester, DWORD dwState);
#endif*/
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
...@@ -175,7 +151,6 @@ static void UpdateCursor( event_thread_t *p_event, bool b_show ) ...@@ -175,7 +151,6 @@ static void UpdateCursor( event_thread_t *p_event, bool b_show )
} }
} }
#ifndef UNDER_CE
static HCURSOR EmptyCursor( HINSTANCE instance ) static HCURSOR EmptyCursor( HINSTANCE instance )
{ {
const int cw = GetSystemMetrics(SM_CXCURSOR); const int cw = GetSystemMetrics(SM_CXCURSOR);
...@@ -195,7 +170,6 @@ static HCURSOR EmptyCursor( HINSTANCE instance ) ...@@ -195,7 +170,6 @@ static HCURSOR EmptyCursor( HINSTANCE instance )
return cursor; return cursor;
} }
#endif
static void MousePressed( event_thread_t *p_event, HWND hwnd, unsigned button ) static void MousePressed( event_thread_t *p_event, HWND hwnd, unsigned button )
{ {
...@@ -250,10 +224,8 @@ static void *EventThread( void *p_this ) ...@@ -250,10 +224,8 @@ static void *EventThread( void *p_this )
return NULL; return NULL;
} }
#ifndef UNDER_CE
/* Prevent monitor from powering off */ /* Prevent monitor from powering off */
SetThreadExecutionState( ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED | ES_CONTINUOUS ); SetThreadExecutionState( ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED | ES_CONTINUOUS );
#endif
/* Main loop */ /* Main loop */
/* GetMessage will sleep if there's no message in the queue */ /* GetMessage will sleep if there's no message in the queue */
...@@ -554,18 +526,14 @@ static int DirectXCreateWindow( event_thread_t *p_event ) ...@@ -554,18 +526,14 @@ static int DirectXCreateWindow( event_thread_t *p_event )
} }
#endif #endif
p_event->cursor_arrow = LoadCursor(NULL, IDC_ARROW); p_event->cursor_arrow = LoadCursor(NULL, IDC_ARROW);
#ifndef UNDER_CE
p_event->cursor_empty = EmptyCursor(hInstance); p_event->cursor_empty = EmptyCursor(hInstance);
#endif
/* Get the Icon from the main app */ /* Get the Icon from the main app */
p_event->vlc_icon = NULL; p_event->vlc_icon = NULL;
#ifndef UNDER_CE
if( GetModuleFileName( NULL, vlc_path, MAX_PATH ) ) if( GetModuleFileName( NULL, vlc_path, MAX_PATH ) )
{ {
p_event->vlc_icon = ExtractIcon( hInstance, vlc_path, 0 ); p_event->vlc_icon = ExtractIcon( hInstance, vlc_path, 0 );
} }
#endif
/* Fill in the window class structure */ /* Fill in the window class structure */
wc.style = CS_OWNDC|CS_DBLCLKS; /* style: dbl click */ wc.style = CS_OWNDC|CS_DBLCLKS; /* style: dbl click */
...@@ -746,9 +714,7 @@ static void DirectXCloseWindow( event_thread_t *p_event ) ...@@ -746,9 +714,7 @@ static void DirectXCloseWindow( event_thread_t *p_event )
if( p_event->vlc_icon ) if( p_event->vlc_icon )
DestroyIcon( p_event->vlc_icon ); DestroyIcon( p_event->vlc_icon );
#ifndef UNDER_CE
DestroyCursor( p_event->cursor_empty ); DestroyCursor( p_event->cursor_empty );
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -787,7 +753,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -787,7 +753,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
} }
vout_display_t *vd = p_event->vd; vout_display_t *vd = p_event->vd;
#ifndef UNDER_CE
/* Catch the screensaver and the monitor turn-off */ /* Catch the screensaver and the monitor turn-off */
if( message == WM_SYSCOMMAND && if( message == WM_SYSCOMMAND &&
( (wParam & 0xFFF0) == SC_SCREENSAVE || (wParam & 0xFFF0) == SC_MONITORPOWER ) ) ( (wParam & 0xFFF0) == SC_SCREENSAVE || (wParam & 0xFFF0) == SC_MONITORPOWER ) )
...@@ -795,7 +760,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -795,7 +760,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
//if( vd ) msg_Dbg( vd, "WinProc WM_SYSCOMMAND screensaver" ); //if( vd ) msg_Dbg( vd, "WinProc WM_SYSCOMMAND screensaver" );
return 0; /* this stops them from happening */ return 0; /* this stops them from happening */
} }
#endif
#if 0 #if 0
if( message == WM_SETCURSOR ) if( message == WM_SETCURSOR )
{ {
...@@ -908,44 +872,12 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -908,44 +872,12 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
case WM_KILLFOCUS: case WM_KILLFOCUS:
#ifdef MODULE_NAME_IS_wingapi #ifdef MODULE_NAME_IS_wingapi
GXSuspend(); GXSuspend();
#endif
#ifdef UNDER_CE
if( hwnd == p_event->hfswnd )
{
HWND htbar = FindWindow( _T("HHTaskbar"), NULL );
ShowWindow( htbar, SW_SHOW );
}
if( !p_event->hparent ||
hwnd == p_event->hfswnd )
{
SHFullScreen( hwnd, SHFS_SHOWSIPBUTTON );
}
#endif #endif
return 0; return 0;
case WM_SETFOCUS: case WM_SETFOCUS:
#ifdef MODULE_NAME_IS_wingapi #ifdef MODULE_NAME_IS_wingapi
GXResume(); GXResume();
#endif
#ifdef UNDER_CE
/* FIXME vd->cfg is not lock[ed/able] */
#warning "FIXME: race condition"
if( p_event->hparent &&
hwnd != p_event->hfswnd && vd->cfg->is_fullscreen )
vout_display_SendEventFullscreen(vd, false);
if( hwnd == p_event->hfswnd )
{
HWND htbar = FindWindow( _T("HHTaskbar"), NULL );
ShowWindow( htbar, SW_HIDE );
}
if( !p_event->hparent ||
hwnd == p_event->hfswnd )
{
SHFullScreen( hwnd, SHFS_HIDESIPBUTTON );
}
#endif #endif
return 0; return 0;
......
...@@ -4,10 +4,8 @@ EXTRA_DIST = ...@@ -4,10 +4,8 @@ EXTRA_DIST =
appdatadir = $(datadir)/applications appdatadir = $(datadir)/applications
if !HAVE_WIN32 if !HAVE_WIN32
if !HAVE_WINCE
appdata_DATA = vlc.desktop appdata_DATA = vlc.desktop
endif endif
endif
EXTRA_DIST += vlc.desktop.in EXTRA_DIST += vlc.desktop.in
CLEANFILES += $(appdata_DATA) CLEANFILES += $(appdata_DATA)
...@@ -24,7 +22,6 @@ icons128dir = $(iconsdatadir)/128x128/apps ...@@ -24,7 +22,6 @@ icons128dir = $(iconsdatadir)/128x128/apps
icons256dir = $(iconsdatadir)/256x256/apps icons256dir = $(iconsdatadir)/256x256/apps
if !HAVE_WIN32 if !HAVE_WIN32
if !HAVE_WINCE
dist_vlcdata_DATA = icons/vlc.ico dist_vlcdata_DATA = icons/vlc.ico
dist_icons16_DATA = icons/16x16/vlc.png icons/16x16/vlc.xpm dist_icons16_DATA = icons/16x16/vlc.png icons/16x16/vlc.xpm
dist_icons32_DATA = icons/32x32/vlc.png icons/32x32/vlc.xpm \ dist_icons32_DATA = icons/32x32/vlc.png icons/32x32/vlc.xpm \
...@@ -39,7 +36,6 @@ nobase_dist_vlcdata_SCRIPTS = \ ...@@ -39,7 +36,6 @@ nobase_dist_vlcdata_SCRIPTS = \
utils/video-vlc-default.sh \ utils/video-vlc-default.sh \
$(NULL) $(NULL)
endif endif
endif
EXTRA_DIST += \ EXTRA_DIST += \
$(skins2_default_vlt_FILES) \ $(skins2_default_vlt_FILES) \
......
#ifndef __NEWRES_H__ #ifndef __NEWRES_H__
#define __NEWRES_H__ #define __NEWRES_H__
#if !defined(UNDER_CE)
#define UNDER_CE _WIN32_WCE
#endif
#if defined(_WIN32_WCE) #if defined(_WIN32_WCE)
#if !defined(WCEOLE_ENABLE_DIALOGEX) #if !defined(WCEOLE_ENABLE_DIALOGEX)
#define DIALOGEX DIALOG DISCARDABLE #define DIALOGEX DIALOG DISCARDABLE
......
...@@ -212,9 +212,6 @@ else ...@@ -212,9 +212,6 @@ else
if HAVE_WIN32 if HAVE_WIN32
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32) libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
else else
if HAVE_WINCE
libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
else
if HAVE_SYMBIAN if HAVE_SYMBIAN
#libvlccore_la_SOURCES += $(SOURCES_libvlc_symbian) #libvlccore_la_SOURCES += $(SOURCES_libvlc_symbian)
else else
...@@ -227,7 +224,6 @@ endif ...@@ -227,7 +224,6 @@ endif
endif endif
endif endif
endif endif
endif
if BUILD_HTTPD if BUILD_HTTPD
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd) libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
endif endif
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "config/configuration.h" #include "config/configuration.h"
#include "libvlc.h" #include "libvlc.h"
#if defined( WIN32 ) && !defined( UNDER_CE ) #if defined( WIN32 )
static void ShowConsole (void); static void ShowConsole (void);
static void PauseConsole (void); static void PauseConsole (void);
#else #else
...@@ -797,7 +797,7 @@ static void Version( void ) ...@@ -797,7 +797,7 @@ static void Version( void )
PauseConsole(); PauseConsole();
} }
#if defined (WIN32) && !defined (UNDER_CE) #if defined (WIN32)
/***************************************************************************** /*****************************************************************************
* ShowConsole: On Win32, create an output console for debug messages * ShowConsole: On Win32, create an output console for debug messages
***************************************************************************** *****************************************************************************
...@@ -862,7 +862,7 @@ static int ConsoleWidth( void ) ...@@ -862,7 +862,7 @@ static int ConsoleWidth( void )
i_width = 80; i_width = 80;
pclose( file ); pclose( file );
} }
#elif !defined (UNDER_CE) #else
CONSOLE_SCREEN_BUFFER_INFO buf; CONSOLE_SCREEN_BUFFER_INFO buf;
if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf)) if (GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &buf))
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#if defined (WIN32) && !defined (UNDER_CE) #if defined (WIN32)
# include <direct.h> # include <direct.h>
#endif #endif
#include <sys/stat.h> #include <sys/stat.h>
...@@ -1552,7 +1552,7 @@ static char *GetTmpPath( char *psz_path ) ...@@ -1552,7 +1552,7 @@ static char *GetTmpPath( char *psz_path )
free( psz_path ); free( psz_path );
/* Create a suitable path */ /* Create a suitable path */
#if defined (WIN32) && !defined (UNDER_CE) #if defined (WIN32)
const DWORD dwCount = GetTempPathW( 0, NULL ); const DWORD dwCount = GetTempPathW( 0, NULL );
wchar_t *psw_path = calloc( dwCount + 1, sizeof(wchar_t) ); wchar_t *psw_path = calloc( dwCount + 1, sizeof(wchar_t) );
if( psw_path ) if( psw_path )
......
...@@ -43,12 +43,8 @@ ...@@ -43,12 +43,8 @@
# include <sys/time.h> /* gettimeofday() */ # include <sys/time.h> /* gettimeofday() */
#endif #endif
#ifdef UNDER_CE
#include <sys/time.h> /* gettimeofday() */
#endif
#include <time.h> /* ctime() */ #include <time.h> /* ctime() */
#if defined (WIN32) && !defined (UNDER_CE) #if defined (WIN32)
#include <sys/timeb.h> /* ftime() */ #include <sys/timeb.h> /* ftime() */
#endif #endif
#include <limits.h> #include <limits.h>
...@@ -276,7 +272,7 @@ int vlm_ExecuteCommand( vlm_t *p_vlm, const char *psz_command, ...@@ -276,7 +272,7 @@ int vlm_ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
int64_t vlm_Date(void) int64_t vlm_Date(void)
{ {
#if defined (WIN32) && !defined (UNDER_CE) #if defined (WIN32)
struct timeb tm; struct timeb tm;
ftime( &tm ); ftime( &tm );
return ((int64_t)tm.time) * 1000000 + ((int64_t)tm.millitm) * 1000; return ((int64_t)tm.time) * 1000000 + ((int64_t)tm.millitm) * 1000;
......
...@@ -338,9 +338,6 @@ block_t *block_mmap_Alloc (void *addr, size_t length) ...@@ -338,9 +338,6 @@ block_t *block_mmap_Alloc (void *addr, size_t length)
#ifdef WIN32 #ifdef WIN32
# include <io.h> # include <io.h>
# ifdef UNDER_CE
# define _get_osfhandle(a) ((long) (a))
# endif
static static
ssize_t pread (int fd, void *buf, size_t count, off_t offset) ssize_t pread (int fd, void *buf, size_t count, off_t offset)
......
...@@ -74,9 +74,7 @@ ...@@ -74,9 +74,7 @@
* Remaining text is a required description of the update * Remaining text is a required description of the update
*/ */
#if defined( UNDER_CE ) #if defined( WIN64 )
# define UPDATE_OS_SUFFIX "-ce"
#elif defined( WIN64 )
# define UPDATE_OS_SUFFIX "-win-x64" # define UPDATE_OS_SUFFIX "-win-x64"
#elif defined( WIN32 ) #elif defined( WIN32 )
# define UPDATE_OS_SUFFIX "-win-x86" # define UPDATE_OS_SUFFIX "-win-x86"
......
...@@ -52,9 +52,7 @@ ...@@ -52,9 +52,7 @@
# include <poll.h> # include <poll.h>
#endif #endif
#if defined( UNDER_CE ) #if defined( WIN32 )
# include <winsock.h>
#elif defined( WIN32 )
# include <winsock2.h> # include <winsock2.h>
#else #else
# include <sys/socket.h> # include <sys/socket.h>
......
...@@ -39,12 +39,6 @@ ...@@ -39,12 +39,6 @@
#include <vlc_network.h> #include <vlc_network.h>
#ifdef WIN32 #ifdef WIN32
# if defined(UNDER_CE)
# undef IP_MULTICAST_TTL
# define IP_MULTICAST_TTL 3
# undef IP_ADD_MEMBERSHIP
# define IP_ADD_MEMBERSHIP 5
# endif
# define EAFNOSUPPORT WSAEAFNOSUPPORT # define EAFNOSUPPORT WSAEAFNOSUPPORT
#else #else
# include <unistd.h> # include <unistd.h>
......
...@@ -39,9 +39,7 @@ ...@@ -39,9 +39,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef UNDER_CE #if defined(WIN32)
# include <tchar.h>
#elif defined(WIN32)
# include <io.h> # include <io.h>
#endif #endif
#include <errno.h> #include <errno.h>
...@@ -61,7 +59,6 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap ) ...@@ -61,7 +59,6 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap )
if (unlikely(res == -1)) if (unlikely(res == -1))
return -1; return -1;
# ifndef UNDER_CE
/* Writing to the console is a lot of fun on Microsoft Windows. /* Writing to the console is a lot of fun on Microsoft Windows.
* If you use the standard I/O functions, you must use the OEM code page, * If you use the standard I/O functions, you must use the OEM code page,
* which is different from the usual ANSI code page. Or maybe not, if the * which is different from the usual ANSI code page. Or maybe not, if the
...@@ -82,7 +79,7 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap ) ...@@ -82,7 +79,7 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap )
goto out; goto out;
} }
} }
# endif
char *ansi = ToANSI (str); char *ansi = ToANSI (str);
if (ansi != NULL) if (ansi != NULL)
{ {
......
...@@ -307,7 +307,7 @@ char *make_path (const char *url) ...@@ -307,7 +307,7 @@ char *make_path (const char *url)
if (schemelen == 4 && !strncasecmp (url, "file", 4)) if (schemelen == 4 && !strncasecmp (url, "file", 4))
{ {
#if (!defined (WIN32) && !defined (__OS2__)) || defined (UNDER_CE) #if !defined (WIN32) && !defined (__OS2__)
/* Leading slash => local path */ /* Leading slash => local path */
if (*path == '/') if (*path == '/')
return path; return path;
......
...@@ -29,9 +29,7 @@ ...@@ -29,9 +29,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <w32api.h> #include <w32api.h>
#ifndef UNDER_CE #include <direct.h>
# include <direct.h>
#endif
#include <shlobj.h> #include <shlobj.h>
#include "../libvlc.h" #include "../libvlc.h"
...@@ -78,16 +76,9 @@ const char *config_GetConfDir (void) ...@@ -78,16 +76,9 @@ const char *config_GetConfDir (void)
if (*appdir) if (*appdir)
return appdir; return appdir;
#if defined (UNDER_CE)
/*There are some errors in cegcc headers*/
#undef SHGetSpecialFolderPath
BOOL WINAPI SHGetSpecialFolderPath(HWND,LPWSTR,int,BOOL);
if( SHGetSpecialFolderPath( NULL, wdir, CSIDL_APPDATA, 1 ) )
#else
/* Get the "Application Data" folder for all users */ /* Get the "Application Data" folder for all users */
if( S_OK == SHGetFolderPathW( NULL, CSIDL_COMMON_APPDATA if( S_OK == SHGetFolderPathW( NULL, CSIDL_COMMON_APPDATA
| CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, wdir ) ) | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, wdir ) )
#endif
{ {
WideCharToMultiByte (CP_UTF8, 0, wdir, -1, WideCharToMultiByte (CP_UTF8, 0, wdir, -1,
appdir, PATH_MAX, NULL, NULL); appdir, PATH_MAX, NULL, NULL);
...@@ -100,15 +91,8 @@ static char *config_GetShellDir (int csidl) ...@@ -100,15 +91,8 @@ static char *config_GetShellDir (int csidl)
{ {
wchar_t wdir[MAX_PATH]; wchar_t wdir[MAX_PATH];
#if defined (UNDER_CE)
/*There are some errors in cegcc headers*/
#undef SHGetSpecialFolderPath
BOOL WINAPI SHGetSpecialFolderPath(HWND,LPWSTR,int,BOOL);
if (SHGetSpecialFolderPath (NULL, wdir, CSIDL_APPDATA, 1))
#else
if (SHGetFolderPathW (NULL, csidl | CSIDL_FLAG_CREATE, if (SHGetFolderPathW (NULL, csidl | CSIDL_FLAG_CREATE,
NULL, SHGFP_TYPE_CURRENT, wdir ) == S_OK) NULL, SHGFP_TYPE_CURRENT, wdir ) == S_OK)
#endif
return FromWide (wdir); return FromWide (wdir);
return NULL; return NULL;
} }
......
...@@ -37,11 +37,7 @@ ...@@ -37,11 +37,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <winsock2.h> #include <winsock2.h>
#ifndef UNDER_CE #include <direct.h>
# include <direct.h>
#else
# include <tchar.h>
#endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_charset.h> #include <vlc_charset.h>
...@@ -82,10 +78,6 @@ int vlc_open (const char *filename, int flags, ...) ...@@ -82,10 +78,6 @@ int vlc_open (const char *filename, int flags, ...)
if ((flags & O_TEXT) == 0) if ((flags & O_TEXT) == 0)
flags |= O_BINARY; flags |= O_BINARY;
#ifdef UNDER_CE
/*_open translates to wchar internally on WinCE*/
return _open (filename, flags, mode);
#else
/* /*
* open() cannot open files with non-“ANSI” characters on Windows. * open() cannot open files with non-“ANSI” characters on Windows.
* We use _wopen() instead. Same thing for mkdir() and stat(). * We use _wopen() instead. Same thing for mkdir() and stat().
...@@ -97,7 +89,6 @@ int vlc_open (const char *filename, int flags, ...) ...@@ -97,7 +89,6 @@ int vlc_open (const char *filename, int flags, ...)
int fd = _wopen (wpath, flags, mode); int fd = _wopen (wpath, flags, mode);
free (wpath); free (wpath);
return fd; return fd;
#endif
} }
int vlc_openat (int dir, const char *filename, int flags, ...) int vlc_openat (int dir, const char *filename, int flags, ...)
...@@ -109,11 +100,6 @@ int vlc_openat (int dir, const char *filename, int flags, ...) ...@@ -109,11 +100,6 @@ int vlc_openat (int dir, const char *filename, int flags, ...)
int vlc_mkdir( const char *dirname, mode_t mode ) int vlc_mkdir( const char *dirname, mode_t mode )
{ {
#if defined (UNDER_CE)
(void) mode;
/* mkdir converts internally to wchar */
return _mkdir(dirname);
#else
wchar_t *wpath = widen_path (dirname); wchar_t *wpath = widen_path (dirname);
if (wpath == NULL) if (wpath == NULL)
return -1; return -1;
...@@ -122,12 +108,10 @@ int vlc_mkdir( const char *dirname, mode_t mode ) ...@@ -122,12 +108,10 @@ int vlc_mkdir( const char *dirname, mode_t mode )
free (wpath); free (wpath);
(void) mode; (void) mode;
return ret; return ret;
#endif
} }
char *vlc_getcwd (void) char *vlc_getcwd (void)
{ {
#ifndef UNDER_CE
wchar_t *wdir = _wgetcwd (NULL, 0); wchar_t *wdir = _wgetcwd (NULL, 0);
if (wdir == NULL) if (wdir == NULL)
return NULL; return NULL;
...@@ -135,9 +119,6 @@ char *vlc_getcwd (void) ...@@ -135,9 +119,6 @@ char *vlc_getcwd (void)
char *dir = FromWide (wdir); char *dir = FromWide (wdir);
free (wdir); free (wdir);
return dir; return dir;
#else
return NULL;
#endif
} }
/* Under Windows, these wrappers return the list of drive letters /* Under Windows, these wrappers return the list of drive letters
...@@ -171,11 +152,7 @@ DIR *vlc_opendir (const char *dirname) ...@@ -171,11 +152,7 @@ DIR *vlc_opendir (const char *dirname)
free (wpath); free (wpath);
/* Special mode to list drive letters */ /* Special mode to list drive letters */
p_dir->wdir = NULL; p_dir->wdir = NULL;
#ifdef UNDER_CE
p_dir->u.drives = 1;
#else
p_dir->u.drives = GetLogicalDrives (); p_dir->u.drives = GetLogicalDrives ();
#endif
return (void *)p_dir; return (void *)p_dir;
} }
...@@ -203,10 +180,7 @@ char *vlc_readdir (DIR *dir) ...@@ -203,10 +180,7 @@ char *vlc_readdir (DIR *dir)
DWORD drives = p_dir->u.drives; DWORD drives = p_dir->u.drives;
if (drives == 0) if (drives == 0)
return NULL; /* end */ return NULL; /* end */
#ifdef UNDER_CE
p_dir->u.drives = 0;
return strdup ("\\");
#else
unsigned int i; unsigned int i;
for (i = 0; !(drives & 1); i++) for (i = 0; !(drives & 1); i++)
drives >>= 1; drives >>= 1;
...@@ -217,7 +191,6 @@ char *vlc_readdir (DIR *dir) ...@@ -217,7 +191,6 @@ char *vlc_readdir (DIR *dir)
if (asprintf (&ret, "%c:\\", 'A' + i) == -1) if (asprintf (&ret, "%c:\\", 'A' + i) == -1)
return NULL; return NULL;
return ret; return ret;
#endif
} }
if (p_dir->u.insert_dot_dot) if (p_dir->u.insert_dot_dot)
...@@ -235,10 +208,6 @@ char *vlc_readdir (DIR *dir) ...@@ -235,10 +208,6 @@ char *vlc_readdir (DIR *dir)
int vlc_stat (const char *filename, struct stat *buf) int vlc_stat (const char *filename, struct stat *buf)
{ {
#ifdef UNDER_CE
/* _stat translates to wchar internally on WinCE */
return _stat (filename, buf);
#else
wchar_t *wpath = widen_path (filename); wchar_t *wpath = widen_path (filename);
if (wpath == NULL) if (wpath == NULL)
return -1; return -1;
...@@ -249,7 +218,6 @@ int vlc_stat (const char *filename, struct stat *buf) ...@@ -249,7 +218,6 @@ int vlc_stat (const char *filename, struct stat *buf)
int ret = _wstati64 (wpath, buf); int ret = _wstati64 (wpath, buf);
free (wpath); free (wpath);
return ret; return ret;
#endif
} }
int vlc_lstat (const char *filename, struct stat *buf) int vlc_lstat (const char *filename, struct stat *buf)
...@@ -259,10 +227,6 @@ int vlc_lstat (const char *filename, struct stat *buf) ...@@ -259,10 +227,6 @@ int vlc_lstat (const char *filename, struct stat *buf)
int vlc_unlink (const char *filename) int vlc_unlink (const char *filename)
{ {
#ifdef UNDER_CE
/*_open translates to wchar internally on WinCE*/
return _unlink( filename );
#else
wchar_t *wpath = widen_path (filename); wchar_t *wpath = widen_path (filename);
if (wpath == NULL) if (wpath == NULL)
return -1; return -1;
...@@ -270,7 +234,6 @@ int vlc_unlink (const char *filename) ...@@ -270,7 +234,6 @@ int vlc_unlink (const char *filename)
int ret = _wunlink (wpath); int ret = _wunlink (wpath);
free (wpath); free (wpath);
return ret; return ret;
#endif
} }
int vlc_rename (const char *oldpath, const char *newpath) int vlc_rename (const char *oldpath, const char *newpath)
...@@ -281,11 +244,6 @@ int vlc_rename (const char *oldpath, const char *newpath) ...@@ -281,11 +244,6 @@ int vlc_rename (const char *oldpath, const char *newpath)
if (wold == NULL || wnew == NULL) if (wold == NULL || wnew == NULL)
goto out; goto out;
# ifdef UNDER_CE
/* FIXME: errno support */
if (MoveFileW (wold, wnew))
ret = 0;
#else
if (_wrename (wold, wnew) && (errno == EACCES || errno == EEXIST)) if (_wrename (wold, wnew) && (errno == EACCES || errno == EEXIST))
{ /* Windows does not allow atomic file replacement */ { /* Windows does not allow atomic file replacement */
if (_wremove (wnew)) if (_wremove (wnew))
...@@ -297,7 +255,6 @@ int vlc_rename (const char *oldpath, const char *newpath) ...@@ -297,7 +255,6 @@ int vlc_rename (const char *oldpath, const char *newpath)
goto out; goto out;
} }
ret = 0; ret = 0;
#endif
out: out:
free (wnew); free (wnew);
free (wold); free (wold);
...@@ -306,24 +263,12 @@ out: ...@@ -306,24 +263,12 @@ out:
int vlc_dup (int oldfd) int vlc_dup (int oldfd)
{ {
#ifdef UNDER_CE
(void) oldfd;
errno = ENOSYS;
return -1;
#else
return dup (oldfd); return dup (oldfd);
#endif
} }
int vlc_pipe (int fds[2]) int vlc_pipe (int fds[2])
{ {
#ifdef UNDER_CE
(void) fds;
errno = ENOSYS;
return -1;
#else
return _pipe (fds, 32768, O_BINARY); return _pipe (fds, 32768, O_BINARY);
#endif
} }
#include <vlc_network.h> #include <vlc_network.h>
......
...@@ -58,17 +58,13 @@ int module_Load( vlc_object_t *p_this, const char *psz_file, ...@@ -58,17 +58,13 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
return -1; return -1;
module_handle_t handle; module_handle_t handle;
#ifndef UNDER_CE
/* FIXME: this is not thread-safe -- Courmisch */ /* FIXME: this is not thread-safe -- Courmisch */
UINT mode = SetErrorMode (SEM_FAILCRITICALERRORS); UINT mode = SetErrorMode (SEM_FAILCRITICALERRORS);
SetErrorMode (mode|SEM_FAILCRITICALERRORS); SetErrorMode (mode|SEM_FAILCRITICALERRORS);
#endif
handle = LoadLibraryW (wfile); handle = LoadLibraryW (wfile);
#ifndef UNDER_CE
SetErrorMode (mode); SetErrorMode (mode);
#endif
free (wfile); free (wfile);
if( handle == NULL ) if( handle == NULL )
...@@ -91,17 +87,5 @@ void module_Unload( module_handle_t handle ) ...@@ -91,17 +87,5 @@ void module_Unload( module_handle_t handle )
void *module_Lookup( module_handle_t handle, const char *psz_function ) void *module_Lookup( module_handle_t handle, const char *psz_function )
{ {
#ifdef UNDER_CE
wchar_t wide[strlen( psz_function ) + 1];
size_t i = 0;
do
wide[i] = psz_function[i]; /* UTF-16 <- ASCII */
while( psz_function[i++] );
return (void *)GetProcAddress( handle, wide );
#else
return (void *)GetProcAddress( handle, (char *)psz_function ); return (void *)GetProcAddress( handle, (char *)psz_function );
#endif
} }
...@@ -33,10 +33,7 @@ ...@@ -33,10 +33,7 @@
#include "../config/vlc_getopt.h" #include "../config/vlc_getopt.h"
#if !defined( UNDER_CE ) #include <mmsystem.h>
# include <mmsystem.h>
#endif
#include <winsock.h> #include <winsock.h>
...@@ -59,9 +56,7 @@ static int system_InitWSA(int hi, int lo) ...@@ -59,9 +56,7 @@ static int system_InitWSA(int hi, int lo)
*/ */
void system_Init(void) void system_Init(void)
{ {
#if !defined( UNDER_CE )
timeBeginPeriod(5); timeBeginPeriod(5);
#endif
if (system_InitWSA(2, 2) && system_InitWSA(1, 1)) if (system_InitWSA(2, 2) && system_InitWSA(1, 1))
fputs("Error: cannot initialize Winsocks\n", stderr); fputs("Error: cannot initialize Winsocks\n", stderr);
...@@ -85,7 +80,6 @@ typedef struct ...@@ -85,7 +80,6 @@ typedef struct
void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_argv[] ) void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_argv[] )
{ {
#if !defined( UNDER_CE )
/* Raise default priority of the current process */ /* Raise default priority of the current process */
#ifndef ABOVE_NORMAL_PRIORITY_CLASS #ifndef ABOVE_NORMAL_PRIORITY_CLASS
# define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000 # define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
...@@ -212,8 +206,6 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_ ...@@ -212,8 +206,6 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_
exit( 0 ); exit( 0 );
} }
} }
#endif
} }
static unsigned __stdcall IPCHelperThread( void *data ) static unsigned __stdcall IPCHelperThread( void *data )
...@@ -340,9 +332,7 @@ void system_End(void) ...@@ -340,9 +332,7 @@ void system_End(void)
p_helper = NULL; p_helper = NULL;
} }
#if !defined( UNDER_CE )
timeEndPeriod(5); timeEndPeriod(5);
#endif
/* XXX: In theory, we should not call this if WSAStartup() failed. */ /* XXX: In theory, we should not call this if WSAStartup() failed. */
WSACleanup(); WSACleanup();
......
...@@ -36,9 +36,6 @@ ...@@ -36,9 +36,6 @@
#include <assert.h> #include <assert.h>
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
#ifdef UNDER_CE
# include <mmsystem.h>
#endif
static vlc_threadvar_t thread_key; static vlc_threadvar_t thread_key;
...@@ -48,9 +45,6 @@ static vlc_threadvar_t thread_key; ...@@ -48,9 +45,6 @@ static vlc_threadvar_t thread_key;
struct vlc_thread struct vlc_thread
{ {
HANDLE id; HANDLE id;
#ifdef UNDER_CE
HANDLE cancel_event;
#endif
bool detached; bool detached;
bool killable; bool killable;
...@@ -107,31 +101,6 @@ static DWORD vlc_WaitForMultipleObjects (DWORD count, const HANDLE *handles, ...@@ -107,31 +101,6 @@ static DWORD vlc_WaitForMultipleObjects (DWORD count, const HANDLE *handles,
DWORD delay) DWORD delay)
{ {
DWORD ret; DWORD ret;
#ifdef UNDER_CE
HANDLE buf[count + 1];
struct vlc_thread *th = vlc_threadvar_get (thread_key);
if (th != NULL)
{
memcpy (buf, handles, count * sizeof(HANDLE));
buf[count++] = th->cancel_event;
handles = buf;
}
if (count == 0)
{
Sleep (delay);
ret = WAIT_TIMEOUT;
}
else
ret = WaitForMultipleObjects (count, handles, FALSE, delay);
if ((th != NULL) && (ret == WAIT_OBJECT_0 + count - 1))
{
vlc_cancel_self ((uintptr_t)th);
ret = WAIT_IO_COMPLETION;
}
#else
if (count == 0) if (count == 0)
{ {
ret = SleepEx (delay, TRUE); ret = SleepEx (delay, TRUE);
...@@ -140,7 +109,7 @@ static DWORD vlc_WaitForMultipleObjects (DWORD count, const HANDLE *handles, ...@@ -140,7 +109,7 @@ static DWORD vlc_WaitForMultipleObjects (DWORD count, const HANDLE *handles,
} }
else else
ret = WaitForMultipleObjectsEx (count, handles, FALSE, delay, TRUE); ret = WaitForMultipleObjectsEx (count, handles, FALSE, delay, TRUE);
#endif
/* We do not abandon objects... this would be a bug */ /* We do not abandon objects... this would be a bug */
assert (ret < WAIT_ABANDONED_0 || WAIT_ABANDONED_0 + count - 1 < ret); assert (ret < WAIT_ABANDONED_0 || WAIT_ABANDONED_0 + count - 1 < ret);
...@@ -558,9 +527,6 @@ retry: ...@@ -558,9 +527,6 @@ retry:
if (th->detached) if (th->detached)
{ {
CloseHandle (th->id); CloseHandle (th->id);
#ifdef UNDER_CE
CloseHandle (th->cancel_event);
#endif
free (th); free (th);
} }
} }
...@@ -590,7 +556,6 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached, ...@@ -590,7 +556,6 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
th->cleaners = NULL; th->cleaners = NULL;
HANDLE hThread; HANDLE hThread;
#ifndef UNDER_CE
/* When using the MSVCRT C library you have to use the _beginthreadex /* When using the MSVCRT C library you have to use the _beginthreadex
* function instead of CreateThread, otherwise you'll end up with * function instead of CreateThread, otherwise you'll end up with
* memory leaks and the signal functions not working (see Microsoft * memory leaks and the signal functions not working (see Microsoft
...@@ -606,26 +571,6 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached, ...@@ -606,26 +571,6 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
} }
hThread = (HANDLE)h; hThread = (HANDLE)h;
#else
th->cancel_event = CreateEvent (NULL, FALSE, FALSE, NULL);
if (th->cancel_event == NULL)
{
free (th);
return ENOMEM;
}
/* Not sure if CREATE_SUSPENDED + ResumeThread() is any useful on WinCE.
* Thread handles act up, too. */
hThread = CreateThread (NULL, 128*1024, vlc_entry, th,
CREATE_SUSPENDED, NULL);
if (hThread == NULL)
{
CloseHandle (th->cancel_event);
free (th);
return ENOMEM;
}
#endif
/* Thread is suspended, so we can safely set th->id */ /* Thread is suspended, so we can safely set th->id */
th->id = hThread; th->id = hThread;
if (p_handle != NULL) if (p_handle != NULL)
...@@ -655,9 +600,6 @@ void vlc_join (vlc_thread_t th, void **result) ...@@ -655,9 +600,6 @@ void vlc_join (vlc_thread_t th, void **result)
if (result != NULL) if (result != NULL)
*result = th->data; *result = th->data;
CloseHandle (th->id); CloseHandle (th->id);
#ifdef UNDER_CE
CloseHandle (th->cancel_event);
#endif
free (th); free (th);
} }
...@@ -691,11 +633,7 @@ static void CALLBACK vlc_cancel_self (ULONG_PTR self) ...@@ -691,11 +633,7 @@ static void CALLBACK vlc_cancel_self (ULONG_PTR self)
void vlc_cancel (vlc_thread_t th) void vlc_cancel (vlc_thread_t th)
{ {
#ifndef UNDER_CE
QueueUserAPC (vlc_cancel_self, th->id, (uintptr_t)th); QueueUserAPC (vlc_cancel_self, th->id, (uintptr_t)th);
#else
SetEvent (th->cancel_event);
#endif
} }
int vlc_savecancel (void) int vlc_savecancel (void)
...@@ -734,11 +672,7 @@ void vlc_testcancel (void) ...@@ -734,11 +672,7 @@ void vlc_testcancel (void)
th->data = NULL; /* TODO: special value? */ th->data = NULL; /* TODO: special value? */
vlc_thread_cleanup (th); vlc_thread_cleanup (th);
#ifndef UNDER_CE
_endthreadex(0); _endthreadex(0);
#else
ExitThread(0);
#endif
} }
} }
...@@ -824,17 +758,11 @@ void msleep (mtime_t delay) ...@@ -824,17 +758,11 @@ void msleep (mtime_t delay)
/*** Timers ***/ /*** Timers ***/
struct vlc_timer struct vlc_timer
{ {
#ifndef UNDER_CE
HANDLE handle; HANDLE handle;
#else
unsigned id;
unsigned interval;
#endif
void (*func) (void *); void (*func) (void *);
void *data; void *data;
}; };
#ifndef UNDER_CE
static void CALLBACK vlc_timer_do (void *val, BOOLEAN timeout) static void CALLBACK vlc_timer_do (void *val, BOOLEAN timeout)
{ {
struct vlc_timer *timer = val; struct vlc_timer *timer = val;
...@@ -842,26 +770,6 @@ static void CALLBACK vlc_timer_do (void *val, BOOLEAN timeout) ...@@ -842,26 +770,6 @@ static void CALLBACK vlc_timer_do (void *val, BOOLEAN timeout)
assert (timeout); assert (timeout);
timer->func (timer->data); timer->func (timer->data);
} }
#else
static void CALLBACK vlc_timer_do (unsigned timer_id, unsigned msg,
DWORD_PTR user, DWORD_PTR unused1,
DWORD_PTR unused2)
{
struct vlc_timer *timer = (struct vlc_timer *) user;
assert (timer_id == timer->id);
(void) msg;
(void) unused1;
(void) unused2;
timer->func (timer->data);
if (timer->interval)
{
mtime_t interval = timer->interval * 1000;
vlc_timer_schedule (timer, false, interval, interval);
}
}
#endif
int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data) int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
{ {
...@@ -871,46 +779,26 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data) ...@@ -871,46 +779,26 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
return ENOMEM; return ENOMEM;
timer->func = func; timer->func = func;
timer->data = data; timer->data = data;
#ifndef UNDER_CE
timer->handle = INVALID_HANDLE_VALUE; timer->handle = INVALID_HANDLE_VALUE;
#else
timer->id = 0;
timer->interval = 0;
#endif
*id = timer; *id = timer;
return 0; return 0;
} }
void vlc_timer_destroy (vlc_timer_t timer) void vlc_timer_destroy (vlc_timer_t timer)
{ {
#ifndef UNDER_CE
if (timer->handle != INVALID_HANDLE_VALUE) if (timer->handle != INVALID_HANDLE_VALUE)
DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE); DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE);
#else
if (timer->id)
timeKillEvent (timer->id);
/* FIXME: timers that have not yet completed will trigger use-after-free */
#endif
free (timer); free (timer);
} }
void vlc_timer_schedule (vlc_timer_t timer, bool absolute, void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
mtime_t value, mtime_t interval) mtime_t value, mtime_t interval)
{ {
#ifndef UNDER_CE
if (timer->handle != INVALID_HANDLE_VALUE) if (timer->handle != INVALID_HANDLE_VALUE)
{ {
DeleteTimerQueueTimer (NULL, timer->handle, NULL); DeleteTimerQueueTimer (NULL, timer->handle, NULL);
timer->handle = INVALID_HANDLE_VALUE; timer->handle = INVALID_HANDLE_VALUE;
} }
#else
if (timer->id)
{
timeKillEvent (timer->id);
timer->id = 0;
timer->interval = 0;
}
#endif
if (value == 0) if (value == 0)
return; /* Disarm */ return; /* Disarm */
...@@ -919,28 +807,8 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute, ...@@ -919,28 +807,8 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
value = (value + 999) / 1000; value = (value + 999) / 1000;
interval = (interval + 999) / 1000; interval = (interval + 999) / 1000;
#ifndef UNDER_CE
if (!CreateTimerQueueTimer (&timer->handle, NULL, vlc_timer_do, timer, if (!CreateTimerQueueTimer (&timer->handle, NULL, vlc_timer_do, timer,
value, interval, WT_EXECUTEDEFAULT)) value, interval, WT_EXECUTEDEFAULT))
#else
TIMECAPS caps;
timeGetDevCaps (&caps, sizeof(caps));
unsigned delay = value;
delay = __MAX(delay, caps.wPeriodMin);
delay = __MIN(delay, caps.wPeriodMax);
unsigned event = TIME_ONESHOT;
if (interval == delay)
event = TIME_PERIODIC;
else if (interval)
timer->interval = interval;
timer->id = timeSetEvent (delay, delay / 20, vlc_timer_do, (DWORD) timer,
event);
if (!timer->id)
#endif
abort (); abort ();
} }
...@@ -954,12 +822,10 @@ unsigned vlc_timer_getoverrun (vlc_timer_t timer) ...@@ -954,12 +822,10 @@ unsigned vlc_timer_getoverrun (vlc_timer_t timer)
/*** CPU ***/ /*** CPU ***/
unsigned vlc_GetCPUCount (void) unsigned vlc_GetCPUCount (void)
{ {
#ifndef UNDER_CE
DWORD_PTR process; DWORD_PTR process;
DWORD_PTR system; DWORD_PTR system;
if (GetProcessAffinityMask (GetCurrentProcess(), &process, &system)) if (GetProcessAffinityMask (GetCurrentProcess(), &process, &system))
return popcount (system); return popcount (system);
#endif
return 1; return 1;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment