Commit b0ab70c9 authored by Jean-Marc Dressler's avatar Jean-Marc Dressler

   The BeOS port seems to work again.

   I used this command to play an unencrypted DVD, but maybe there is a
   better solution: ./vlc dvd:/dev/disk/ide/atapi/1/master/0/raw

   Current problems: gcc doesn't like MMX-EXT instructions, and refuses
   to have register %ebx being used in the main application. Grr.

   ,-- don't trust the CVS bot, it's Sam speaking here :)
  /
parent 8e3c802c
...@@ -26,7 +26,8 @@ default: ...@@ -26,7 +26,8 @@ default:
# .c and from itself. # .c and from itself.
-include $(MAKECMDGOALS) -include $(MAKECMDGOALS)
$(dependancies): .dep/%.d: %.c
$(cdependancies): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*) @test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
#@echo "generating dependancies for $*.c" #@echo "generating dependancies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \ @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
...@@ -34,3 +35,11 @@ $(dependancies): .dep/%.d: %.c ...@@ -34,3 +35,11 @@ $(dependancies): .dep/%.d: %.c
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ .dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@' [ -s $@ ] || rm -f $@'
$(cppdependancies): .dep/%.dpp: %.cpp
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
#@echo "generating dependancies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
...@@ -374,7 +374,6 @@ PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \ ...@@ -374,7 +374,6 @@ PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
STD_PLUGIN_OBJ = \ STD_PLUGIN_OBJ = \
$(PLUGIN_ALSA) \ $(PLUGIN_ALSA) \
$(PLUGIN_BEOS) \
$(PLUGIN_DSP) \ $(PLUGIN_DSP) \
$(PLUGIN_DUMMY) \ $(PLUGIN_DUMMY) \
$(PLUGIN_DVD) \ $(PLUGIN_DVD) \
...@@ -398,10 +397,6 @@ STD_PLUGIN_OBJ = \ ...@@ -398,10 +397,6 @@ STD_PLUGIN_OBJ = \
$(PLUGIN_YUV) \ $(PLUGIN_YUV) \
$(PLUGIN_YUVMMX) $(PLUGIN_YUVMMX)
NONSTD_PLUGIN_OBJ = \
$(PLUGIN_GLIDE) \
$(PLUGIN_GNOME)
# list duplicates # list duplicates
STD_PLUGIN_COMMON = plugins/idct/idct_common.o \ STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
plugins/motion/vdec_motion_common.o plugins/motion/vdec_motion_common.o
...@@ -410,11 +405,20 @@ STD_PLUGIN_COMMON = plugins/idct/idct_common.o \ ...@@ -410,11 +405,20 @@ STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \ STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \
$(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON) $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
NONSTD_PLUGIN_OBJ = \
$(PLUGIN_GLIDE) \
$(PLUGIN_GNOME)
NONSTD_CPP_PLUGIN_OBJ = \
$(PLUGIN_BEOS)
# #
# Other lists of files # Other lists of files
# #
objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ) objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
dependancies := $(objects:%.o=.dep/%.d) cdependancies := $(objects:%.o=.dep/%.d)
cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
# All symbols must be exported # All symbols must be exported
export export
...@@ -456,7 +460,13 @@ show: ...@@ -456,7 +460,13 @@ show:
@echo CFLAGS: $(CFLAGS) @echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS) @echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS) @echo LCFLAGS: $(LCFLAGS)
@echo C_OBJ: $(C_OBJ)
@echo CPP_OBJ: $(CPP_OBJ)
@echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ) @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
@echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
@echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
@echo objects: $(objects)
@echo cppobjects: $(cppobjects)
# ugliest of all, but I have no time to do it -- sam # ugliest of all, but I have no time to do it -- sam
snapshot: snapshot:
...@@ -533,7 +543,10 @@ gvlc fbvlc: vlc ...@@ -533,7 +543,10 @@ gvlc fbvlc: vlc
# #
# Generic rules (see below) # Generic rules (see below)
# #
$(dependancies): %.d: FORCE $(cdependancies): %.d: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(cppdependancies): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@ @$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(C_OBJ): %.o: Makefile.dep $(C_OBJ): %.o: Makefile.dep
...@@ -541,6 +554,8 @@ $(C_OBJ): %.o: .dep/%.d ...@@ -541,6 +554,8 @@ $(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c $(C_OBJ): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
$(CPP_OBJ): %.o: Makefile.dep
$(CPP_OBJ): %.o: .dep/%.dpp
$(CPP_OBJ): %.o: %.cpp $(CPP_OBJ): %.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
...@@ -563,6 +578,11 @@ $(PLUGIN_GLIDE): %.o: .dep/%.d ...@@ -563,6 +578,11 @@ $(PLUGIN_GLIDE): %.o: .dep/%.d
$(PLUGIN_GLIDE): %.o: %.c $(PLUGIN_GLIDE): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
$(PLUGIN_BEOS): %.o: Makefile.dep
$(PLUGIN_BEOS): %.o: .dep/%.dpp
$(PLUGIN_BEOS): %.o: %.cpp
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
# #
# Main application target # Main application target
# #
...@@ -581,7 +601,7 @@ endif ...@@ -581,7 +601,7 @@ endif
# #
lib/beos.so: $(PLUGIN_BEOS) lib/beos.so: $(PLUGIN_BEOS)
$(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ -lbe -lgame -lroot
lib/esd.so: $(PLUGIN_ESD) lib/esd.so: $(PLUGIN_ESD)
ifneq (,$(findstring bsd,$(SYS))) ifneq (,$(findstring bsd,$(SYS)))
......
...@@ -3367,7 +3367,12 @@ fi ...@@ -3367,7 +3367,12 @@ fi
done done
PLUGINS=${PLUGINS}"ps ts dvd yuv idct idctclassic motion "; PLUGINS=${PLUGINS}"ps ts dvd yuv idct idctclassic motion "
if test x$host_os = xbeos; then
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx "
else
ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext "
fi
ARCH=${host_cpu} ARCH=${host_cpu}
# Check whether --enable-ppro or --disable-ppro was given. # Check whether --enable-ppro or --disable-ppro was given.
...@@ -3381,9 +3386,9 @@ fi ...@@ -3381,9 +3386,9 @@ fi
# Check whether --enable-mmx or --disable-mmx was given. # Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then if test "${enable_mmx+set}" = set; then
enableval="$enable_mmx" enableval="$enable_mmx"
if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi
else else
if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi
fi fi
# Check whether --enable-debug or --disable-debug was given. # Check whether --enable-debug or --disable-debug was given.
...@@ -3515,17 +3520,17 @@ if test "${enable_alsa+set}" = set; then ...@@ -3515,17 +3520,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa" enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'` if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:3519: checking for sys/asoundlib.h" >&5 echo "configure:3524: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3524 "configure" #line 3529 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/asoundlib.h> #include <sys/asoundlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3542,7 +3547,7 @@ fi ...@@ -3542,7 +3547,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6 echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:3546: checking for main in -lasound" >&5 echo "configure:3551: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3550,14 +3555,14 @@ else ...@@ -3550,14 +3555,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS" LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3554 "configure" #line 3559 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
......
...@@ -106,7 +106,12 @@ AC_CHECK_HEADERS(sys/ioctl.h, ...@@ -106,7 +106,12 @@ AC_CHECK_HEADERS(sys/ioctl.h,
AC_EGREP_HEADER(dvd,linux/cdrom.h,AC_DEFINE(LINUX_DVD,1,DVD support for linux))]) AC_EGREP_HEADER(dvd,linux/cdrom.h,AC_DEFINE(LINUX_DVD,1,DVD support for linux))])
dnl default plugins dnl default plugins
PLUGINS=${PLUGINS}"ps ts dvd yuv idct idctclassic motion "; PLUGINS=${PLUGINS}"ps ts dvd yuv idct idctclassic motion "
if test x$host_os = xbeos; then
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx "
else
ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext "
fi
ARCH=${host_cpu} ARCH=${host_cpu}
AC_ARG_ENABLE(ppro, AC_ARG_ENABLE(ppro,
...@@ -115,8 +120,8 @@ AC_ARG_ENABLE(ppro, ...@@ -115,8 +120,8 @@ AC_ARG_ENABLE(ppro,
[ if test x${host_cpu} = xi686; then ARCH=${ARCH}" ppro"; fi ]) [ if test x${host_cpu} = xi686; then ARCH=${ARCH}" ppro"; fi ])
AC_ARG_ENABLE(mmx, AC_ARG_ENABLE(mmx,
[ --disable-mmx Disable MMX optimizations (default enabled for x86)], [ --disable-mmx Disable MMX optimizations (default enabled for x86)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi ], [ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx motionmmx motionmmxext idctmmx idctmmxext "; fi ]) [ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ])
AC_ARG_ENABLE(debug, AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default disabled)], [ --enable-debug Enable debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ]) [ if test x$enableval = xyes; then DEBUG=1; fi ])
......
...@@ -25,7 +25,8 @@ class VideoWindow : public BDirectWindow ...@@ -25,7 +25,8 @@ class VideoWindow : public BDirectWindow
{ {
public: public:
// standard constructor and destructor // standard constructor and destructor
VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_output); VideoWindow( BRect frame, const char *name,
struct vout_thread_s *p_video_output);
~VideoWindow(); ~VideoWindow();
// standard window member // standard window member
...@@ -37,7 +38,7 @@ public: ...@@ -37,7 +38,7 @@ public:
int32 i_bytes_per_pixel; int32 i_bytes_per_pixel;
int32 i_screen_depth; int32 i_screen_depth;
vout_thread_t *p_vout; struct vout_thread_s *p_vout;
uint8 *fBits; uint8 *fBits;
int32 fRowBytes; int32 fRowBytes;
......
...@@ -76,8 +76,15 @@ module_getsymbol( module_handle_t handle, char * psz_function ) ...@@ -76,8 +76,15 @@ module_getsymbol( module_handle_t handle, char * psz_function )
{ {
#ifdef SYS_BEOS #ifdef SYS_BEOS
void * p_symbol; void * p_symbol;
get_image_symbol( handle, psz_function, B_SYMBOL_TYPE_TEXT, &p_symbol ); if( B_OK == get_image_symbol( handle, psz_function,
B_SYMBOL_TYPE_TEXT, &p_symbol ) )
{
return( p_symbol ); return( p_symbol );
}
else
{
return( NULL );
}
#else #else
return( dlsym( handle, psz_function ) ); return( dlsym( handle, psz_function ) );
#endif #endif
......
...@@ -43,6 +43,12 @@ int TestCPU( int i_capabilities ); ...@@ -43,6 +43,12 @@ int TestCPU( int i_capabilities );
*****************************************************************************/ *****************************************************************************/
static __inline__ int CPUCapabilities( void ) static __inline__ int CPUCapabilities( void )
{ {
#ifdef SYS_BEOS
return( CPU_CAPABILITY_NONE
| CPU_CAPABILITY_486
| CPU_CAPABILITY_586
| CPU_CAPABILITY_MMX );
#else
int i_capabilities = CPU_CAPABILITY_NONE; int i_capabilities = CPU_CAPABILITY_NONE;
#ifdef __i386__ #ifdef __i386__
int i_eax, i_ebx, i_ecx, i_edx; int i_eax, i_ebx, i_ecx, i_edx;
...@@ -131,5 +137,6 @@ static __inline__ int CPUCapabilities( void ) ...@@ -131,5 +137,6 @@ static __inline__ int CPUCapabilities( void )
#endif /* __i386__ */ #endif /* __i386__ */
return( i_capabilities ); return( i_capabilities );
#endif /* SYS_BEOS */
} }
...@@ -287,6 +287,9 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex ) ...@@ -287,6 +287,9 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
{ {
#if defined(HAVE_PTHREAD_H) #if defined(HAVE_PTHREAD_H)
return pthread_mutex_destroy( p_mutex ); return pthread_mutex_destroy( p_mutex );
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
return 0;
#endif #endif
} }
...@@ -409,5 +412,9 @@ static __inline__ int vlc_cond_destroy( vlc_cond_t *p_condvar ) ...@@ -409,5 +412,9 @@ static __inline__ int vlc_cond_destroy( vlc_cond_t *p_condvar )
{ {
#if defined(HAVE_PTHREAD_H) #if defined(HAVE_PTHREAD_H)
return pthread_cond_destroy( p_condvar ); return pthread_cond_destroy( p_condvar );
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
return 0;
#endif #endif
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_beos.cpp: BeOS audio output * aout_beos.cpp: BeOS audio output
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: aout_beos.cpp,v 1.11 2001/02/17 08:48:56 sam Exp $ * $Id: aout_beos.cpp,v 1.12 2001/02/18 03:32:02 polux Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -45,7 +45,6 @@ extern "C" ...@@ -45,7 +45,6 @@ extern "C"
#include "common.h" #include "common.h"
#include "threads.h" #include "threads.h"
#include "mtime.h" #include "mtime.h"
#include "plugins.h"
#include "audio_output.h" #include "audio_output.h"
......
...@@ -87,7 +87,8 @@ int InitModule( module_t * p_module ) ...@@ -87,7 +87,8 @@ int InitModule( module_t * p_module )
*****************************************************************************/ *****************************************************************************/
int ActivateModule( module_t * p_module ) int ActivateModule( module_t * p_module )
{ {
p_module->p_functions = malloc( sizeof( module_functions_t ) ); p_module->p_functions =
( module_functions_t * )malloc( sizeof( module_functions_t ) );
if( p_module->p_functions == NULL ) if( p_module->p_functions == NULL )
{ {
return( -1 ); return( -1 );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface * intf_beos.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.7 2001/02/17 08:48:56 sam Exp $ * $Id: intf_beos.cpp,v 1.8 2001/02/18 03:32:02 polux Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -153,13 +153,13 @@ static int intf_Probe( probedata_t *p_data ) ...@@ -153,13 +153,13 @@ static int intf_Probe( probedata_t *p_data )
return( 999 ); return( 999 );
} }
return( 1 ); return( 100 );
} }
/***************************************************************************** /*****************************************************************************
* intf_Create: initialize dummy interface * intf_Open: initialize dummy interface
*****************************************************************************/ *****************************************************************************/
static int intf_Create( intf_thread_t *p_intf ) static int intf_Open( intf_thread_t *p_intf )
{ {
/* Allocate instance and initialize some members */ /* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) );
...@@ -172,8 +172,8 @@ static int intf_Create( intf_thread_t *p_intf ) ...@@ -172,8 +172,8 @@ static int intf_Create( intf_thread_t *p_intf )
/* Create the interface window */ /* Create the interface window */
p_intf->p_sys->p_window = p_intf->p_sys->p_window =
new InterfaceWindow( BRect( 100, 100, 200, 200 ), new InterfaceWindow( BRect( 50, 50, 400, 100 ),
"Interface :)", p_intf ); VOUT_TITLE " (BeOS interface)", p_intf );
if( p_intf->p_sys->p_window == 0 ) if( p_intf->p_sys->p_window == 0 )
{ {
free( p_intf->p_sys ); free( p_intf->p_sys );
...@@ -188,9 +188,9 @@ static int intf_Create( intf_thread_t *p_intf ) ...@@ -188,9 +188,9 @@ static int intf_Create( intf_thread_t *p_intf )
} }
/***************************************************************************** /*****************************************************************************
* intf_Destroy: destroy dummy interface * intf_Close: destroy dummy interface
*****************************************************************************/ *****************************************************************************/
static void intf_Destroy( intf_thread_t *p_intf ) static void intf_Close( intf_thread_t *p_intf )
{ {
/* Destroy the interface window */ /* Destroy the interface window */
p_intf->p_sys->p_window->Lock(); p_intf->p_sys->p_window->Lock();
......
...@@ -543,7 +543,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) ...@@ -543,7 +543,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout )
{ {
/* Create the DirectDraw video window */ /* Create the DirectDraw video window */
p_vout->p_sys->p_window = p_vout->p_sys->p_window =
new VideoWindow( BRect( 100, 100, 100+p_vout->i_width-1, 100+p_vout->i_height-1 ), "VideoLAN", p_vout ); new VideoWindow( BRect( 50, 150, 50+p_vout->i_width-1, 150+p_vout->i_height-1 ), VOUT_TITLE " (BeOS output)", p_vout );
if( p_vout->p_sys->p_window == 0 ) if( p_vout->p_sys->p_window == 0 )
{ {
free( p_vout->p_sys ); free( p_vout->p_sys );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* decoders. * decoders.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.82 2001/02/16 09:25:04 sam Exp $ * $Id: input.c,v 1.83 2001/02/18 03:32:02 polux Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -445,7 +445,11 @@ void input_FileOpen( input_thread_t * p_input ) ...@@ -445,7 +445,11 @@ void input_FileOpen( input_thread_t * p_input )
p_input->stream.b_seekable = 1; p_input->stream.b_seekable = 1;
p_input->stream.i_size = stat_info.st_size; p_input->stream.i_size = stat_info.st_size;
} }
else if( S_ISFIFO(stat_info.st_mode) || S_ISSOCK(stat_info.st_mode) ) else if( S_ISFIFO(stat_info.st_mode)
#ifndef SYS_BEOS
|| S_ISSOCK(stat_info.st_mode)
#endif
)
{ {
p_input->stream.b_seekable = 0; p_input->stream.b_seekable = 0;
p_input->stream.i_size = 0; p_input->stream.i_size = 0;
......
...@@ -92,8 +92,8 @@ void module_InitBank( module_bank_t * p_bank ) ...@@ -92,8 +92,8 @@ void module_InitBank( module_bank_t * p_bank )
char ** ppsz_path = path; char ** ppsz_path = path;
char * psz_file; char * psz_file;
#ifdef SYS_BEOS #ifdef SYS_BEOS
char * psz_program_path = beos_GetProgramPath(); char * psz_vlcpath = beos_GetProgramPath();
int i_programlen = strlen( psz_program_path ); int i_vlclen = strlen( psz_vlcpath );
#endif #endif
DIR * dir; DIR * dir;
struct dirent * file; struct dirent * file;
...@@ -124,13 +124,13 @@ void module_InitBank( module_bank_t * p_bank ) ...@@ -124,13 +124,13 @@ void module_InitBank( module_bank_t * p_bank )
* access files under the current directory */ * access files under the current directory */
if( strncmp( file->d_name, "/", 1 ) ) if( strncmp( file->d_name, "/", 1 ) )
{ {
psz_file = malloc( i_programlen + i_dirlen psz_file = malloc( i_vlclen + i_dirlen
+ i_filelen + 3 ); + i_filelen + 3 );
if( psz_file == NULL ) if( psz_file == NULL )
{ {
continue; continue;
} }
sprintf( psz_file, "%s/%s/%s", psz_programlen, sprintf( psz_file, "%s/%s/%s", psz_vlcpath,
*ppsz_path, file->d_name ); *ppsz_path, file->d_name );
} }
else else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_parser.c : video parser thread * video_parser.c : video parser thread
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: video_parser.c,v 1.74 2001/02/13 13:01:14 massiot Exp $ * $Id: video_parser.c,v 1.75 2001/02/18 03:32:02 polux Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -287,6 +287,7 @@ static int InitThread( vpar_thread_t *p_vpar ) ...@@ -287,6 +287,7 @@ static int InitThread( vpar_thread_t *p_vpar )
p_vpar->pp_vdec[0]->b_error = 0; p_vpar->pp_vdec[0]->b_error = 0;
p_vpar->pp_vdec[0]->p_vpar = p_vpar; p_vpar->pp_vdec[0]->p_vpar = p_vpar;
# ifndef SYS_BEOS
# if VDEC_NICE # if VDEC_NICE
/* Re-nice ourself */ /* Re-nice ourself */
if( nice(VDEC_NICE) == -1 ) if( nice(VDEC_NICE) == -1 )
...@@ -295,6 +296,7 @@ static int InitThread( vpar_thread_t *p_vpar ) ...@@ -295,6 +296,7 @@ static int InitThread( vpar_thread_t *p_vpar )
strerror(errno) ); strerror(errno) );
} }
# endif # endif
# endif
#endif #endif
/* Initialize lookup tables */ /* Initialize lookup tables */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment