# .c and from itself.
-include $(MAKECMDGOALS)
-$(dependancies): .dep/%.d: %.c
+
+$(cdependancies): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
#@echo "generating dependancies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -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 $@'
+
STD_PLUGIN_OBJ = \
$(PLUGIN_ALSA) \
- $(PLUGIN_BEOS) \
$(PLUGIN_DSP) \
$(PLUGIN_DUMMY) \
$(PLUGIN_DVD) \
$(PLUGIN_YUV) \
$(PLUGIN_YUVMMX)
-NONSTD_PLUGIN_OBJ = \
- $(PLUGIN_GLIDE) \
- $(PLUGIN_GNOME)
-
# list duplicates
STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
plugins/motion/vdec_motion_common.o
STD_PLUGIN_OBJ := $(filter-out $(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
#
-objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
-dependancies := $(objects:%.o=.dep/%.d)
+objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
+cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
# All symbols must be exported
export
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
+ @echo C_OBJ: $(C_OBJ)
+ @echo CPP_OBJ: $(CPP_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
snapshot:
#
# 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 $@
$(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+$(CPP_OBJ): %.o: Makefile.dep
+$(CPP_OBJ): %.o: .dep/%.dpp
$(CPP_OBJ): %.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
$(PLUGIN_GLIDE): %.o: %.c
$(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
#
#
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)
ifneq (,$(findstring bsd,$(SYS)))
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}
# Check whether --enable-ppro or --disable-ppro was given.
# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
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
- 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
# Check whether --enable-debug or --disable-debug was given.
enableval="$enable_alsa"
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 "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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3524 "configure"
+#line 3529 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
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}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 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_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3554 "configure"
+#line 3559 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
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*
eval "ac_cv_lib_$ac_lib_var=yes"
else
AC_EGREP_HEADER(dvd,linux/cdrom.h,AC_DEFINE(LINUX_DVD,1,DVD support for linux))])
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}
AC_ARG_ENABLE(ppro,
[ if test x${host_cpu} = xi686; then ARCH=${ARCH}" ppro"; fi ])
AC_ARG_ENABLE(mmx,
[ --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${host_cpu} = xi686 -o x${host_cpu} = xi586; 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}${ACCEL_PLUGINS}; fi ])
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
{
public:
// 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();
// standard window member
// this is the hook controling direct screen connection
virtual void DirectConnected(direct_buffer_info *info);
- int32 i_bytes_per_pixel;
- int32 i_screen_depth;
- vout_thread_t *p_vout;
+ int32 i_bytes_per_pixel;
+ int32 i_screen_depth;
+ struct vout_thread_s *p_vout;
uint8 *fBits;
int32 fRowBytes;
{
#ifdef SYS_BEOS
void * p_symbol;
- get_image_symbol( handle, psz_function, B_SYMBOL_TYPE_TEXT, &p_symbol );
- return( p_symbol );
+ if( B_OK == get_image_symbol( handle, psz_function,
+ B_SYMBOL_TYPE_TEXT, &p_symbol ) )
+ {
+ return( p_symbol );
+ }
+ else
+ {
+ return( NULL );
+ }
#else
return( dlsym( handle, psz_function ) );
#endif
*****************************************************************************/
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;
#ifdef __i386__
int i_eax, i_ebx, i_ecx, i_edx;
#endif /* __i386__ */
return( i_capabilities );
+#endif /* SYS_BEOS */
}
{
#if defined(HAVE_PTHREAD_H)
return pthread_mutex_destroy( p_mutex );
+
+#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
+ return 0;
#endif
}
{
#if defined(HAVE_PTHREAD_H)
return pthread_cond_destroy( p_condvar );
+
+#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
+ return 0;
#endif
}
+
* aout_beos.cpp: BeOS audio output
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
#include "common.h"
#include "threads.h"
#include "mtime.h"
-#include "plugins.h"
#include "audio_output.h"
*****************************************************************************/
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 )
{
return( -1 );
* intf_beos.cpp: beos interface
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
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 */
p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) );
/* Create the interface window */
p_intf->p_sys->p_window =
- new InterfaceWindow( BRect( 100, 100, 200, 200 ),
- "Interface :)", p_intf );
+ new InterfaceWindow( BRect( 50, 50, 400, 100 ),
+ VOUT_TITLE " (BeOS interface)", p_intf );
if( p_intf->p_sys->p_window == 0 )
{
free( p_intf->p_sys );
}
/*****************************************************************************
- * 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 */
p_intf->p_sys->p_window->Lock();
{
/* Create the DirectDraw video 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 )
{
free( p_vout->p_sys );
* decoders.
*****************************************************************************
* 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>
*
p_input->stream.b_seekable = 1;
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.i_size = 0;
char ** ppsz_path = path;
char * psz_file;
#ifdef SYS_BEOS
- char * psz_program_path = beos_GetProgramPath();
- int i_programlen = strlen( psz_program_path );
+ char * psz_vlcpath = beos_GetProgramPath();
+ int i_vlclen = strlen( psz_vlcpath );
#endif
DIR * dir;
struct dirent * file;
* access files under the current directory */
if( strncmp( file->d_name, "/", 1 ) )
{
- psz_file = malloc( i_programlen + i_dirlen
+ psz_file = malloc( i_vlclen + i_dirlen
+ i_filelen + 3 );
if( psz_file == NULL )
{
continue;
}
- sprintf( psz_file, "%s/%s/%s", psz_programlen,
+ sprintf( psz_file, "%s/%s/%s", psz_vlcpath,
*ppsz_path, file->d_name );
}
else
* video_parser.c : video parser thread
*****************************************************************************
* 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>
* Samuel Hocevar <sam@via.ecp.fr>
p_vpar->pp_vdec[0]->b_error = 0;
p_vpar->pp_vdec[0]->p_vpar = p_vpar;
-# if VDEC_NICE
+# ifndef SYS_BEOS
+# if VDEC_NICE
/* Re-nice ourself */
if( nice(VDEC_NICE) == -1 )
{
intf_WarnMsg( 2, "vpar warning : couldn't nice() (%s)",
strerror(errno) );
}
+# endif
# endif
#endif