Commit be8ca6e9 authored by Sam Hocevar's avatar Sam Hocevar

* ALL: WinCE compilation fixes (mostly nonexistent headers). A lot of

    work is still needed for missing functions. I only touched libvlc for
    the moment, plugins will come in a long long while.
  * ./bootstrap: moved MSVC project files generation here; use --update-msvc.
parent 74e8f4f6
......@@ -276,73 +276,25 @@ EXTRA_DIST += \
msvc/vlc.dsw \
msvc/vlc.dsp.in \
msvc/vlc.dsp.out \
msvc/vlc.vcp \
msvc/vlc.vcw \
msvc/vlc.vcp.in \
msvc/vlc.vcp.out \
msvc/config.h \
msvc/modules_builtin_msvc.h \
$(NULL)
#
# rule to rebuild vlc.dsp - not for the faint of heart
#
update-vlc.dsp: FORCE
rm -f msvc/vlc.dsp
# Top of the project file
cat msvc/vlc.dsp.in > msvc/vlc.dsp
# The source files
echo '# Begin Group "Source Files" ' >> msvc/vlc.dsp
echo '# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ' >> msvc/vlc.dsp
echo '# Begin Group "vlc" ' >> msvc/vlc.dsp
for file in $(vlc_SOURCES) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
echo '# End Group ' >> msvc/vlc.dsp
echo '# Begin Group "libvlc" ' >> msvc/vlc.dsp
for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_dirent) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep -v "/.*/"` ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" ' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
for subdir in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_dirent) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq` ; do \
echo '# Begin Group "'$$subdir'" ' >> msvc/vlc.dsp ; \
for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_dirent) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/$$subdir/"` ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" ' >> msvc/vlc.dsp ; \
echo '!IF "$$(CFG)" == "vlc - Win32 Release" ' >> msvc/vlc.dsp ; \
echo '# PROP Intermediate_Dir "Release\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '# PROP Output_Dir "Release\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '!ELSEIF "$$(CFG)" == "vlc - Win32 Debug" ' >> msvc/vlc.dsp ; \
echo '# PROP Intermediate_Dir "Debug\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '# PROP Output_Dir "Debug\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '!ENDIF ' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
echo '# End Group ' >> msvc/vlc.dsp ; \
done
echo '# End Group ' >> msvc/vlc.dsp
echo '# End Group ' >> msvc/vlc.dsp
# The modules
echo 'no modules yet'
# The headers
echo '# Begin Group "Header Files" ' >> msvc/vlc.dsp
echo '# PROP Default_Filter "h;hpp;hxx;hm;inl" ' >> msvc/vlc.dsp
for file in $(HEADERS_include) $(HEADERS_include_built) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done
echo '# Begin Group "vlc" ' >> msvc/vlc.dsp
for file in $(dist_pkginclude_HEADERS) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done
echo '# End Group ' >> msvc/vlc.dsp
echo '# End Group ' >> msvc/vlc.dsp
# Bottom of the project file - handles resource files too
cat msvc/vlc.dsp.out >> msvc/vlc.dsp
show-vlc-sources: FORCE
@echo X: $(vlc_SOURCES)
show-libvlc-sources: FORCE
@echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt) $(SOURCES_libvlc_strndup)
show-libvlc-headers: FORCE
@echo X: $(HEADERS_include) $(HEADERS_include_built)
show-libvlc-pkg-headers: FORCE
@echo X: $(dist_pkginclude_HEADERS)
###############################################################################
# Building libvlc
......@@ -361,64 +313,64 @@ lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@
lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic)
if HAVE_BEOS
SOURCES_libvlc_beos = $(OPT_SOURCES_libvlc_beos)
OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
endif
if HAVE_DARWIN
SOURCES_libvlc_darwin = $(OPT_SOURCES_libvlc_darwin)
OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
endif
if HAVE_WIN32
SOURCES_libvlc_win32 = $(OPT_SOURCES_libvlc_win32)
OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
endif
if BUILD_DIRENT
SOURCES_libvlc_dirent = $(OPT_SOURCES_libvlc_dirent)
OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
endif
if BUILD_GETOPT
SOURCES_libvlc_getopt = $(OPT_SOURCES_libvlc_getopt)
OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
endif
if BUILD_STRNDUP
SOURCES_libvlc_strndup = $(OPT_SOURCES_libvlc_strndup)
OPT_SOURCES_libvlc_strndup = $(SOURCES_libvlc_strndup)
endif
if BUILD_MOZILLA
LIBRARIES_libvlc_pic = lib/libvlc_pic.a
endif
EXTRA_DIST += \
$(OPT_SOURCES_libvlc_beos) \
$(OPT_SOURCES_libvlc_darwin) \
$(OPT_SOURCES_libvlc_win32) \
$(OPT_SOURCES_libvlc_dirent) \
$(OPT_SOURCES_libvlc_getopt) \
$(OPT_SOURCES_libvlc_strndup) \
$(SOURCES_libvlc_beos) \
$(SOURCES_libvlc_darwin) \
$(SOURCES_libvlc_win32) \
$(SOURCES_libvlc_dirent) \
$(SOURCES_libvlc_getopt) \
$(SOURCES_libvlc_strndup) \
$(NULL)
OPT_SOURCES_libvlc_beos = \
SOURCES_libvlc_beos = \
src/misc/beos_specific.cpp \
$(NULL)
OPT_SOURCES_libvlc_darwin = \
SOURCES_libvlc_darwin = \
src/misc/darwin_specific.c \
$(NULL)
OPT_SOURCES_libvlc_win32 = \
SOURCES_libvlc_win32 = \
src/misc/win32_specific.c \
$(NULL)
OPT_SOURCES_libvlc_dirent = \
SOURCES_libvlc_dirent = \
src/extras/dirent.c \
src/extras/dirent.h \
$(NULL)
OPT_SOURCES_libvlc_getopt = \
SOURCES_libvlc_getopt = \
src/extras/getopt.c \
src/extras/getopt.h \
src/extras/getopt1.c \
$(NULL)
OPT_SOURCES_libvlc_strndup = \
SOURCES_libvlc_strndup = \
src/extras/strndup.c
$(NULL)
SOURCES_libvlc = \
SOURCES_libvlc_common = \
src/libvlc.c \
src/libvlc.h \
src/interface/interface.c \
......@@ -453,17 +405,21 @@ SOURCES_libvlc = \
src/misc/configuration.c \
src/misc/netutils.c \
src/misc/iso_lang.c \
src/misc/iso-639.def \
src/misc/iso-639_def.h \
src/misc/messages.c \
src/misc/objects.c \
src/misc/variables.c \
src/misc/error.c \
$(SOURCES_libvlc_beos) \
$(SOURCES_libvlc_darwin) \
$(SOURCES_libvlc_win32) \
$(SOURCES_libvlc_dirent) \
$(SOURCES_libvlc_getopt) \
$(SOURCES_libvlc_strndup) \
$(NULL)
SOURCES_libvlc = \
$(SOURCES_libvlc_common) \
$(OPT_SOURCES_libvlc_beos) \
$(OPT_SOURCES_libvlc_darwin) \
$(OPT_SOURCES_libvlc_win32) \
$(OPT_SOURCES_libvlc_dirent) \
$(OPT_SOURCES_libvlc_getopt) \
$(OPT_SOURCES_libvlc_strndup) \
$(NULL)
###############################################################################
......
#! /bin/sh
## bootstrap file for vlc, the VideoLAN Client
## $Id: bootstrap,v 1.24 2002/11/09 16:34:52 sam Exp $
## $Id: bootstrap,v 1.25 2002/11/10 18:04:22 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
......@@ -15,18 +15,199 @@ export LANG
### argument check
###
do_po=no
do_msvc=no
while test $# -gt 0; do
case "$1" in
--update-msvc)
do_msvc=yes
;;
--update-po)
do_po=yes
;;
*)
echo "unknown option $1"
echo "$0: unknown option $1"
echo "recognized flags are --update-msvc and --update-po"
exit 1
;;
esac
shift
done
##
## Update the MSVC project files
##
if test "$do_msvc" = "no"
then
echo "not updating MSVC project file. use --update-msvc to force doing it."
else
if test ! -f Makefile
then
echo "no Makefile found, did you run ./configure?"
exit 1
fi
# The evil ^M
M=' '
# Sources that get built under Win32
VLC_SOURCES=`make show-vlc-sources | grep '^X: ' | cut -b3-`
LIBVLC_SOURCES=`make show-libvlc-sources | grep '^X: ' | cut -b3-`
LIBVLC_HEADERS=`make show-libvlc-headers | grep '^X: ' | cut -b3-`
LIBVLC_PKG_HEADERS=`make show-libvlc-pkg-headers | grep '^X: ' | cut -b3-`
for target in msvc/vlc.vcp msvc/vlc.dsp
do
rm -f ${target}
# Top of the project file
cat ${target}.in > ${target}
# The source files
cat >> ${target} << EOF
# Begin Group "Source Files"${M}
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"${M}
# Begin Group "vlc"${M}
EOF
for file in ${VLC_SOURCES}
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# End Group${M}
# Begin Group "libvlc"${M}
EOF
for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.*/"`
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
# End Source File${M}
EOF
done
for subdir in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq`
do
cat >> ${target} << EOF
# Begin Group "${subdir}"${M}
EOF
for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/${subdir}/"`
do
if test "${target}" = "msvc/vlc.vcp"
then
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "vlc - Win32 (WCE MIPS) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE MIPS) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH4) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH4) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH3) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE SH3) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE ARM) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE ARM) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE x86em) Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 (WCE x86em) Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ENDIF${M}
# End Source File${M}
EOF
else
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "vlc - Win32 Release"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
!ELSEIF "\$(CFG)" == "vlc - Win32 Debug"${M}
# PROP Intermediate_Dir "Debug\\${subdir}"${M}
# PROP Output_Dir "Debug\\${subdir}"${M}
!ENDIF${M}
# End Source File${M}
EOF
fi
done
cat >> ${target} << EOF
# End Group${M}
EOF
done
cat >> ${target} << EOF
# End Group${M}
# End Group${M}
EOF
# The modules
echo 'no modules yet'
# The headers
cat >> ${target} << EOF
# Begin Group "Header Files"${M}
# PROP Default_Filter "h;hpp;hxx;hm;inl"${M}
EOF
for file in ${LIBVLC_HEADERS}
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# Begin Group "vlc"${M}
EOF
for file in ${LIBVLC_PKG_HEADERS}
do
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# End Group${M}
# End Group${M}
EOF
# Bottom of the project file - handles resource files too
cat ${target}.out >> ${target}
done
exit 0
fi
##
## Update the potfiles because no one ever does it
##
if test "$do_po" = "no"
then
echo "not updating potfiles. use --update-po to force doing it."
else
cd po
make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
cd ..
exit 0
fi
##
## Check that our tools don't suck
##
......@@ -298,7 +479,7 @@ EOF
-e 's#_("--")#"--"#' \
-e 's#_("/dev/dvd")#"/dev/dvd"#' \
-e 's#_(\("./."\))#\1#' \
< modules/gui/gtk/$file >> /tmp/$$.$file.bak
< modules/gui/gtk/$file >> /tmp/$$.$file.bak
mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
fi
done
......@@ -311,23 +492,6 @@ then
mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
fi
##
## Don't update the MSVC project file
##
echo "not updating MSVC project file. run 'make update-vlc.dsp' for this."
##
## Update the potfiles because no one ever does it
##
if test "$do_po" = "no"
then
echo "not updating potfiles. use --update-po to force doing it."
else
cd po
make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
cd ..
fi
##
## Tell the user about gettext and sed
##
......
......@@ -316,8 +316,8 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
Define if <strings.h> defines strncasecmp.)])
dnl Check for headers
AC_CHECK_HEADERS(stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h)
AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
AC_CHECK_HEADERS(machine/param.h sys/shm.h)
......
......@@ -354,3 +354,16 @@ the Boston strangler is to the woman home alone.
-- #videolan
%
<Meuuh> at the salsa lesson tonight, a girl told me that she was very happy to dance with me
<Meuuh> do you think it means something ?
<Dnumgis> Probably that she finally found someone that was worse at dancing
than she
-- #videolan
%
<hal_3k> damn
<hal_3k> why didn't you use LGPL?
<sam> why don't you use GPL?
-- #videolan
%
......@@ -3,7 +3,7 @@
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: main.h,v 1.49 2002/10/14 16:46:55 sam Exp $
* $Id: main.h,v 1.50 2002/11/10 18:04:22 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -57,7 +57,7 @@ struct libvlc_t
/* Arch-specific variables */
#if defined( SYS_BEOS )
vlc_object_t * p_appthread;
#elif defined( WIN32 )
#elif defined( WIN32 ) && !defined( UNDER_CE )
SIGNALOBJECTANDWAIT SignalObjectAndWait;
vlc_bool_t b_fast_mutex;
int i_win9x_cv;
......@@ -83,8 +83,13 @@ struct vlc_t
/* Fast memcpy plugin used */
module_t * p_memcpy_module;
#if defined( WIN32 )
void* ( __cdecl *pf_memcpy ) ( void *, const void *, size_t );
void* ( __cdecl *pf_memset ) ( void *, int, size_t );
#else
void* ( *pf_memcpy ) ( void *, const void *, size_t );
void* ( *pf_memset ) ( void *, int, size_t );
#endif
/* Shared data - these structures are accessed directly from p_vlc by
* several modules */
......
......@@ -3,7 +3,7 @@
* This header provides portable declarations for mutexes & conditions
*****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN
* $Id: vlc_threads.h,v 1.16 2002/10/28 22:31:50 gbazin Exp $
* $Id: vlc_threads.h,v 1.17 2002/11/10 18:04:22 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -28,7 +28,9 @@
#include <stdio.h>
#if defined(GPROF) || defined(DEBUG)
# include <sys/time.h>
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# endif
#endif
#if defined( PTH_INIT_IN_PTH_H ) /* GNU Pth */
......@@ -37,8 +39,12 @@
#elif defined( ST_INIT_IN_ST_H ) /* State threads */
# include <st.h>
#elif defined( WIN32 ) /* Win32 API */
# include <process.h>
#elif defined( WIN32 )
# if defined( UNDER_CE )
/* WinCE API */
# else
# include <process.h> /* Win32 API */
# endif
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */
# include <pthread.h>
......
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN
* $Id: vlc_threads_funcs.h,v 1.7 2002/10/27 17:23:17 titer Exp $
* $Id: vlc_threads_funcs.h,v 1.8 2002/11/10 18:04:22 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -232,6 +232,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
{
PulseEvent( p_condvar->event );
}
# ifndef UNDER_CE
else if( p_condvar->i_win9x_cv == 1 )
{
/* Wait for the gate to be open */
......@@ -263,6 +264,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
WaitForSingleObject( p_condvar->event, INFINITE );
}
}
# endif
return 0;
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
......@@ -366,6 +368,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
PulseEvent( p_condvar->event );
}
}
# ifndef UNDER_CE
else if( p_condvar->i_win9x_cv == 1 )
{
/* Wait for the gate to be open */
......@@ -399,6 +402,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
WaitForSingleObject( p_condvar->event, INFINITE );
}
}
# endif
return 0;
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
......
......@@ -2,7 +2,7 @@
* test4.c : Miscellaneous stress tests module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: test4.c,v 1.3 2002/10/17 13:15:30 sam Exp $
* $Id: test4.c,v 1.4 2002/11/10 18:04:22 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -41,6 +41,8 @@
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static int Foo ( vlc_object_t *, char *, char * );
static int Callback ( vlc_object_t *, char *, char * );
static int MyCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
......@@ -56,6 +58,8 @@ static int Signal ( vlc_object_t *, char *, char * );
*****************************************************************************/
vlc_module_begin();
set_description( _("Miscellaneous stress tests") );
var_Create( p_module->p_libvlc, "foo-test", VLC_VAR_COMMAND );
var_Set( p_module->p_libvlc, "foo-test", (vlc_value_t)(void*)Foo );
var_Create( p_module->p_libvlc, "callback-test", VLC_VAR_COMMAND );
var_Set( p_module->p_libvlc, "callback-test", (vlc_value_t)(void*)Callback );
var_Create( p_module->p_libvlc, "stress-test", VLC_VAR_COMMAND );
......@@ -64,6 +68,56 @@ vlc_module_begin();
var_Set( p_module->p_libvlc, "signal", (vlc_value_t)(void*)Signal );
vlc_module_end();
/*****************************************************************************
* Foo: put anything here
*****************************************************************************/
static int Foo( vlc_object_t *p_this, char *psz_cmd, char *psz_arg )
{
vlc_value_t val;
int i, i_vals;
vlc_value_t *p_vals;
var_Create( p_this, "honk", VLC_VAR_STRING | VLC_VAR_ISLIST );
val.psz_string = "foo";
var_Change( p_this, "honk", VLC_VAR_ADDCHOICE, &val );
val.psz_string = "bar";
var_Change( p_this, "honk", VLC_VAR_ADDCHOICE, &val );
val.psz_string = "baz";
var_Change( p_this, "honk", VLC_VAR_ADDCHOICE, &val );
var_Change( p_this, "honk", VLC_VAR_SETDEFAULT, &val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
val.psz_string = "foo";
var_Set( p_this, "honk", val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
val.psz_string = "blork";
var_Set( p_this, "honk", val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
val.psz_string = "baz";
var_Change( p_this, "honk", VLC_VAR_DELCHOICE, &val );
var_Get( p_this, "honk", &val ); printf( "value: %s\n", val.psz_string );
var_Change( p_this, "honk", VLC_VAR_GETLIST, &val );
i_vals = ((vlc_value_t*)val.p_address)[0].i_int;
p_vals = &((vlc_value_t*)val.p_address)[1];
for( i = 0 ; i < i_vals ; i++ )
{
printf( "value %i: %s\n", i, p_vals[i].psz_string );
}
var_Change( p_this, "honk", VLC_VAR_FREELIST, &val );
var_Destroy( p_this, "honk" );
return VLC_SUCCESS;
}
/*****************************************************************************
* Callback: test callback functions
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* ggi.c : GGI plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: ggi.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* $Id: ggi.c,v 1.2 2002/11/10 18:04:22 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -273,6 +273,7 @@ static int Manage( vout_thread_t *p_vout )
struct timeval tv = { 0, 1000 }; /* 1 millisecond */
gii_event_mask mask;
gii_event event;
vlc_value_t val;
mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease;
......@@ -291,7 +292,6 @@ static int Manage( vout_thread_t *p_vout )
case 'q':
case 'Q':
case GIIUC_Escape:
/* FIXME pass message ! */
p_vout->p_vlc->b_die = 1;
break;
......@@ -304,6 +304,11 @@ static int Manage( vout_thread_t *p_vout )
switch( event.pbutton.button )
{
case GII_PBUTTON_LEFT:
val.b_bool = VLC_TRUE;
var_Set( p_vout, "mouse-clicked", val );
break;
case GII_PBUTTON_RIGHT:
{
intf_thread_t *p_intf;
......
......@@ -181,7 +181,7 @@ SOURCE="..\src\audio_output\intf.c"
# End Group
# Begin Group "extras"
# Begin Source File
SOURCE="..\src\extras\strndup.c"
SOURCE="..\src\extras\dirent.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras"
......@@ -192,7 +192,7 @@ SOURCE="..\src\extras\strndup.c"
!ENDIF
# End Source File
# Begin Source File
SOURCE="..\src\extras\dirent.c"
SOURCE="..\src\extras\dirent.h"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras"
......@@ -203,7 +203,7 @@ SOURCE="..\src\extras\dirent.c"
!ENDIF
# End Source File
# Begin Source File
SOURCE="..\src\extras\dirent.h"
SOURCE="..\src\extras\getopt.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras"
......@@ -214,7 +214,7 @@ SOURCE="..\src\extras\dirent.h"
!ENDIF
# End Source File
# Begin Source File
SOURCE="..\src\extras\getopt.c"
SOURCE="..\src\extras\getopt.h"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras"
......@@ -225,7 +225,7 @@ SOURCE="..\src\extras\getopt.c"
!ENDIF
# End Source File
# Begin Source File
SOURCE="..\src\extras\getopt.h"
SOURCE="..\src\extras\getopt1.c"
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"
!IF "$(CFG)" == "vlc - Win32 Release"
# PROP Intermediate_Dir "Release\extras"
......@@ -236,7 +236,7 @@ SOURCE="..\src\extras\getopt.h"
!ENDIF
# End Source File
# Begin Source File
SOURCE="..\