]> git.sesse.net Git - vlc/commitdiff
* vlc core compiles under QNX RTOS. Now if anyone feels like tidying
authorSam Hocevar <sam@videolan.org>
Mon, 19 Mar 2001 13:26:59 +0000 (13:26 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 19 Mar 2001 13:26:59 +0000 (13:26 +0000)
  it and writing output and interface plugins...

Makefile.in
configure
configure.in
include/input.h
plugins/mpeg/input_ts.c
src/audio_output/audio_output.c
src/input/input.c
src/interface/main.c
src/misc/netutils.c

index 2e7848c9c0bb7ff477bbbf93ba078bc6aefc1873..ebd22f22344d675859b1fad29977248626b7d3da 100644 (file)
@@ -58,7 +58,7 @@ PROGRAM_BUILD = `date` $(USER)
 
 # DEFINE will contain some of the constants definitions decided in Makefile, 
 # 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)
 ifneq (,$(findstring linux,$(SYS)))
@@ -615,10 +615,8 @@ $(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
 
 $(PLUGIN_KDE): %.o: Makefile.dep
 $(PLUGIN_KDE): %.o: .dep/%.dpp
-$(PLUGIN_KDE): %.o: %.moc
-       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $(<:%.moc=%.cpp)
-$(PLUGIN_KDE:%.o=%.moc): %.moc: %.cpp
-       moc -i $< -o $@
+$(PLUGIN_KDE): %.o: %.cpp
+       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
 
 $(PLUGIN_BEOS): %.o: Makefile.dep
 $(PLUGIN_BEOS): %.o: .dep/%.dpp
@@ -634,9 +632,13 @@ ifeq ($(SYS),beos)
        $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
        rm -f ./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
        $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) 
 endif
+endif
 
 #
 # Plugin targets
@@ -673,8 +675,13 @@ lib/alsa.so: $(PLUGIN_ALSA)
 lib/fb.so: $(PLUGIN_FB)
        $(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)
        $(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
+endif
 
 lib/mga.so: $(PLUGIN_MGA)
        $(CC) $(PCFLAGS) $(PLCFLAGS) -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
index f8df96e61dd738a63ab04630e0690fcc5ebdb1f0..dfb5ca37f2af1421bdeaf9e846ed03fc180e2c06 100755 (executable)
--- a/configure
+++ b/configure
@@ -3415,7 +3415,7 @@ if test "${enable_mmx+set}" = set; then
   enableval="$enable_mmx"
    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}${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
 
 # Check whether --enable-css or --disable-css was given.
index 3e8ace883c7cbe33277f2d4b7970a33e4ff1928a..531b170d09f892255f91cf35bf32884536216837 100644 (file)
@@ -128,7 +128,7 @@ AC_ARG_ENABLE(ppro,
 AC_ARG_ENABLE(mmx,
 [  --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${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,
 [  --disable-css           Disable DVD CSS decryption (default enabled)],
 [ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
index bf0b37bee34977546dbc264a746ccbf0248ab07d..6696899230598b5b226077fdc4b84d7b678127fc 100644 (file)
@@ -2,7 +2,7 @@
  * input.h: structures of the input not exported to other modules
  *****************************************************************************
  * 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>
  *
@@ -51,8 +51,10 @@ void input_FileClose( struct input_thread_s * );
 /*****************************************************************************
  * 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_NetworkClose( struct input_thread_s * );
+#endif
 
 
 /*****************************************************************************
index 3194d45a5b27e72dc5a07e04e1d96363fc18a9ef..776ef8bc60150cfe5658644fb3d1ba6a5ad5ba03 100644 (file)
@@ -2,7 +2,7 @@
  * input_ts.c: TS demux and netlist management
  *****************************************************************************
  * 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>
  *
@@ -34,6 +34,9 @@
 #include <errno.h>
 
 #include <sys/types.h>
+#ifdef SYS_NTO
+#include <sys/select.h>
+#endif
 #include <sys/uio.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -76,12 +79,12 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 #define input p_function_list->functions.input
     p_function_list->pf_probe = TSProbe;
     input.pf_init             = TSInit;
-#ifdef SYS_BEOS
-    input.pf_open             = input_FileOpen;
-    input.pf_close            = input_FileClose;
-#else
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
     input.pf_open             = input_NetworkOpen;
     input.pf_close            = input_NetworkClose;
+#else
+    input.pf_open             = input_FileOpen;
+    input.pf_close            = input_FileClose;
 #endif
     input.pf_end              = TSEnd;
     input.pf_set_area         = NULL;
index 219eeb125924acf5e5db35d27005a6d2ee2ea2a8..f7513eb022dcceb030a0dfe826031049e2b75a73 100644 (file)
@@ -139,6 +139,15 @@ aout_thread_t *aout_CreateThread( int *pi_status )
         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
                                                    for i_channels == 1 or 2 ??*/
 
index 802b19c2454b0da759e0bd68aa212eba1aa2bcd8..de724b8523f45bbd9f7d4fff31abc72ced021dc1 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * 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>
  *
@@ -38,7 +38,7 @@
 
 /* Network functions */
 
-#ifndef SYS_BEOS
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
 #include <netdb.h>                                             /* hostent ... */
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -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 
  *****************************************************************************/
index 0a16e12ef81a7cf4bdd19c1d015fb0d95f73a12d..8ff8144bbaea01f63eb018e5f90a7f14fa1a32c8 100644 (file)
 
 #include <signal.h>                               /* SIGHUP, SIGINT, SIGKILL */
 #include <stdio.h>                                              /* sprintf() */
-#include <unistd.h>                                    /* getopt() under QNX */
 
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>                                              /* getopt() */
 #endif
 
+#include <unistd.h>
 #include <errno.h>                                                 /* ENOMEM */
 #include <stdlib.h>                                  /* getenv(), strtol(),  */
 #include <string.h>                                            /* strerror() */
index 4889bdbdfbdc2253d537ce644ddf9bf0a94e13e0..afcb83255b0f07f8b29b246a0f256813b1f2c8ba 100644 (file)
@@ -54,7 +54,7 @@
 
 #include "intf_msg.h"
 
-#ifndef SYS_BEOS /* I need help for the BeOS portage */
+#if !defined( SYS_BEOS ) && !defined( SYS_NTO )
 
 #include "netutils.h"