mirror of
https://github.com/videolan/vlc.git
synced 2024-12-03 23:04:35 +08:00
* Coding style fixes here and there.
* Miscellaneous QNX compile fixes. * Beginning of the mingw32 port by Gildas Bazin <gbazin@netcourrier.com>. * Added Marcari and Gildas to the AUTHORS file. (I commited the mingw32 port because it doesn't add any new code outside the #ifdefs, but we won't tell a word about it for the moment. We don't really need windows users whining about bugs, do we ?)
This commit is contained in:
parent
eb7f7ca00a
commit
0a4aeaa67c
10
AUTHORS
10
AUTHORS
@ -5,6 +5,11 @@
|
||||
# The fields are: name (N), email (E), web-address (W), CVS account login (C),
|
||||
# PGP key ID and fingerprint (P), description (D), and snail-mail address (S).
|
||||
|
||||
N: Marc Ariberti
|
||||
C: marcari
|
||||
E: marcari@via.ecp.fr
|
||||
D: communication with channel server
|
||||
|
||||
N: Pierre Baillet
|
||||
E: oct@zoy.org
|
||||
C: octplane
|
||||
@ -14,6 +19,10 @@ N: Ethan C. Baldridge
|
||||
E: BaldridgeE@cadmus.com
|
||||
D: directory browsing code in modules.c
|
||||
|
||||
N: Gildas Bazin
|
||||
E: gbazin@netcourrier.com
|
||||
D: mingw32 port
|
||||
|
||||
N: Stéphane Borel
|
||||
E: stef@via.ecp.fr
|
||||
C: stef
|
||||
@ -40,6 +49,7 @@ E: ndeb@ece.cmu.edu
|
||||
D: Minor configure.in and Makefile.in fixes
|
||||
|
||||
N: Cyril Deguet
|
||||
C: asmax
|
||||
E: asmax@via.ecp.fr
|
||||
D: PS input packet allocator
|
||||
|
||||
|
@ -4,7 +4,10 @@
|
||||
|
||||
HEAD
|
||||
|
||||
* Changed broadcast handling
|
||||
* Coding style fixes here and there.
|
||||
* Miscellaneous QNX compile fixes.
|
||||
* Beginning of the mingw32 port by Gildas Bazin <gbazin@netcourrier.com>.
|
||||
* Changed broadcast handling.
|
||||
* Added a vlc-howto in sgml format in the doc directory.
|
||||
* Fixed the continuous 'seeking position' bug in network mode.
|
||||
* Support for `ts://foo:42' style input source.
|
||||
|
4
Makefile
4
Makefile
@ -176,7 +176,7 @@ distclean: clean
|
||||
rm -f **/*.o **/*~ *.log
|
||||
rm -f Makefile.opts
|
||||
rm -f include/defs.h include/config.h include/modules_builtin.h
|
||||
rm -f config.status config.cache config.log
|
||||
rm -f config*status config*cache config*log
|
||||
rm -f gmon.out core build-stamp
|
||||
rm -Rf .dep
|
||||
rm -f .gdb_history
|
||||
@ -353,5 +353,5 @@ $(PLUGIN_OBJ): FORCE
|
||||
builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
|
||||
$(BUILTIN_OBJ): FORCE
|
||||
cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:lib/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
|
||||
ranlib $@
|
||||
$(RANLIB) $@
|
||||
|
||||
|
@ -13,13 +13,13 @@
|
||||
# the plugins in this line and put them as built-ins, otherwise your
|
||||
# application won't be able to load them.
|
||||
#
|
||||
PLUGINS := @PLUGINS@
|
||||
PLUGINS :=@PLUGINS@
|
||||
|
||||
#
|
||||
# Built-in modules to build
|
||||
# WARNING: do NOT put gtk and gnome together in this rule.
|
||||
#
|
||||
BUILTINS := @BUILTINS@
|
||||
BUILTINS :=@BUILTINS@
|
||||
|
||||
#
|
||||
# Additional build options
|
||||
@ -42,7 +42,9 @@ GETOPT = @GETOPT@
|
||||
# Build environment
|
||||
#
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
SHELL = @SHELL@
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
#
|
||||
# Installation environment
|
||||
@ -137,6 +139,10 @@ INCLUDE += -Iinclude -Iextras -I/usr/local/include
|
||||
#
|
||||
LIB += @LIB@ -L/usr/local/lib
|
||||
|
||||
ifneq (,$(findstring mingw32,$(SYS)))
|
||||
LIB += -lws2_32
|
||||
endif
|
||||
|
||||
#
|
||||
# Libraries needed by built-in modules
|
||||
#
|
||||
|
65
configure.in
65
configure.in
@ -13,22 +13,37 @@ dnl Check for tools
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl AM_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl Check for compiler environment
|
||||
AC_C_CONST
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Check for endianness if not cross-compiling
|
||||
if test x${cross_compiling} != xyes; then
|
||||
AC_C_BIGENDIAN
|
||||
fi
|
||||
|
||||
dnl Check for system libs needed
|
||||
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
|
||||
AC_CHECK_FUNCS(setenv putenv)
|
||||
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")])
|
||||
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")])
|
||||
AC_CHECK_FUNC(nanosleep,,[AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")])])
|
||||
AC_CHECK_FUNC(connect,,[
|
||||
AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
|
||||
])
|
||||
AC_CHECK_FUNC(gethostbyname,,[
|
||||
AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")
|
||||
])
|
||||
AC_CHECK_FUNC(nanosleep,,[
|
||||
AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[
|
||||
AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")
|
||||
])
|
||||
])
|
||||
AC_CHECK_FUNCS(usleep)
|
||||
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")])
|
||||
AC_CHECK_FUNC(inet_aton,,[
|
||||
AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
|
||||
])
|
||||
AC_CHECK_FUNCS(vasprintf)
|
||||
|
||||
AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
|
||||
@ -54,10 +69,10 @@ AC_EGREP_CPP(yes,
|
||||
AC_CHECK_LIB(threads,thread_create,LIB="${LIB} -lthreads")
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
||||
AC_CHECK_HEADERS(stddef.h)
|
||||
AC_CHECK_HEADERS(getopt.h)
|
||||
AC_CHECK_HEADERS(sys/sockio.h)
|
||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
|
||||
|
||||
dnl Check for headers
|
||||
AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
|
||||
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h unistd.h)
|
||||
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
|
||||
AC_CHECK_HEADERS(dlfcn.h image.h)
|
||||
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
|
||||
@ -66,6 +81,16 @@ AC_CHECK_HEADERS(machine/param.h)
|
||||
dnl Check for threads library
|
||||
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
|
||||
|
||||
dnl Check for misc headers
|
||||
AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
|
||||
AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
|
||||
Define if <pthread.h> defines pthread_cond_t.)
|
||||
])
|
||||
AC_EGREP_HEADER(strncasecmp,strings.h,[
|
||||
AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
|
||||
Define if <strings.h> defines strncasecmp.)
|
||||
])
|
||||
|
||||
dnl Do a series of bizarre compilation tests
|
||||
save_CFLAGS=$CFLAGS
|
||||
|
||||
@ -74,7 +99,7 @@ CFLAGS="${CFLAGS} -Wall -Werror"
|
||||
AC_MSG_CHECKING([for ntohl in sys/param.h])
|
||||
AC_TRY_COMPILE([#include <sys/param.h>
|
||||
void foo() { int meuh; ntohl(meuh); }],,
|
||||
AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if ntohl is in <sys/param.h>.)
|
||||
AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
|
||||
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
||||
|
||||
dnl Check for -rdynamic flag
|
||||
@ -110,11 +135,17 @@ dnl
|
||||
dnl default modules
|
||||
dnl
|
||||
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion"
|
||||
if test x$host_os = xbeos; then
|
||||
case x$host_os in
|
||||
xbeos|xnto-qnx)
|
||||
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx"
|
||||
else
|
||||
;;
|
||||
xmingw32msvc)
|
||||
ACCEL_PLUGINS="idctmmx idctmmxext motionmmx motionmmxext"
|
||||
;;
|
||||
*)
|
||||
ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl DVD module: check for DVD ioctls
|
||||
@ -166,7 +197,7 @@ AC_ARG_ENABLE(mmx,
|
||||
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
|
||||
[ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
|
||||
BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ],
|
||||
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH="${ARCH} mmx";
|
||||
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
|
||||
BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi ])
|
||||
|
||||
dnl
|
||||
@ -507,9 +538,9 @@ trace mode : ${TRACE}
|
||||
optimizations : ${OPTIMS}
|
||||
CSS decryption : ${CSS}
|
||||
need builtin getopt : ${GETOPT}
|
||||
plugin modules : ${PLUGINS}
|
||||
built-in modules : ${BUILTINS}
|
||||
vlc aliases : ${ALIASES}
|
||||
plugin modules :${PLUGINS}
|
||||
built-in modules :${BUILTINS}
|
||||
vlc aliases :${ALIASES}
|
||||
|
||||
You may now tune Makefile.opts at your convenience."
|
||||
|
||||
|
@ -75,6 +75,9 @@
|
||||
#include <unixlib.h>
|
||||
#if HAVE_STRING_H - 0
|
||||
#include <string.h>
|
||||
#ifdef STRNCASECMP_IN_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -650,6 +653,7 @@ int
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf(stderr,
|
||||
@ -660,6 +664,7 @@ int
|
||||
fprintf(stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
}
|
||||
|
||||
nextchar += strlen(nextchar);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Collection of useful common types and macros definitions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: common.h,v 1.30 2001/04/11 02:01:24 henri Exp $
|
||||
* $Id: common.h,v 1.31 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@via.ecp.fr>
|
||||
* Vincent Seguin <seguin@via.ecp.fr>
|
||||
@ -142,6 +142,7 @@ struct data_packet_s;
|
||||
|
||||
#ifdef NTOHL_IN_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#elif defined(WIN32)
|
||||
#else
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
@ -451,7 +451,7 @@
|
||||
* message function was called */
|
||||
#define INTF_MSG_DBG_FORMAT "## %s:%s(),%i: "
|
||||
|
||||
/* Maximal number of arguments on a command line, including the function name */
|
||||
/* Max number of arguments on a command line, including the function name */
|
||||
#define INTF_MAX_ARGS 20
|
||||
|
||||
/* Maximal size of a command line in a script */
|
||||
|
@ -109,6 +109,9 @@
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
@ -133,7 +136,13 @@
|
||||
/* getopt support */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define if ntohl is in <sys/param.h>. */
|
||||
/* Define if <pthread.h> defines pthread_cond_t. */
|
||||
#undef PTHREAD_COND_T_IN_PTHREAD_H
|
||||
|
||||
/* Define if <strings.h> defines strncasecmp. */
|
||||
#undef STRNCASECMP_IN_STRINGS_H
|
||||
|
||||
/* Define if <sys/param.h> defines ntohl. */
|
||||
#undef NTOHL_IN_SYS_PARAM_H
|
||||
|
||||
/* Define if <sys/types.h> defines boolean_t. */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_ext-dec.h: structures exported to the VideoLAN decoders
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: input_ext-dec.h,v 1.29 2001/04/25 10:22:32 massiot Exp $
|
||||
* $Id: input_ext-dec.h,v 1.30 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
* Michel Kaempf <maxx@via.ecp.fr>
|
||||
@ -169,7 +169,7 @@ typedef struct bit_stream_s
|
||||
byte_t * p_byte;
|
||||
/* Pointer to the last byte that is to be read (in the current packet */
|
||||
byte_t * p_end;
|
||||
/* Temporary buffer in case we're not aligned when changing data packets. */
|
||||
/* Temporary buffer in case we're not aligned when changing data packets */
|
||||
WORD_TYPE i_showbits_buffer;
|
||||
data_packet_t showbits_data;
|
||||
} bit_stream_t;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* modules.h : Module management functions.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: modules.h,v 1.20 2001/04/15 04:19:57 sam Exp $
|
||||
* $Id: modules.h,v 1.21 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -21,6 +21,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef WIN32
|
||||
#include <sys/types.h> /* off_t */
|
||||
#endif
|
||||
|
||||
/* Number of tries before we unload an unused module */
|
||||
#define MODULE_HIDE_DELAY 100
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This header provides a portable threads implementation.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: threads.h,v 1.16 2001/03/21 13:42:33 sam Exp $
|
||||
* $Id: threads.h,v 1.17 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@via.ecp.fr>
|
||||
@ -25,18 +25,23 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(HAVE_PTHREAD_H) /* pthreads (Linux & BSD for example) */
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H) /* pthreads (like Linux & BSD) */
|
||||
#include <pthread.h>
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H) /* GNUMach */
|
||||
#include <cthreads.h>
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H) /* BeOS */
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H) /* BeOS */
|
||||
#undef MAX
|
||||
#undef MIN
|
||||
#include <kernel/OS.h>
|
||||
#include <kernel/scheduler.h>
|
||||
#include <byteorder.h>
|
||||
|
||||
#elif defined(WIN32) /* Win32 with MinGW32 compiler */
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
#else
|
||||
#error no threads available on your system !
|
||||
#endif
|
||||
@ -71,17 +76,15 @@
|
||||
* Types definition
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
typedef pthread_t vlc_thread_t;
|
||||
typedef pthread_mutex_t vlc_mutex_t;
|
||||
typedef pthread_cond_t vlc_cond_t;
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
|
||||
typedef cthread_t vlc_thread_t;
|
||||
|
||||
/* those structs are the ones defined in /include/cthreads.h but we need
|
||||
/* Those structs are the ones defined in /include/cthreads.h but we need
|
||||
* to handle (*foo) where foo is a (mutex_t) while they handle (foo) where
|
||||
* foo is a (mutex_t*) */
|
||||
typedef struct s_mutex {
|
||||
@ -99,8 +102,7 @@ typedef struct s_condition {
|
||||
} vlc_cond_t;
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
|
||||
/* This is the BeOS implementation of the vlc thread, note that the mutex is
|
||||
/* This is the BeOS implementation of the vlc threads, note that the mutex is
|
||||
* not a real mutex and the cond_var is not like a pthread cond_var but it is
|
||||
* enough for what wee need */
|
||||
|
||||
@ -118,6 +120,12 @@ typedef struct
|
||||
thread_id thread;
|
||||
} vlc_cond_t;
|
||||
|
||||
#elif defined(WIN32)
|
||||
typedef HANDLE vlc_thread_t;
|
||||
typedef HANDLE vlc_mutex_t;
|
||||
typedef HANDLE vlc_cond_t;
|
||||
typedef unsigned (__stdcall *PTHREAD_START) (void *);
|
||||
|
||||
#endif
|
||||
|
||||
typedef void *(*vlc_thread_func_t)(void *p_data);
|
||||
@ -126,24 +134,24 @@ typedef void *(*vlc_thread_func_t)(void *p_data);
|
||||
* Prototypes
|
||||
*****************************************************************************/
|
||||
|
||||
static __inline__ int vlc_thread_create( vlc_thread_t *p_thread, char *psz_name,
|
||||
vlc_thread_func_t func, void *p_data );
|
||||
static __inline__ void vlc_thread_exit ( void );
|
||||
static __inline__ void vlc_thread_join ( vlc_thread_t thread );
|
||||
static __inline__ int vlc_thread_create ( vlc_thread_t *, char *,
|
||||
vlc_thread_func_t, void * );
|
||||
static __inline__ void vlc_thread_exit ( void );
|
||||
static __inline__ void vlc_thread_join ( vlc_thread_t );
|
||||
|
||||
static __inline__ int vlc_mutex_init ( vlc_mutex_t *p_mutex );
|
||||
static __inline__ int vlc_mutex_lock ( vlc_mutex_t *p_mutex );
|
||||
static __inline__ int vlc_mutex_unlock ( vlc_mutex_t *p_mutex );
|
||||
static __inline__ int vlc_mutex_destroy ( vlc_mutex_t *p_mutex );
|
||||
static __inline__ int vlc_mutex_init ( vlc_mutex_t * );
|
||||
static __inline__ int vlc_mutex_lock ( vlc_mutex_t * );
|
||||
static __inline__ int vlc_mutex_unlock ( vlc_mutex_t * );
|
||||
static __inline__ int vlc_mutex_destroy ( vlc_mutex_t * );
|
||||
|
||||
static __inline__ int vlc_cond_init ( vlc_cond_t *p_condvar );
|
||||
static __inline__ int vlc_cond_signal ( vlc_cond_t *p_condvar );
|
||||
static __inline__ int vlc_cond_wait ( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex );
|
||||
static __inline__ int vlc_cond_destroy ( vlc_cond_t *p_condvar );
|
||||
static __inline__ int vlc_cond_init ( vlc_cond_t * );
|
||||
static __inline__ int vlc_cond_signal ( vlc_cond_t * );
|
||||
static __inline__ int vlc_cond_wait ( vlc_cond_t *, vlc_mutex_t * );
|
||||
static __inline__ int vlc_cond_destroy ( vlc_cond_t * );
|
||||
|
||||
#if 0
|
||||
static _inline__ int vlc_cond_timedwait ( vlc_cond_t * condvar, vlc_mutex_t * mutex,
|
||||
mtime_t absoute_timeout_time );
|
||||
static __inline__ int vlc_cond_timedwait( vlc_cond_t *, vlc_mutex_t *,
|
||||
mtime_t );
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
@ -153,7 +161,7 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
|
||||
char *psz_name, vlc_thread_func_t func,
|
||||
void *p_data)
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_create( p_thread, NULL, func, p_data );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -165,6 +173,23 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
|
||||
B_NORMAL_PRIORITY, p_data );
|
||||
return resume_thread( *p_thread );
|
||||
|
||||
#elif defined(WIN32)
|
||||
#if 0
|
||||
DWORD threadID;
|
||||
/* This method is not recommended when using the MSVCRT C library,
|
||||
* so we'll have to use _beginthreadex instead */
|
||||
*p_thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) func,
|
||||
p_data, 0, &threadID);
|
||||
#endif
|
||||
unsigned threadID;
|
||||
/* When using the MSVCRT C library you have to use the _beginthreadex
|
||||
* function instead of CreateThread, otherwise you'll end up with memory
|
||||
* leaks and the signal function not working */
|
||||
*p_thread = (HANDLE)_beginthreadex(NULL, 0, (PTHREAD_START) func,
|
||||
p_data, 0, &threadID);
|
||||
|
||||
return( *p_thread ? 0 : 1 );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -173,7 +198,7 @@ static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
|
||||
*****************************************************************************/
|
||||
static __inline__ void vlc_thread_exit( void )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
pthread_exit( 0 );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -183,6 +208,14 @@ static __inline__ void vlc_thread_exit( void )
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
exit_thread( 0 );
|
||||
|
||||
#elif defined(WIN32)
|
||||
#if 0
|
||||
ExitThread( 0 );
|
||||
#endif
|
||||
/* For now we don't close the thread handles (because of race conditions).
|
||||
* Need to be looked at. */
|
||||
_endthreadex(0);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -191,7 +224,7 @@ static __inline__ void vlc_thread_exit( void )
|
||||
*****************************************************************************/
|
||||
static __inline__ void vlc_thread_join( vlc_thread_t thread )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
pthread_join( thread, NULL );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -201,6 +234,9 @@ static __inline__ void vlc_thread_join( vlc_thread_t thread )
|
||||
int32 exit_value;
|
||||
wait_for_thread( thread, &exit_value );
|
||||
|
||||
#elif defined(WIN32)
|
||||
WaitForSingleObject( thread, INFINITE);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -209,7 +245,7 @@ static __inline__ void vlc_thread_join( vlc_thread_t thread )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_mutex_init( p_mutex, NULL );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -219,7 +255,11 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
|
||||
/* check the arguments and whether it's already been initialized */
|
||||
if( p_mutex == NULL ) return B_BAD_VALUE;
|
||||
if( p_mutex == NULL )
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if( p_mutex->init == 9999 )
|
||||
{
|
||||
return EALREADY;
|
||||
@ -227,10 +267,17 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
|
||||
|
||||
p_mutex->lock = create_sem( 1, "BeMutex" );
|
||||
if( p_mutex->lock < B_NO_ERROR )
|
||||
{
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
p_mutex->init = 9999;
|
||||
return B_OK;
|
||||
|
||||
#elif defined(WIN32)
|
||||
*p_mutex = CreateMutex(0,FALSE,0);
|
||||
return (*p_mutex?0:1);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -239,7 +286,7 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_mutex_lock( p_mutex );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -249,12 +296,23 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
status_t err;
|
||||
|
||||
if( !p_mutex ) return B_BAD_VALUE;
|
||||
if( p_mutex->init < 2000 ) return B_NO_INIT;
|
||||
if( !p_mutex )
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if( p_mutex->init < 2000 )
|
||||
{
|
||||
return B_NO_INIT;
|
||||
}
|
||||
|
||||
err = acquire_sem( p_mutex->lock );
|
||||
return err;
|
||||
|
||||
#elif defined(WIN32)
|
||||
WaitForSingleObject( *p_mutex, INFINITE );
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -263,7 +321,7 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_mutex_unlock( p_mutex );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -271,13 +329,23 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
|
||||
return 0;
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
if( !p_mutex)
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if(! p_mutex) return B_BAD_VALUE;
|
||||
if( p_mutex->init < 2000 ) return B_NO_INIT;
|
||||
if( p_mutex->init < 2000 )
|
||||
{
|
||||
return B_NO_INIT;
|
||||
}
|
||||
|
||||
release_sem( p_mutex->lock );
|
||||
return B_OK;
|
||||
|
||||
#elif defined(WIN32)
|
||||
ReleaseMutex( *p_mutex );
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -286,13 +354,22 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_mutex_destroy( p_mutex );
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
if( p_mutex->init == 9999 )
|
||||
{
|
||||
delete_sem( p_mutex->lock );
|
||||
}
|
||||
|
||||
p_mutex->init = 0;
|
||||
return B_OK;
|
||||
|
||||
#elif defined(WIN32)
|
||||
CloseHandle(*p_mutex);
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -301,7 +378,7 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_cond_init( vlc_cond_t *p_condvar )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_cond_init( p_condvar, NULL );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -315,15 +392,28 @@ static __inline__ int vlc_cond_init( vlc_cond_t *p_condvar )
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
if( !p_condvar )
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if( p_condvar->init == 9999 )
|
||||
{
|
||||
return EALREADY;
|
||||
}
|
||||
|
||||
p_condvar->thread = -1;
|
||||
p_condvar->init = 9999;
|
||||
return 0;
|
||||
|
||||
#elif defined(WIN32)
|
||||
/* Create an auto-reset event. */
|
||||
*p_condvar = CreateEvent( NULL, /* no security */
|
||||
FALSE, /* auto-reset event */
|
||||
FALSE, /* non-signaled initially */
|
||||
NULL ); /* unnamed */
|
||||
|
||||
return( *p_condvar ? 0 : 1 );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -332,7 +422,7 @@ static __inline__ int vlc_cond_init( vlc_cond_t *p_condvar )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_cond_signal( p_condvar );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -345,33 +435,45 @@ static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
if( !p_condvar )
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if( p_condvar->init < 2000 )
|
||||
{
|
||||
return B_NO_INIT;
|
||||
}
|
||||
|
||||
while( p_condvar->thread != -1 )
|
||||
{
|
||||
thread_info info;
|
||||
if( get_thread_info(p_condvar->thread, &info) == B_BAD_VALUE )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( info.state != B_THREAD_SUSPENDED )
|
||||
{
|
||||
// The waiting thread is not suspended so it could
|
||||
// have been interrupted beetwen the unlock and the
|
||||
// suspend_thread line. That is why we sleep a little
|
||||
// before retesting p_condver->thread.
|
||||
/* The waiting thread is not suspended so it could
|
||||
* have been interrupted beetwen the unlock and the
|
||||
* suspend_thread line. That is why we sleep a little
|
||||
* before retesting p_condver->thread. */
|
||||
snooze( 10000 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ok, we have to wake up that thread
|
||||
/* Ok, we have to wake up that thread */
|
||||
resume_thread( p_condvar->thread );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
#elif defined(WIN32)
|
||||
/* Try to release one waiting thread. */
|
||||
PulseEvent ( *p_condvar );
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -380,7 +482,7 @@ static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_cond_wait( p_condvar, p_mutex );
|
||||
|
||||
#elif defined(HAVE_CTHREADS_H)
|
||||
@ -389,17 +491,23 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
if( !p_condvar )
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if( !p_mutex )
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
if( p_condvar->init < 2000 )
|
||||
{
|
||||
return B_NO_INIT;
|
||||
}
|
||||
|
||||
// The p_condvar->thread var is initialized before the unlock because
|
||||
// it enables to identify when the thread is interrupted beetwen the
|
||||
// unlock line and the suspend_thread line
|
||||
/* The p_condvar->thread var is initialized before the unlock because
|
||||
* it enables to identify when the thread is interrupted beetwen the
|
||||
* unlock line and the suspend_thread line */
|
||||
p_condvar->thread = find_thread( NULL );
|
||||
vlc_mutex_unlock( p_mutex );
|
||||
suspend_thread( p_condvar->thread );
|
||||
@ -408,6 +516,18 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
|
||||
vlc_mutex_lock( p_mutex );
|
||||
return 0;
|
||||
|
||||
#elif defined(WIN32)
|
||||
/* Release the <external_mutex> here and wait for the event
|
||||
* to become signaled, due to <pthread_cond_signal> being
|
||||
* called. */
|
||||
vlc_mutex_unlock( p_mutex );
|
||||
|
||||
WaitForSingleObject( *p_condvar, INFINITE );
|
||||
|
||||
/* Reacquire the mutex before returning. */
|
||||
vlc_mutex_lock( p_mutex );
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -416,10 +536,17 @@ static __inline__ int vlc_cond_wait( vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex
|
||||
*****************************************************************************/
|
||||
static __inline__ int vlc_cond_destroy( vlc_cond_t *p_condvar )
|
||||
{
|
||||
#if defined(HAVE_PTHREAD_H)
|
||||
#if defined(PTHREAD_COND_T_IN_PTHREAD_H)
|
||||
return pthread_cond_destroy( p_condvar );
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
p_condvar->init = 0;
|
||||
return 0;
|
||||
|
||||
#elif defined(WIN32)
|
||||
CloseHandle( *p_condvar );
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
/*****************************************************************************
|
||||
* dvd_udf.c: udf filesystem tools.
|
||||
* ---
|
||||
*****************************************************************************
|
||||
* Mainly used to find asolute logical block adress of *.ifo files. It only
|
||||
* contains the basic udf handling functions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998-2001 VideoLAN
|
||||
* $Id: dvd_udf.c,v 1.5 2001/04/15 04:19:57 sam Exp $
|
||||
* $Id: dvd_udf.c,v 1.6 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Author: Stéphane Borel <stef@via.ecp.fr>
|
||||
*
|
||||
@ -43,6 +43,9 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#ifdef STRNCASECMP_IN_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "common.h"
|
||||
@ -85,8 +88,8 @@ typedef struct ad_s
|
||||
|
||||
/*****************************************************************************
|
||||
* UDFReadLB: reads absolute Logical Block of the disc
|
||||
* ---
|
||||
* returns number of read bytes on success, 0 on error
|
||||
*****************************************************************************
|
||||
* Returns number of read bytes on success, 0 on error
|
||||
*****************************************************************************/
|
||||
static int UDFReadLB( int i_fd, off_t i_lba, size_t i_block_count, u8 *pi_data )
|
||||
{
|
||||
@ -244,8 +247,8 @@ static int UDFPartition( u8 * pi_data, u16 * pi_flags, u16 * pi_nb,
|
||||
|
||||
/*****************************************************************************
|
||||
* UDFLogVolume: reads the volume descriptor and checks the parameters
|
||||
* ---
|
||||
* returns 0 on OK, 1 on error
|
||||
*****************************************************************************
|
||||
* Returns 0 on OK, 1 on error
|
||||
*****************************************************************************/
|
||||
static int UDFLogVolume(u8 * pi_data, char * p_volume_descriptor )
|
||||
{
|
||||
@ -357,7 +360,7 @@ static int UDFFileIdentifier( u8 * pi_data, u8 * pi_file_characteristics,
|
||||
|
||||
/*****************************************************************************
|
||||
* UDFMapICB: Maps ICB to FileAD
|
||||
* ---
|
||||
*****************************************************************************
|
||||
* ICB: Location of ICB of directory to scan
|
||||
* FileType: Type of the file
|
||||
* File: Location of file the ICB is pointing to
|
||||
@ -397,7 +400,7 @@ static int UDFMapICB( struct ad_s icb, u8 * pi_file_type, struct ad_s * p_file,
|
||||
|
||||
/*****************************************************************************
|
||||
* UDFScanDir: serach filename in dir
|
||||
* ---
|
||||
*****************************************************************************
|
||||
* Dir: Location of directory to scan
|
||||
* FileName: Name of file to look for
|
||||
* FileICB: Location of ICB of the found file
|
||||
@ -489,14 +492,13 @@ static int UDFScanDir( struct ad_s dir, char * psz_filename,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
* UDFFindPartition: looks for a partition on the disc
|
||||
* ---
|
||||
*****************************************************************************
|
||||
* partnum: number of the partition, starting at 0
|
||||
* part: structure to fill with the partition information
|
||||
* return 1 if partition found, 0 on error;
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
static int UDFFindPartition( int i_part_nb, struct partition_s *p_partition )
|
||||
{
|
||||
u8 pi_lb[DVD_LB_SIZE];
|
||||
@ -634,13 +636,13 @@ static int UDFFindPartition( int i_part_nb, struct partition_s *p_partition )
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
/*****************************************************************************
|
||||
* UDFFindFile: looks for a file on the UDF disc/imagefile
|
||||
* ---
|
||||
*****************************************************************************
|
||||
* Path has to be the absolute pathname on the UDF filesystem,
|
||||
* starting with '/'.
|
||||
* returns absolute LB number, or 0 on error
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
u32 UDFFindFile( int i_fd, char * psz_path )
|
||||
{
|
||||
struct partition_s partition;
|
||||
@ -737,3 +739,4 @@ u32 UDFFindFile( int i_fd, char * psz_path )
|
||||
|
||||
return partition.i_start + file.i_location;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*****************************************************************************
|
||||
* input_dvd.c: DVD raw reading plugin.
|
||||
* ---
|
||||
*****************************************************************************
|
||||
* This plugins should handle all the known specificities of the DVD format,
|
||||
* especially the 2048 bytes logical block size.
|
||||
* It depends on:
|
||||
@ -10,7 +10,7 @@
|
||||
* -dvd_udf to find files
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998-2001 VideoLAN
|
||||
* $Id: input_dvd.c,v 1.50 2001/04/27 19:29:11 massiot Exp $
|
||||
* $Id: input_dvd.c,v 1.51 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Author: Stéphane Borel <stef@via.ecp.fr>
|
||||
*
|
||||
@ -51,6 +51,9 @@
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <string.h>
|
||||
#ifdef STRNCASECMP_IN_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#include "config.h"
|
||||
@ -1346,7 +1349,8 @@ static int DVDChapterSelect( thread_dvd_data_t * p_dvd, int i_chapter )
|
||||
|
||||
DVDChooseAngle( p_dvd );
|
||||
|
||||
/* Search for cell_index in cell adress_table and initialize start sector */
|
||||
/* Search for cell_index in cell adress_table and initialize
|
||||
* start sector */
|
||||
if( DVDFindSector( p_dvd ) < 0 )
|
||||
{
|
||||
intf_ErrMsg( "dvd error: can't select chapter" );
|
||||
|
@ -2,7 +2,7 @@
|
||||
* fb.c : framebuffer plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: fb.c,v 1.5 2001/03/21 13:42:33 sam Exp $
|
||||
* $Id: fb.c,v 1.6 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -51,7 +51,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* ggi.c : GGI plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: ggi.c,v 1.5 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: ggi.c,v 1.6 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -51,7 +51,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* glide.c : 3dfx Glide plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: glide.c,v 1.4 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: glide.c,v 1.5 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -51,7 +51,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gnome.c : Gnome plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000 VideoLAN
|
||||
* $Id: gnome.c,v 1.6 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: gnome.c,v 1.7 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -48,7 +48,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( intf_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gtk.c : Gtk+ plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000 VideoLAN
|
||||
* $Id: gtk.c,v 1.2 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: gtk.c,v 1.3 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -48,7 +48,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( intf_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: gtk_callbacks.c,v 1.14 2001/04/11 04:31:59 sam Exp $
|
||||
* $Id: gtk_callbacks.c,v 1.15 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Stéphane Borel <stef@via.ecp.fr>
|
||||
@ -29,7 +29,7 @@
|
||||
* Preamble
|
||||
*****************************************************************************/
|
||||
#include "defs.h"
|
||||
|
||||
#include <sys/types.h> /* off_t */
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
/*****************************************************************************
|
||||
* Callbacks
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void
|
||||
on_menubar_open_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gtk_playlist.c : Interface for the playlist dialog
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: gtk_playlist.c,v 1.9 2001/04/08 13:09:32 octplane Exp $
|
||||
* $Id: gtk_playlist.c,v 1.10 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Pierre Baillet <oct@zoy.org>
|
||||
*
|
||||
@ -170,7 +170,11 @@ rebuildCList(GtkCList * clist, playlist_t * playlist_p)
|
||||
|
||||
for( dummy=0; dummy < playlist_p->i_size; dummy++ )
|
||||
{
|
||||
#ifdef WIN32 /* WIN32 HACK */
|
||||
text[0] = g_strdup( "" );
|
||||
#else
|
||||
text[0] = g_strdup( rindex( (char *)(playlist_p->p_item[playlist_p->i_size -1 - dummy].psz_name ), '/' ) + 1 );
|
||||
#endif
|
||||
text[1] = g_strdup( "no info");
|
||||
|
||||
gtk_clist_insert( clist, 0, text );
|
||||
|
@ -340,7 +340,8 @@ static int MakeWindow( vout_thread_t *p_vout )
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* AllocBuffer: forces offscreen allocation (if different than current) in memory type specified
|
||||
* AllocBuffer: forces offscreen allocation (if different than current) in
|
||||
* memory type specified
|
||||
*****************************************************************************/
|
||||
static int AllocBuffer ( vout_thread_t *p_vout, short index )
|
||||
{
|
||||
@ -462,7 +463,7 @@ static void vout_Display( vout_thread_t *p_vout )
|
||||
|
||||
/*****************************************************************************
|
||||
* flushQD: flushes buffered window area
|
||||
*****************************************************************************/
|
||||
*****************************************************************************/
|
||||
void flushQD( vout_thread_t *p_vout )
|
||||
{
|
||||
CGrafPtr thePort;
|
||||
@ -491,7 +492,7 @@ void flushQD( vout_thread_t *p_vout )
|
||||
|
||||
/*****************************************************************************
|
||||
* BlitToWindow: checks offscreen and blits it to the front
|
||||
*****************************************************************************/
|
||||
*****************************************************************************/
|
||||
|
||||
void BlitToWindow( vout_thread_t *p_vout, short index )
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
* mga.c : Matrox Graphic Array plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: mga.c,v 1.4 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: mga.c,v 1.5 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -51,7 +51,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_es.c: Elementary Stream demux and packet management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: input_es.c,v 1.1 2001/04/20 15:02:48 sam Exp $
|
||||
* $Id: input_es.c,v 1.2 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors:
|
||||
*
|
||||
@ -213,7 +213,11 @@ static void ESSeek( input_thread_t * p_input, off_t i_position )
|
||||
p_method = (thread_es_data_t *)p_input->p_plugin_data;
|
||||
|
||||
/* A little bourrin but should work for a while --Meuuh */
|
||||
#ifndef WIN32
|
||||
fseeko( p_method->stream, i_position, SEEK_SET );
|
||||
#else
|
||||
fseek( p_method->stream, (long)i_position, SEEK_SET );
|
||||
#endif
|
||||
|
||||
p_input->stream.p_selected_area->i_tell = i_position;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_ps.c: PS demux and packet management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: input_ps.c,v 1.19 2001/04/27 23:29:14 stef Exp $
|
||||
* $Id: input_ps.c,v 1.20 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
* Cyril Deguet <asmax@via.ecp.fr>
|
||||
@ -32,6 +32,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef STRNCASECMP_IN_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -527,7 +530,11 @@ static void PSSeek( input_thread_t * p_input, off_t i_position )
|
||||
p_method = (thread_ps_data_t *)p_input->p_plugin_data;
|
||||
|
||||
/* A little bourrin but should work for a while --Meuuh */
|
||||
#ifndef WIN32
|
||||
fseeko( p_method->stream, i_position, SEEK_SET );
|
||||
#else
|
||||
fseek( p_method->stream, (long)i_position, SEEK_SET );
|
||||
#endif
|
||||
|
||||
p_input->stream.p_selected_area->i_tell = i_position;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_ts.c: TS demux and netlist management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: input_ts.c,v 1.15 2001/04/27 16:08:26 sam Exp $
|
||||
* $Id: input_ts.c,v 1.16 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Henri Fallon <henri@videolan.org>
|
||||
*
|
||||
@ -31,14 +31,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef STRNCASECMP_IN_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef SYS_NTO
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
@ -195,7 +203,7 @@ static void TSInit( input_thread_t * p_input )
|
||||
*****************************************************************************/
|
||||
void TSFakeOpen( input_thread_t * p_input )
|
||||
{
|
||||
#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
|
||||
#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
|
||||
char *psz_name = p_input->p_source;
|
||||
|
||||
if( ( strlen(psz_name) > 3 ) && !strncasecmp( psz_name, "ts:", 3 ) )
|
||||
@ -279,7 +287,11 @@ static int TSRead( input_thread_t * p_input,
|
||||
|
||||
if( i_data )
|
||||
{
|
||||
#ifndef WIN32
|
||||
i_read = readv( p_input->i_handle, p_iovec, INPUT_READ_ONCE );
|
||||
#else
|
||||
i_read = -1;
|
||||
#endif
|
||||
|
||||
if( i_read == -1 )
|
||||
{
|
||||
@ -301,3 +313,4 @@ static int TSRead( input_thread_t * p_input,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* aout_sdl.c : audio sdl functions library
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: aout_sdl.c,v 1.11 2001/04/26 11:23:16 sam Exp $
|
||||
* $Id: aout_sdl.c,v 1.12 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Michel Kaempf <maxx@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@zoy.org>
|
||||
@ -109,7 +109,6 @@ static int aout_Probe( probedata_t *p_data )
|
||||
{
|
||||
SDL_AudioSpec desired, obtained;
|
||||
|
||||
return 0;
|
||||
/* Start AudioSDL */
|
||||
if( SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE) != 0 )
|
||||
{
|
||||
@ -120,7 +119,7 @@ static int aout_Probe( probedata_t *p_data )
|
||||
desired.freq = 11025; /* frequency */
|
||||
desired.format = AUDIO_U8; /* unsigned 8 bits */
|
||||
desired.channels = 2; /* mono */
|
||||
desired.callback = NULL; /* no callback function yet */
|
||||
desired.callback = aout_SDLCallback; /* callback function mandatory */
|
||||
desired.userdata = NULL; /* null parm for callback */
|
||||
desired.samples = 4096;
|
||||
|
||||
@ -133,6 +132,7 @@ static int aout_Probe( probedata_t *p_data )
|
||||
}
|
||||
|
||||
/* Otherwise, there are good chances we can use this plugin, return 100. */
|
||||
intf_DbgMsg( "aout: SDL_OpenAudio successfully run" );
|
||||
SDL_CloseAudio();
|
||||
|
||||
if( TestMethod( AOUT_METHOD_VAR, "sdl" ) )
|
||||
|
@ -2,7 +2,7 @@
|
||||
* sdl.c : SDL plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: sdl.c,v 1.14 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: sdl.c,v 1.15 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Pierre Baillet <oct@zoy.org>
|
||||
@ -55,7 +55,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( aout_getfunctions )( function_list_t * p_function_list );
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* vout_sdl.c: SDL video output display method
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: vout_sdl.c,v 1.47 2001/04/11 02:01:24 henri Exp $
|
||||
* $Id: vout_sdl.c,v 1.48 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Pierre Baillet <oct@zoy.org>
|
||||
@ -158,8 +158,12 @@ static int vout_Create( vout_thread_t *p_vout )
|
||||
}
|
||||
|
||||
/* Initialize library */
|
||||
if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTTHREAD | SDL_INIT_NOPARACHUTE)
|
||||
< 0 )
|
||||
if( SDL_Init( SDL_INIT_VIDEO
|
||||
#ifndef WIN32
|
||||
/* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/
|
||||
| SDL_INIT_EVENTTHREAD
|
||||
#endif
|
||||
| SDL_INIT_NOPARACHUTE ) < 0 )
|
||||
{
|
||||
intf_ErrMsg( "vout error: can't initialize SDL (%s)", SDL_GetError() );
|
||||
free( p_vout->p_sys );
|
||||
|
@ -2,7 +2,7 @@
|
||||
* ncurses.c : NCurses plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: ncurses.c,v 1.3 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: ncurses.c,v 1.4 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -48,7 +48,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( intf_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* vout_x11.c: X11 video output display method
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: vout_x11.c,v 1.21 2001/04/27 19:29:11 massiot Exp $
|
||||
* $Id: vout_x11.c,v 1.22 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@zoy.org>
|
||||
@ -559,7 +559,8 @@ static int vout_Manage( vout_thread_t *p_vout )
|
||||
if ( b_gofullscreen )
|
||||
{
|
||||
char *psz_display;
|
||||
/* Open display, unsing 'vlc_display' or DISPLAY environment variable */
|
||||
/* Open display, unsing 'vlc_display' or the DISPLAY
|
||||
* environment variable */
|
||||
psz_display = XDisplayName( main_GetPszVariable( VOUT_DISPLAY_VAR, NULL ) );
|
||||
|
||||
intf_DbgMsg( "vout: changing full-screen status" );
|
||||
|
@ -2,7 +2,7 @@
|
||||
* x11.c : X11 plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: x11.c,v 1.5 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: x11.c,v 1.6 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -51,7 +51,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* xvideo.c : Xvideo plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: xvideo.c,v 1.1 2001/04/01 06:21:44 sam Exp $
|
||||
* $Id: xvideo.c,v 1.2 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Shane Harper <shanegh@optusnet.com.au>
|
||||
*
|
||||
@ -51,7 +51,7 @@ MODULE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
* Capabilities defined in the other files.
|
||||
******************************************************************************/
|
||||
*****************************************************************************/
|
||||
void _M( vout_getfunctions )( function_list_t * p_function_list );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2,7 +2,7 @@
|
||||
* transforms_yuvmmx.h: MMX YUV transformation assembly
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: transforms_yuvmmx.h,v 1.3 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: transforms_yuvmmx.h,v 1.4 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Olie Lho <ollie@sis.com.tw>
|
||||
* Gaël Hendryckx <jimmy@via.ecp.fr>
|
||||
@ -44,7 +44,6 @@ UNUSED_LONGLONG(mmx_blueshift) = 0x03;
|
||||
#undef UNUSED_LONGLONG
|
||||
|
||||
#define MMX_INIT_16 " \n\
|
||||
\n\
|
||||
movd (%1), %%mm0 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
|
||||
movd (%2), %%mm1 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
|
||||
pxor %%mm4, %%mm4 # zero mm4 \n\
|
||||
@ -53,13 +52,11 @@ movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
|
||||
"
|
||||
|
||||
#define MMX_INIT_16_GRAY " \n\
|
||||
\n\
|
||||
movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
|
||||
#movl $0, (%3) # cache preload for image \n\
|
||||
"
|
||||
|
||||
#define MMX_INIT_32 " \n\
|
||||
\n\
|
||||
movd (%1), %%mm0 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
|
||||
movl $0, (%3) # cache preload for image \n\
|
||||
movd (%2), %%mm1 # Load 4 Cr 00 00 00 00 v3 v2 v1 v0 \n\
|
||||
@ -76,7 +73,6 @@ movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
|
||||
*/
|
||||
|
||||
#define MMX_YUV_MUL " \n\
|
||||
\n\
|
||||
# convert the chroma part \n\
|
||||
punpcklbw %%mm4, %%mm0 # scatter 4 Cb 00 u3 00 u2 00 u1 00 u0 \n\
|
||||
punpcklbw %%mm4, %%mm1 # scatter 4 Cr 00 v3 00 v2 00 v1 00 v0 \n\
|
||||
@ -104,7 +100,6 @@ pmulhw mmx_Y_coeff, %%mm7 # Mul 4 Y odd 00 y7 00 y5 00 y3 00 y1 \n\
|
||||
"
|
||||
|
||||
#define MMX_YUV_YCBR_422 " \n\
|
||||
\n\
|
||||
punpcklbw %%mm1, %%mm0 \n\
|
||||
movq %%mm6, %%mm2 \n\
|
||||
punpckhbw %%mm0, %%mm6 \n\
|
||||
@ -122,7 +117,6 @@ movq %%mm6, 8(%3) \n\
|
||||
*/
|
||||
|
||||
#define MMX_YUV_ADD " \n\
|
||||
\n\
|
||||
# Do horizontal and vertical scaling \n\
|
||||
movq %%mm0, %%mm3 # Copy Cblue \n\
|
||||
movq %%mm1, %%mm4 # Copy Cred \n\
|
||||
@ -155,7 +149,6 @@ punpcklbw %%mm5, %%mm2 # G7 G6 G5 G4 G3 G2 G1 G0 \n\
|
||||
*/
|
||||
|
||||
#define MMX_YUV_GRAY " \n\
|
||||
\n\
|
||||
# convert the luma part \n\
|
||||
psubusb mmx_10w, %%mm6 \n\
|
||||
movq %%mm6, %%mm7 \n\
|
||||
@ -201,7 +194,6 @@ movq %%mm2, 8(%3) \n\
|
||||
*/
|
||||
|
||||
#define MMX_UNPACK_16 " \n\
|
||||
\n\
|
||||
# mask unneeded bits off \n\
|
||||
pand mmx_redmask, %%mm0 # b7b6b5b4 b3______ b7b6b5b4 b3______ \n\
|
||||
pand mmx_grnmask, %%mm2 # g7g6g5g4 g3g2____ g7g6g5g4 g3g2____ \n\
|
||||
@ -237,7 +229,6 @@ movq %%mm5, 8(%3) # store pixel 4-7 \n\
|
||||
*/
|
||||
|
||||
#define MMX_UNPACK_32 " \n\
|
||||
\n\
|
||||
pxor %%mm3, %%mm3 # zero mm3 \n\
|
||||
movq %%mm0, %%mm6 # B7 B6 B5 B4 B3 B2 B1 B0 \n\
|
||||
movq %%mm1, %%mm7 # R7 R6 R5 R4 R3 R2 R1 R0 \n\
|
||||
@ -265,3 +256,4 @@ movq %%mm4, 24(%3) # Store ARGB7 ARGB6 \n\
|
||||
#pxor %%mm4, %%mm4 # zero mm4 \n\
|
||||
#movq 8(%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
|
||||
"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* audio_output.c : audio output thread
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000, 2001 VideoLAN
|
||||
* $Id: audio_output.c,v 1.56 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: audio_output.c,v 1.57 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Michel Kaempf <maxx@via.ecp.fr>
|
||||
*
|
||||
@ -39,6 +39,9 @@
|
||||
#include "defs.h"
|
||||
|
||||
#include <unistd.h> /* getpid() */
|
||||
#ifdef WIN32 /* getpid() for win32 is located in process.h */
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h> /* "intf_msg.h" */
|
||||
#include <stdlib.h> /* calloc(), malloc(), free() */
|
||||
@ -116,8 +119,8 @@ aout_thread_t *aout_CreateThread( int *pi_status )
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
p_aout->b_stereo = ( p_aout->i_channels == 2 ) ? 1 : 0; /* FIXME: only works
|
||||
for i_channels == 1 or 2 ??*/
|
||||
/* FIXME: only works for i_channels == 1 or 2 ?? */
|
||||
p_aout->b_stereo = ( p_aout->i_channels == 2 ) ? 1 : 0;
|
||||
|
||||
if ( p_aout->pf_setformat( p_aout ) )
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
* decoders.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: input.c,v 1.101 2001/04/27 18:07:56 henri Exp $
|
||||
* $Id: input.c,v 1.102 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
@ -34,12 +34,15 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#ifdef STRNCASECMP_IN_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
/* Network functions */
|
||||
|
||||
#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
|
||||
#include <netdb.h> /* hostent ... */
|
||||
#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
|
||||
#include <netdb.h> /* hostent ... */
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -488,7 +491,7 @@ void input_FileOpen( input_thread_t * p_input )
|
||||
p_input->stream.p_selected_area->i_size = stat_info.st_size;
|
||||
}
|
||||
else if( S_ISFIFO(stat_info.st_mode)
|
||||
#ifndef SYS_BEOS
|
||||
#if !defined( SYS_BEOS ) && !defined( WIN32 )
|
||||
|| S_ISSOCK(stat_info.st_mode)
|
||||
#endif
|
||||
)
|
||||
@ -509,8 +512,13 @@ void input_FileOpen( input_thread_t * p_input )
|
||||
vlc_mutex_unlock( &p_input->stream.stream_lock );
|
||||
|
||||
intf_Msg( "input: opening file `%s'", p_input->p_source );
|
||||
#ifndef WIN32
|
||||
if( (p_input->i_handle = open( psz_name,
|
||||
/*O_NONBLOCK | O_LARGEFILE*/0 )) == (-1) )
|
||||
#else
|
||||
if( (p_input->i_handle = open( psz_name, O_BINARY
|
||||
/*O_NONBLOCK | O_LARGEFILE*/ )) == (-1) )
|
||||
#endif
|
||||
{
|
||||
intf_ErrMsg( "input error: cannot open file (%s)", strerror(errno) );
|
||||
p_input->b_error = 1;
|
||||
@ -531,7 +539,7 @@ void input_FileClose( input_thread_t * p_input )
|
||||
}
|
||||
|
||||
|
||||
#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
|
||||
#if !defined( SYS_BEOS ) && !defined( SYS_NTO ) && !defined( WIN32 )
|
||||
/*****************************************************************************
|
||||
* input_NetworkOpen : open a network socket
|
||||
*****************************************************************************/
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_clock.c: Clock/System date convertions, stream management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: input_clock.c,v 1.10 2001/04/26 03:55:44 sam Exp $
|
||||
* $Id: input_clock.c,v 1.11 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
@ -27,6 +27,7 @@
|
||||
#include "defs.h"
|
||||
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_dec.c: Functions for the management of decoders
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: input_dec.c,v 1.10 2001/04/06 09:15:47 sam Exp $
|
||||
* $Id: input_dec.c,v 1.11 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_ext-dec.c: services to the decoders
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: input_ext-dec.c,v 1.13 2001/04/25 10:22:33 massiot Exp $
|
||||
* $Id: input_ext-dec.c,v 1.14 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
@ -27,6 +27,7 @@
|
||||
#include "defs.h"
|
||||
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_ext-intf.c: services to the interface
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: input_ext-intf.c,v 1.21 2001/04/27 16:08:26 sam Exp $
|
||||
* $Id: input_ext-intf.c,v 1.22 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
@ -27,6 +27,11 @@
|
||||
#include "defs.h"
|
||||
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_netlist.c: netlist management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: input_netlist.c,v 1.33 2001/04/06 09:15:47 sam Exp $
|
||||
* $Id: input_netlist.c,v 1.34 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Henri Fallon <henri@videolan.org>
|
||||
*
|
||||
@ -29,7 +29,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/uio.h> /* struct iovec */
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
@ -45,6 +47,13 @@
|
||||
#include "input.h"
|
||||
#include "input_netlist.h"
|
||||
|
||||
#ifdef WIN32
|
||||
struct iovec
|
||||
{
|
||||
void *iov_base; /* Pointer to data. */
|
||||
size_t iov_len; /* Length of data. */
|
||||
};
|
||||
#endif
|
||||
/*****************************************************************************
|
||||
* Local prototypes
|
||||
*****************************************************************************/
|
||||
|
@ -2,7 +2,7 @@
|
||||
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: input_programs.c,v 1.51 2001/04/27 19:29:11 massiot Exp $
|
||||
* $Id: input_programs.c,v 1.52 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* mpeg_system.c: TS, PS and PES management
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: mpeg_system.c,v 1.51 2001/04/17 14:54:54 massiot Exp $
|
||||
* $Id: mpeg_system.c,v 1.52 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
* Michel Lespinasse <walken@via.ecp.fr>
|
||||
@ -32,6 +32,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
* interface, such as command line.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: interface.c,v 1.72 2001/04/11 02:01:24 henri Exp $
|
||||
* $Id: interface.c,v 1.73 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
*
|
||||
@ -32,6 +32,7 @@
|
||||
#include <stdlib.h> /* free(), strtol() */
|
||||
#include <stdio.h> /* FILE */
|
||||
#include <string.h> /* strerror() */
|
||||
#include <sys/types.h> /* off_t */
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* intf_channels.c: channel handling functions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: intf_channels.c,v 1.2 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: intf_channels.c,v 1.3 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
*
|
||||
@ -92,9 +92,9 @@ int intf_LoadChannels( intf_thread_t *p_intf, char *psz_filename )
|
||||
|
||||
if( i_index != 0 )
|
||||
{
|
||||
/* Allocate array and rewind - some of the lines may be invalid, and the
|
||||
* array will probably be larger than the actual number of channels, but
|
||||
* it has no consequence. */
|
||||
/* Allocate array and rewind - some of the lines may be invalid,
|
||||
* and the array will probably be larger than the actual number of
|
||||
* channels, but it has no consequences. */
|
||||
p_intf->p_channel = malloc( sizeof( intf_channel_t ) * i_index );
|
||||
if( p_intf->p_channel == NULL )
|
||||
{
|
||||
@ -296,7 +296,7 @@ static int ParseChannel( intf_channel_t *p_channel, char *psz_str )
|
||||
i_field = -1;
|
||||
}
|
||||
break;
|
||||
case 5: /* input vlan id */
|
||||
case 5: /* input vlan id */
|
||||
p_channel->i_input_vlan_id = strtol( psz_str, &psz_end, 0);
|
||||
if( (*psz_str == '\0') || (*psz_end != '\0') )
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
* interface, such as message output. See config.h for output configuration.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: intf_msg.c,v 1.31 2001/04/27 19:29:11 massiot Exp $
|
||||
* $Id: intf_msg.c,v 1.32 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
*
|
||||
@ -47,6 +47,10 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* intf_msg_item_t
|
||||
*****************************************************************************
|
||||
|
@ -4,7 +4,7 @@
|
||||
* and spawn threads.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: main.c,v 1.88 2001/04/27 18:07:56 henri Exp $
|
||||
* $Id: main.c,v 1.89 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@zoy.org>
|
||||
@ -261,7 +261,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
|
||||
/*
|
||||
* Read configuration
|
||||
*/
|
||||
if( GetConfiguration( &i_argc, ppsz_argv, ppsz_env ) ) /* parse cmd line */
|
||||
if( GetConfiguration( &i_argc, ppsz_argv, ppsz_env ) ) /* parse cmd line */
|
||||
{
|
||||
intf_MsgDestroy();
|
||||
return( errno );
|
||||
@ -864,13 +864,15 @@ static void Version( void )
|
||||
static void InitSignalHandler( void )
|
||||
{
|
||||
/* Termination signals */
|
||||
signal( SIGHUP, FatalSignalHandler );
|
||||
#ifndef WIN32
|
||||
signal( SIGINT, FatalSignalHandler );
|
||||
signal( SIGHUP, FatalSignalHandler );
|
||||
signal( SIGQUIT, FatalSignalHandler );
|
||||
|
||||
/* Other signals */
|
||||
signal( SIGALRM, SimpleSignalHandler );
|
||||
signal( SIGPIPE, SimpleSignalHandler );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -897,9 +899,11 @@ static void FatalSignalHandler( int i_signal )
|
||||
/* Once a signal has been trapped, the termination sequence will be
|
||||
* armed and following signals will be ignored to avoid sending messages
|
||||
* to an interface having been destroyed */
|
||||
signal( SIGHUP, SIG_IGN );
|
||||
#ifndef WIN32
|
||||
signal( SIGINT, SIG_IGN );
|
||||
signal( SIGHUP, SIG_IGN );
|
||||
signal( SIGQUIT, SIG_IGN );
|
||||
#endif
|
||||
|
||||
/* Acknowledge the signal received */
|
||||
intf_ErrMsgImm( "intf error: signal %d received, exiting", i_signal );
|
||||
|
@ -2,7 +2,7 @@
|
||||
* modules.c : Built-in and plugin modules management functions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001 VideoLAN
|
||||
* $Id: modules.c,v 1.26 2001/04/20 11:06:48 sam Exp $
|
||||
* $Id: modules.c,v 1.27 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
|
||||
@ -72,7 +72,7 @@ static int AllocateBuiltinModule( module_bank_t *,
|
||||
int ( * ) ( module_t * ),
|
||||
int ( * ) ( module_t * ),
|
||||
int ( * ) ( module_t * ) );
|
||||
static int FreeModule ( module_bank_t * p_bank, module_t * );
|
||||
static int DeleteModule ( module_bank_t * p_bank, module_t * );
|
||||
static int LockModule ( module_t * );
|
||||
static int UnlockModule ( module_t * );
|
||||
#ifdef HAVE_DYNAMIC_PLUGINS
|
||||
@ -213,7 +213,7 @@ void module_DestroyBank( module_bank_t * p_bank )
|
||||
|
||||
while( p_bank->first != NULL )
|
||||
{
|
||||
if( FreeModule( p_bank, p_bank->first ) )
|
||||
if( DeleteModule( p_bank, p_bank->first ) )
|
||||
{
|
||||
/* Module deletion failed */
|
||||
intf_ErrMsg( "module error: `%s' can't be removed. trying harder.",
|
||||
@ -406,7 +406,7 @@ void module_Unneed( module_bank_t * p_bank, module_t * p_module )
|
||||
*****************************************************************************
|
||||
* This function loads a dynamically loadable module and allocates a structure
|
||||
* for its information data. The module can then be handled by module_Need,
|
||||
* module_Unneed and HideModule. It can be removed by FreeModule.
|
||||
* module_Unneed and HideModule. It can be removed by DeleteModule.
|
||||
*****************************************************************************/
|
||||
static int AllocatePluginModule( module_bank_t * p_bank, char * psz_filename )
|
||||
{
|
||||
@ -525,7 +525,7 @@ static int AllocatePluginModule( module_bank_t * p_bank, char * psz_filename )
|
||||
*****************************************************************************
|
||||
* This function registers a built-in module and allocates a structure
|
||||
* for its information data. The module can then be handled by module_Need,
|
||||
* module_Unneed and HideModule. It can be removed by FreeModule.
|
||||
* module_Unneed and HideModule. It can be removed by DeleteModule.
|
||||
*****************************************************************************/
|
||||
static int AllocateBuiltinModule( module_bank_t * p_bank,
|
||||
int ( *pf_init ) ( module_t * ),
|
||||
@ -623,11 +623,11 @@ static int AllocateBuiltinModule( module_bank_t * p_bank,
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* FreeModule: delete a module and its structure.
|
||||
* DeleteModule: delete a module and its structure.
|
||||
*****************************************************************************
|
||||
* This function can only be called if i_usage <= 0.
|
||||
*****************************************************************************/
|
||||
static int FreeModule( module_bank_t * p_bank, module_t * p_module )
|
||||
static int DeleteModule( module_bank_t * p_bank, module_t * p_module )
|
||||
{
|
||||
/* If the module is not in use but is still in memory, we first have
|
||||
* to hide it and remove it from memory before we can free the
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Functions are prototyped in mtime.h.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998, 1999, 2000 VideoLAN
|
||||
* $Id: mtime.c,v 1.16 2001/03/21 13:42:34 sam Exp $
|
||||
* $Id: mtime.c,v 1.17 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
*
|
||||
@ -40,6 +40,10 @@
|
||||
#include <kernel/OS.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
#include "mtime.h"
|
||||
@ -70,9 +74,30 @@ char *mstrtime( char *psz_buffer, mtime_t date )
|
||||
*****************************************************************************/
|
||||
mtime_t mdate( void )
|
||||
{
|
||||
#ifdef HAVE_KERNEL_OS_H
|
||||
#if defined( HAVE_KERNEL_OS_H )
|
||||
return( real_time_clock_usecs() );
|
||||
|
||||
|
||||
#elif defined( WIN32 )
|
||||
/* We don't get the real date, just the value of a high precision timer.
|
||||
* this is because the usual time functions have at best only a milisecond
|
||||
* resolution */
|
||||
mtime_t freq,usec_time;
|
||||
|
||||
if( !QueryPerformanceFrequency((LARGE_INTEGER *)&freq) )
|
||||
{
|
||||
/* Milisecond resolution */
|
||||
FILETIME file_time;
|
||||
GetSystemTimeAsFileTime((FILETIME *)&file_time);
|
||||
usec_time *= 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Microsecond resolution */
|
||||
QueryPerformanceCounter((LARGE_INTEGER *)&usec_time);
|
||||
usec_time /= (freq/1000000);
|
||||
}
|
||||
return( usec_time );
|
||||
|
||||
#else
|
||||
struct timeval tv_date;
|
||||
|
||||
@ -81,7 +106,7 @@ mtime_t mdate( void )
|
||||
* here, since tv is a local variable. */
|
||||
gettimeofday( &tv_date, NULL );
|
||||
return( (mtime_t) tv_date.tv_sec * 1000000 + (mtime_t) tv_date.tv_usec );
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -94,8 +119,7 @@ mtime_t mdate( void )
|
||||
*****************************************************************************/
|
||||
void mwait( mtime_t date )
|
||||
{
|
||||
#ifdef HAVE_KERNEL_OS_H
|
||||
|
||||
#if defined( HAVE_KERNEL_OS_H )
|
||||
mtime_t delay;
|
||||
|
||||
delay = date - real_time_clock_usecs();
|
||||
@ -104,15 +128,26 @@ void mwait( mtime_t date )
|
||||
return;
|
||||
}
|
||||
snooze( delay );
|
||||
|
||||
#elif defined( WIN32 )
|
||||
mtime_t usec_time, delay;
|
||||
|
||||
usec_time = mdate();
|
||||
delay = date - usec_time;
|
||||
if( delay <= 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
/* Sleep only has milisecond resolution */
|
||||
Sleep( (DWORD)(delay/1000) );
|
||||
|
||||
#else
|
||||
|
||||
#ifdef HAVE_USLEEP
|
||||
# ifdef HAVE_USLEEP
|
||||
struct timeval tv_date;
|
||||
|
||||
#else
|
||||
# else
|
||||
struct timeval tv_date, tv_delay;
|
||||
|
||||
#endif
|
||||
# endif
|
||||
mtime_t delay; /* delay in msec, signed to detect errors */
|
||||
|
||||
/* see mdate() about gettimeofday() possible errors */
|
||||
@ -127,17 +162,17 @@ void mwait( mtime_t date )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_USLEEP
|
||||
# ifdef HAVE_USLEEP
|
||||
usleep( delay );
|
||||
#else
|
||||
# else
|
||||
tv_delay.tv_sec = delay / 1000000;
|
||||
tv_delay.tv_usec = delay % 1000000;
|
||||
|
||||
/* see msleep() about select() errors */
|
||||
select( 0, NULL, NULL, NULL, &tv_delay );
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* HAVE_KERNEL_OS_H */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@ -147,12 +182,17 @@ void mwait( mtime_t date )
|
||||
*****************************************************************************/
|
||||
void msleep( mtime_t delay )
|
||||
{
|
||||
#ifdef HAVE_KERNEL_OS_H
|
||||
#if defined( HAVE_KERNEL_OS_H )
|
||||
snooze( delay );
|
||||
#else
|
||||
|
||||
#ifdef HAVE_USLEEP
|
||||
#elif defined( WIN32 )
|
||||
Sleep( delay/1000 ); /* Sleep only has milisecond resolution */
|
||||
/* Maybe we could use the multimedia timer to reach the right resolution, */
|
||||
/* or the old Winsock select() function ?*/
|
||||
|
||||
#elif defined( HAVE_USLEEP )
|
||||
usleep( delay );
|
||||
|
||||
#else
|
||||
struct timeval tv_delay;
|
||||
|
||||
@ -163,7 +203,7 @@ void msleep( mtime_t delay )
|
||||
* (i.e. when a signal is sent to the thread, or when memory is full), and
|
||||
* can be ingnored. */
|
||||
select( 0, NULL, NULL, NULL, &tv_delay );
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_KERNEL_OS_H */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* netutils.c: various network functions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000, 2001 VideoLAN
|
||||
* $Id: netutils.c,v 1.27 2001/04/27 18:07:57 henri Exp $
|
||||
* $Id: netutils.c,v 1.28 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* Benoit Steiner <benny@via.ecp.fr>
|
||||
@ -28,15 +28,18 @@
|
||||
*****************************************************************************/
|
||||
#include "defs.h"
|
||||
|
||||
#include <netdb.h> /* gethostbyname() */
|
||||
#include <stdlib.h> /* free(), realloc(), atoi() */
|
||||
#include <errno.h> /* errno() */
|
||||
#include <string.h> /* bzero(), bcopy() */
|
||||
#include <unistd.h> /* gethostname() */
|
||||
#include <sys/time.h> /* gettimeofday */
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netdb.h> /* gethostbyname() */
|
||||
#include <netinet/in.h> /* BSD: struct in_addr */
|
||||
#include <sys/socket.h> /* BSD: struct sockaddr */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h> /* inet_ntoa(), inet_aton() */
|
||||
#endif
|
||||
@ -91,7 +94,7 @@ int network_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port,
|
||||
|
||||
/* Reset struct */
|
||||
memset( p_socket, 0, sizeof( struct sockaddr_in ) );
|
||||
p_socket->sin_family = AF_INET; /* family */
|
||||
p_socket->sin_family = AF_INET; /* family */
|
||||
p_socket->sin_port = htons( i_port );
|
||||
if( psz_broadcast == NULL )
|
||||
{
|
||||
@ -143,8 +146,8 @@ int network_BuildRemoteAddr( struct sockaddr_in * p_socket, char * psz_server )
|
||||
|
||||
/* Reset structure */
|
||||
memset( p_socket, 0, sizeof( struct sockaddr_in ) );
|
||||
p_socket->sin_family = AF_INET; /* family */
|
||||
p_socket->sin_port = htons( 0 ); /* This is for remote end */
|
||||
p_socket->sin_family = AF_INET; /* family */
|
||||
p_socket->sin_port = htons( 0 ); /* This is for remote end */
|
||||
|
||||
/* Try to convert address directly from in_addr - this will work if
|
||||
* psz_in_addr is dotted decimal. */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* spu_decoder.c : spu decoder thread
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000 VideoLAN
|
||||
* $Id: spu_decoder.c,v 1.37 2001/04/25 10:22:33 massiot Exp $
|
||||
* $Id: spu_decoder.c,v 1.38 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
*
|
||||
@ -27,6 +27,9 @@
|
||||
#include "defs.h"
|
||||
|
||||
#include <unistd.h> /* getpid() */
|
||||
#ifdef WIN32 /* getpid() for win32 is located in process.h */
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h> /* malloc(), free() */
|
||||
#include <string.h> /* memcpy(), memset() */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* video_text.c : text manipulation functions
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: video_text.c,v 1.25 2001/04/27 19:29:11 massiot Exp $
|
||||
* $Id: video_text.c,v 1.26 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@zoy.org>
|
||||
@ -254,7 +254,11 @@ vout_font_t *vout_LoadFont( const char *psz_name )
|
||||
}
|
||||
|
||||
/* Open file */
|
||||
#ifndef WIN32
|
||||
i_file = open( psz_file, O_RDONLY );
|
||||
#else
|
||||
i_file = open( psz_file, O_RDONLY | O_BINARY );
|
||||
#endif
|
||||
free( psz_file );
|
||||
|
||||
if( i_file != -1 )
|
||||
|
@ -2,7 +2,7 @@
|
||||
* video_parser.c : video parser thread
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: video_parser.c,v 1.79 2001/04/25 10:22:33 massiot Exp $
|
||||
* $Id: video_parser.c,v 1.80 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@via.ecp.fr>
|
||||
@ -279,7 +279,7 @@ static int InitThread( vpar_thread_t *p_vpar )
|
||||
p_vpar->pp_vdec[0]->b_error = 0;
|
||||
p_vpar->pp_vdec[0]->p_vpar = p_vpar;
|
||||
|
||||
# ifndef SYS_BEOS
|
||||
# if !defined(SYS_BEOS) && !defined(WIN32)
|
||||
# if VDEC_NICE
|
||||
/* Re-nice ourself */
|
||||
if( nice(VDEC_NICE) == -1 )
|
||||
|
@ -2,7 +2,7 @@
|
||||
* vpar_blocks.c : blocks parsing
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: vpar_blocks.c,v 1.79 2001/02/23 17:58:22 massiot Exp $
|
||||
* $Id: vpar_blocks.c,v 1.80 2001/04/28 03:36:25 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
* Jean-Marc Dressler <polux@via.ecp.fr>
|
||||
@ -204,7 +204,8 @@ static lookup_t pl_dct_dc_chrom_init_table_2[32] =
|
||||
};
|
||||
|
||||
|
||||
/* Tables for ac DCT coefficients. There are cut in many parts to save space */
|
||||
/* Tables for ac DCT coefficients. There are cut in many parts to
|
||||
* save space */
|
||||
/* Table B-14, DCT coefficients table zero,
|
||||
* codes 0100 ... 1xxx (used for first (DC) coefficient)
|
||||
*/
|
||||
@ -2135,3 +2136,4 @@ DECLARE_PICD( vpar_PictureData2IB, 1, I_CODING_TYPE, BOTTOM_FIELD );
|
||||
DECLARE_PICD( vpar_PictureData2PB, 1, P_CODING_TYPE, BOTTOM_FIELD );
|
||||
DECLARE_PICD( vpar_PictureData2BB, 1, B_CODING_TYPE, BOTTOM_FIELD );
|
||||
#endif
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* vpar_headers.c : headers parsing
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
* $Id: vpar_headers.c,v 1.81 2001/04/06 09:15:48 sam Exp $
|
||||
* $Id: vpar_headers.c,v 1.82 2001/04/28 03:36:26 sam Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
* Stéphane Borel <stef@via.ecp.fr>
|
||||
@ -344,7 +344,7 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
|
||||
p_vpar->pi_default_intra_quant );
|
||||
}
|
||||
|
||||
if( GetBits( &p_vpar->bit_stream, 1 ) ) /* load_non_intra_quantizer_matrix */
|
||||
if( GetBits(&p_vpar->bit_stream, 1) ) /* load_non_intra_quantizer_matrix */
|
||||
{
|
||||
LoadMatrix( p_vpar, &p_vpar->sequence.nonintra_quant );
|
||||
}
|
||||
@ -381,7 +381,8 @@ static void SequenceHeader( vpar_thread_t * p_vpar )
|
||||
p_vpar->sequence.i_chroma_format = GetBits( &p_vpar->bit_stream, 2 );
|
||||
p_vpar->sequence.i_width |= GetBits( &p_vpar->bit_stream, 2 ) << 12;
|
||||
p_vpar->sequence.i_height |= GetBits( &p_vpar->bit_stream, 2 ) << 12;
|
||||
/* bit_rate_extension, marker_bit, vbv_buffer_size_extension, low_delay */
|
||||
/* bit_rate_extension, marker_bit, vbv_buffer_size_extension,
|
||||
* low_delay */
|
||||
RemoveBits( &p_vpar->bit_stream, 22 );
|
||||
/* frame_rate_extension_n */
|
||||
i_dummy = GetBits( &p_vpar->bit_stream, 2 );
|
||||
@ -693,7 +694,7 @@ static void PictureHeader( vpar_thread_t * p_vpar )
|
||||
{
|
||||
/* This is a new frame. Get a structure from the video_output. */
|
||||
while( ( P_picture = vout_CreatePicture( p_vpar->p_vout,
|
||||
99+p_vpar->sequence.i_chroma_format, /*XXX??*/
|
||||
/* XXX */ 99+p_vpar->sequence.i_chroma_format,
|
||||
p_vpar->sequence.i_width,
|
||||
p_vpar->sequence.i_height ) )
|
||||
== NULL )
|
||||
@ -727,7 +728,8 @@ static void PictureHeader( vpar_thread_t * p_vpar )
|
||||
|
||||
#ifdef VDEC_SMP
|
||||
/* Link referenced pictures for the decoder
|
||||
* They are unlinked in vpar_ReleaseMacroblock() & vpar_DestroyMacroblock() */
|
||||
* They are unlinked in vpar_ReleaseMacroblock() &
|
||||
* vpar_DestroyMacroblock() */
|
||||
if( p_vpar->picture.i_coding_type == P_CODING_TYPE ||
|
||||
p_vpar->picture.i_coding_type == B_CODING_TYPE )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user