Commit 98725620 authored by Sam Hocevar's avatar Sam Hocevar

  * vlc core compiles under QNX RTOS. Now if anyone feels like tidying
  it and writing output and interface plugins...
parent 0d5aa512
...@@ -58,7 +58,7 @@ PROGRAM_BUILD = `date` $(USER) ...@@ -58,7 +58,7 @@ PROGRAM_BUILD = `date` $(USER)
# DEFINE will contain some of the constants definitions decided in Makefile, # DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler. # including SYS_xx. It will be passed to C compiler.
DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_) DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr '[a-z].' '[A-Z]_')
# On Linux activate 64-bit off_t (by default under BSD) # On Linux activate 64-bit off_t (by default under BSD)
ifneq (,$(findstring linux,$(SYS))) ifneq (,$(findstring linux,$(SYS)))
...@@ -615,10 +615,8 @@ $(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp ...@@ -615,10 +615,8 @@ $(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
$(PLUGIN_KDE): %.o: Makefile.dep $(PLUGIN_KDE): %.o: Makefile.dep
$(PLUGIN_KDE): %.o: .dep/%.dpp $(PLUGIN_KDE): %.o: .dep/%.dpp
$(PLUGIN_KDE): %.o: %.moc $(PLUGIN_KDE): %.o: %.cpp
$(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $(<:%.moc=%.cpp) $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
$(PLUGIN_KDE:%.o=%.moc): %.moc: %.cpp
moc -i $< -o $@
$(PLUGIN_BEOS): %.o: Makefile.dep $(PLUGIN_BEOS): %.o: Makefile.dep
$(PLUGIN_BEOS): %.o: .dep/%.dpp $(PLUGIN_BEOS): %.o: .dep/%.dpp
...@@ -634,9 +632,13 @@ ifeq ($(SYS),beos) ...@@ -634,9 +632,13 @@ ifeq ($(SYS),beos)
$(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
rm -f ./plugins/_APP_ rm -f ./plugins/_APP_
ln -s ../vlc ./plugins/_APP_ ln -s ../vlc ./plugins/_APP_
else
ifeq ($(SYS),nto-qnx)
$(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -export-dynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
else else
$(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
endif endif
endif
# #
# Plugin targets # Plugin targets
...@@ -673,8 +675,13 @@ lib/alsa.so: $(PLUGIN_ALSA) ...@@ -673,8 +675,13 @@ lib/alsa.so: $(PLUGIN_ALSA)
lib/fb.so: $(PLUGIN_FB) lib/fb.so: $(PLUGIN_FB)
$(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ $(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^
ifeq ($(SYS),nto-qnx)
lib/x11.so: $(PLUGIN_X11)
$(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext -lsocket
else
lib/x11.so: $(PLUGIN_X11) lib/x11.so: $(PLUGIN_X11)
$(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext $(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
endif
lib/mga.so: $(PLUGIN_MGA) lib/mga.so: $(PLUGIN_MGA)
$(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext $(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
......
...@@ -3415,7 +3415,7 @@ if test "${enable_mmx+set}" = set; then ...@@ -3415,7 +3415,7 @@ if test "${enable_mmx+set}" = set; then
enableval="$enable_mmx" enableval="$enable_mmx"
if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; 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}${ACCEL_PLUGINS}; fi if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi
fi fi
# Check whether --enable-css or --disable-css was given. # Check whether --enable-css or --disable-css was given.
......
...@@ -128,7 +128,7 @@ AC_ARG_ENABLE(ppro, ...@@ -128,7 +128,7 @@ AC_ARG_ENABLE(ppro,
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}${ACCEL_PLUGINS}; 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 ]) [ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ])
AC_ARG_ENABLE(css, AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)], [ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ]) [ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input.h: structures of the input not exported to other modules * input.h: structures of the input not exported to other modules
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input.h,v 1.34 2001/03/07 00:18:46 henri Exp $ * $Id: input.h,v 1.35 2001/03/19 13:26:59 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -51,8 +51,10 @@ void input_FileClose( struct input_thread_s * ); ...@@ -51,8 +51,10 @@ void input_FileClose( struct input_thread_s * );
/***************************************************************************** /*****************************************************************************
* Prototypes from input.c to open a network socket * Prototypes from input.c to open a network socket
*****************************************************************************/ *****************************************************************************/
#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
void input_NetworkOpen ( struct input_thread_s * ); void input_NetworkOpen ( struct input_thread_s * );
void input_NetworkClose( struct input_thread_s * ); void input_NetworkClose( struct input_thread_s * );
#endif
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ts.c: TS demux and netlist management * input_ts.c: TS demux and netlist management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ts.c,v 1.11 2001/03/18 20:46:16 henri Exp $ * $Id: input_ts.c,v 1.12 2001/03/19 13:26:59 sam Exp $
* *
* Authors: Henri Fallon <henri@videolan.org> * Authors: Henri Fallon <henri@videolan.org>
* *
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
#include <errno.h> #include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef SYS_NTO
#include <sys/select.h>
#endif
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
...@@ -76,12 +79,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list ) ...@@ -76,12 +79,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
#define input p_function_list->functions.input #define input p_function_list->functions.input
p_function_list->pf_probe = TSProbe; p_function_list->pf_probe = TSProbe;
input.pf_init = TSInit; input.pf_init = TSInit;
#ifdef SYS_BEOS #if !defined( SYS_BEOS ) && !defined( SYS_NTO )
input.pf_open = input_FileOpen;
input.pf_close = input_FileClose;
#else
input.pf_open = input_NetworkOpen; input.pf_open = input_NetworkOpen;
input.pf_close = input_NetworkClose; input.pf_close = input_NetworkClose;
#else
input.pf_open = input_FileOpen;
input.pf_close = input_FileClose;
#endif #endif
input.pf_end = TSEnd; input.pf_end = TSEnd;
input.pf_set_area = NULL; input.pf_set_area = NULL;
......
...@@ -139,6 +139,15 @@ aout_thread_t *aout_CreateThread( int *pi_status ) ...@@ -139,6 +139,15 @@ aout_thread_t *aout_CreateThread( int *pi_status )
return( NULL ); return( NULL );
} }
if( p_aout->l_rate == 0 )
{
intf_ErrMsg( "aout error: null sample rate" );
p_aout->pf_close( p_aout );
module_Unneed( p_main->p_bank, p_aout->p_module );
free( p_aout );
return( NULL );
}
p_aout->b_stereo = ( p_aout->i_channels == 2 ) ? 1 : 0; /* FIXME: only works p_aout->b_stereo = ( p_aout->i_channels == 2 ) ? 1 : 0; /* FIXME: only works
for i_channels == 1 or 2 ??*/ for i_channels == 1 or 2 ??*/
......
...@@ -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.93 2001/03/15 01:42:20 sam Exp $ * $Id: input.c,v 1.94 2001/03/19 13:26:59 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/* Network functions */ /* Network functions */
#ifndef SYS_BEOS #if !defined( SYS_BEOS ) && !defined( SYS_NTO )
#include <netdb.h> /* hostent ... */ #include <netdb.h> /* hostent ... */
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
...@@ -514,7 +514,7 @@ void input_FileClose( input_thread_t * p_input ) ...@@ -514,7 +514,7 @@ void input_FileClose( input_thread_t * p_input )
} }
#ifndef SYS_BEOS #if !defined( SYS_BEOS ) && !defined( SYS_NTO )
/***************************************************************************** /*****************************************************************************
* input_NetworkOpen : open a network socket * input_NetworkOpen : open a network socket
*****************************************************************************/ *****************************************************************************/
......
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
#include <signal.h> /* SIGHUP, SIGINT, SIGKILL */ #include <signal.h> /* SIGHUP, SIGINT, SIGKILL */
#include <stdio.h> /* sprintf() */ #include <stdio.h> /* sprintf() */
#include <unistd.h> /* getopt() under QNX */
#ifdef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H
#include <getopt.h> /* getopt() */ #include <getopt.h> /* getopt() */
#endif #endif
#include <unistd.h>
#include <errno.h> /* ENOMEM */ #include <errno.h> /* ENOMEM */
#include <stdlib.h> /* getenv(), strtol(), */ #include <stdlib.h> /* getenv(), strtol(), */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "intf_msg.h" #include "intf_msg.h"
#ifndef SYS_BEOS /* I need help for the BeOS portage */ #if !defined( SYS_BEOS ) && !defined( SYS_NTO )
#include "netutils.h" #include "netutils.h"
......
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