]> git.sesse.net Git - vlc/commitdiff
[ include/config.h.in has changed, don't forget tu run ./configure ]
authorSam Hocevar <sam@videolan.org>
Tue, 16 Jan 2001 05:04:25 +0000 (05:04 +0000)
committerSam Hocevar <sam@videolan.org>
Tue, 16 Jan 2001 05:04:25 +0000 (05:04 +0000)
 . fixed the --aout, --idct and --yuv flags
 . updated manpage and --(long)help output to reflect that change
 . removed a few unneeded #includes here and there
 . cosmetic changes in error messages in input.c

   Currently available flags are now :

     --aout dummy
            esd
            dsp
            alsa

     --idct idct
            idctclassic
            idctmmx

     --yuv yuv
           yuvmmx

  --vout works like before, but still uses the old plugin system for now.

15 files changed:
debian/vlc.1
include/config.h.in
plugins/alsa/aout_alsa.c
plugins/dsp/aout_dsp.c
plugins/dummy/aout_dummy.c
plugins/esd/aout_esd.c
plugins/idct/idct.c
plugins/idct/idctclassic.c
plugins/idct/idctmmx.c
plugins/yuv/transforms_yuv.c
plugins/yuv/transforms_yuvmmx.c
plugins/yuv/video_yuv.c
plugins/yuv/video_yuvmmx.c
src/input/input.c
src/interface/main.c

index 0667cf017e48fa40347c8227801dc30e0aa6d665..b1aa9120413da727145b7b5fabb76cbfc9ce4476 100644 (file)
@@ -19,7 +19,7 @@
 vlc, fbvlc, gvlc \- The VideoLAN Client
 .SH SYNOPSIS
 .B vlc
-.RI [ OPTIONS ] 
+.RI [ OPTIONS ]
 .RI [ PARAMETERS ]
 .RI [ FILE ]...
 .SH DESCRIPTION
@@ -35,8 +35,8 @@ A summary of options is included below.
 .B \-\-noaudio
 Disable audio output.
 .TP
-.B \-\-aout <plugin>
-Specify an audio output plugin: "dsp", "esd", for instance.
+.B \-\-aout <module>
+Specify an audio output module: "dsp", "esd", for instance.
 .TP
 .B \-\-stereo, \-\-mono
 Choose stereo or mono audio output
@@ -44,11 +44,14 @@ Choose stereo or mono audio output
 .B \-\-novideo
 Disable video output.
 .TP
-.B \-\-vout <plugin>
-Specify a video output plugin: "gnome", "fb", "glide", for instance.
+.B \-\-vout <module>
+Specify a video output module: "gnome", "fb", "glide", for instance.
 .TP
-.B \-\-yuv <plugin>
-Specify a YUV plugin: "mmx", "nommx", for instance.
+.B \-\-idct <module>
+Specify a module for IDCT: "idct", "idctmmx", for instance.
+.TP
+.B \-\-yuv <module>
+Specify a YUV module: "yuv", "yuvmmx", for instance.
 .TP
 .B \-\-display <display>
 Specify the display name.
@@ -62,6 +65,24 @@ Grayscale output.
 .B \-\-color
 Color output.
 .TP
+.B \-\-synchro <type>
+Choose a fixed synchro value instead of the internal auto-adaptative
+heuristics based on CPU usage.
+
+`I' displays only I images, `IP' displays I and P images, `IP+'
+displays I and P images and every second B image, and `IPB' forces
+displaying of all images.
+
+Note that the vlc is certainly going to crash if you ask it to
+display more images than your CPU can cope with.
+.TP
+.B \-\-dvd
+Activate DVD mode, by directly accessing the DVD drive (no need to mount
+it). By default,
+.B vlc
+opens /dev/dvd, but this behaviour may be overridden by the vlc_dvd_device
+environment variable (see below).
+.TP
 .B \-a, \-\-dvdaudio [ ac3 | lpcm | mpeg | off ]
 Choose the audio channel type. Most DVDs have AC3 audio channels, but
 you can also have Linear PCM or MPEG layer 2 sound. Also, one might decide
@@ -81,17 +102,6 @@ Disable VLANs support.
 .B \-\-server <host>, \-\-port <port>
 Choose the video server address and port.
 .TP
-.B \-\-synchro <type>
-Choose a fixed synchro value instead of the internal auto-adaptative
-heuristics based on CPU usage.
-
-`I' displays only I images, `IP' displays I and P images, `IP+'
-displays I and P images and every second B image, and `IPB' forces
-displaying of all images.
-
-Note that the vlc is certainly going to crash if you ask it to
-display more images than your CPU can cope with.
-.TP
 .B \-h, \-\-help
 Print help and exit.
 .TP
@@ -107,6 +117,7 @@ also accepts a lot of parameters to customize its behaviour.
 .B Interface parameters:
  vlc_init=<filename>      initialization script
  vlc_channels=<filename>  channels list
+ warning_level=<level>    warning level
 .TP
 .B Audio parameters:
  vlc_aout=<method name>   audio method
@@ -115,14 +126,18 @@ also accepts a lot of parameters to customize its behaviour.
  vlc_audio_rate=<rate>    output rate
 .TP
 .B Video parameters:
- vlc_vout=<method name>   display method
- vlc_display=<display>    display used
- vlc_width=<width>        display width
- vlc_height=<height>      dislay height
- vlc_fb_dev=<filename>    framebuffer device path
- vlc_grayscale={1|0}      grayscale or color output
+ vlc_vout=<method name>        display method
+ vlc_display=<display>         display used
+ vlc_width=<width>             display width
+ vlc_height=<height>           dislay height
+ vlc_fb_dev=<filename>         framebuffer device
+ vlc_grayscale={1|0}           grayscale or color
+ vlc_idct=<method name>        IDCT method
+ vlc_yuv=<method name>         YUV method
+ vlc_synchro={I|I+|IP|IP+|IPB} synchro algorithm
 .TP
 .B DVD parameters:
+ vlc_dvd_device=<device>           DVD device
  vlc_dvd_audio={ac3|lpcm|mpeg|off} audio type
  vlc_dvd_channel=[0-15]            audio channel
  vlc_dvd_subtitle=[0-31]           subtitle channel
@@ -130,12 +145,10 @@ also accepts a lot of parameters to customize its behaviour.
 .B Input parameters:
  vlc_server=<hostname>    video server
  vlc_server_port=<port>   video server port
+ vlc_broadcast={1|0}      broadcast mode
  vlc_iface=<interface>    network interface
  vlc_vlan_server=<host>   vlan server
  vlc_vlan_port=<port>     vlan server port
-.TP
-.B Synchro parameters:
- vlc_synchro=<type>       synchro algorithm
 
 .SH SEE ALSO
 .BR vls (1), vlms (1)
index 4bed8ecc279ec063e3959e1092072456c976a569..07e2c5bec017d3644312ada14716d769cf501be1 100644 (file)
 /* Environment variable containing the audio output method */
 #define AOUT_METHOD_VAR                 "vlc_aout"
 
-/* The fallback method */
-#define AOUT_DEFAULT_METHOD             "dsp"
-
 /* Environment variable used to store dsp device name, and default value */
 #define AOUT_DSP_VAR                    "vlc_dsp"
 #define AOUT_DSP_DEFAULT                "/dev/dsp"
 /* Environment variable containing the display method */
 #define VOUT_METHOD_VAR                 "vlc_vout"
 
+/* Environment variable containing the IDCT method */
+#define IDCT_METHOD_VAR                 "vlc_idct"
+
 /* Environment variable containing the YUV method */
 #define YUV_METHOD_VAR                  "vlc_yuv"
 
-/* The fallback method */
-#define VOUT_DEFAULT_METHOD             "x11"
-
 /* Environment variable used in place of DISPLAY if available */
 #define VOUT_DISPLAY_VAR                "vlc_display"
 
index 895995855bc7915ed36a37d13ffa272341d1e2a8..1d28bee8695993b2219351e640bdefc465ad6d02 100644 (file)
@@ -41,6 +41,7 @@
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
+#include "tests.h"
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
@@ -127,9 +128,7 @@ static int aout_Probe( probedata_t *p_data )
         return ( 0 );
     }
 
-    /* Otherwise, we may think it'll work */ 
-
-    /* Close */
+    /* Close it */
     i_close_return = snd_pcm_close ( local_sys.p_alsa_handle );
     
     if( i_close_return )
@@ -137,8 +136,14 @@ static int aout_Probe( probedata_t *p_data )
         intf_ErrMsg( "Error closing alsa device in aout_probe; exit=%i",
                      i_close_return );
         intf_ErrMsg( "This means : %s",snd_strerror( i_close_return ) );
+        return( 0 );
     }
     
+    if( TestMethod( AOUT_METHOD_VAR, "alsa" ) )
+    {
+        return( 999 );
+    }
+
     /* And return score */
     return( 100 );
 }    
index a7421f22c08312fa8cc93c4f51706aa191f5e861..0283d80fbcb1d04cac922125fede4d8649267db5 100644 (file)
@@ -54,7 +54,7 @@
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
-#include "plugins.h"
+#include "tests.h"
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
@@ -120,6 +120,12 @@ static int aout_Probe( probedata_t *p_data )
 
     /* Otherwise, there are good chances we can use this plugin, return 100. */
     close( i_fd );
+
+    if( TestMethod( AOUT_METHOD_VAR, "dsp" ) )
+    {
+        return( 999 );
+    }
+
     return( 100 );
 }
 
index 666ebc1ebe9e1e1f401e041d9044a524098d18a4..1e7ae3ff8d84ab60da3784977f14f432f246a777 100644 (file)
@@ -29,7 +29,7 @@
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
-#include "plugins.h"
+#include "tests.h"
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
@@ -78,6 +78,11 @@ void aout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int aout_Probe( probedata_t *p_data )
 {
+    if( TestMethod( AOUT_METHOD_VAR, "dummy" ) )
+    {
+        return( 999 );
+    }
+
     /* The dummy plugin always works but give it the lower possible score */
     return( 1 );
 }
index ea35b162acc776b92bc53196bb6ffe5989ddb6cf..1387645d88b632f423c56274bae986a7ee9f282a 100644 (file)
@@ -44,7 +44,7 @@
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
-#include "plugins.h"
+#include "tests.h"
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
@@ -98,6 +98,11 @@ void aout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int aout_Probe( probedata_t *p_data )
 {
+    if( TestMethod( AOUT_METHOD_VAR, "esd" ) )
+    {
+        return( 999 );
+    }
+
     /* We don't have to test anything -- if we managed to open this plugin,
      * it means we have the appropriate libs. */
     return( 50 );
index 8e40b1a04136c893761ebcd5736d96a9436bfcf8..b6927cedb250bf7f346fa94ea816675254b375c4 100644 (file)
@@ -2,7 +2,7 @@
  * idct.c : IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct.c,v 1.3 2001/01/16 02:16:38 sam Exp $
+ * $Id: idct.c,v 1.4 2001/01/16 05:04:25 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -34,6 +34,7 @@
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
+#include "tests.h"
 
 #include "video.h"
 #include "video_output.h"
@@ -142,6 +143,11 @@ static void idct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
+    if( TestMethod( IDCT_METHOD_VAR, "idct" ) )
+    {
+        return( 999 );
+    }
+
     /* This plugin always works */
     return( 50 );
 }
index ef148665c160112f21f2749052209c5110ad42c7..1c6928a2c010a53f174c0e1155893d2f42aa3c23 100644 (file)
@@ -2,7 +2,7 @@
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.3 2001/01/16 02:16:38 sam Exp $
+ * $Id: idctclassic.c,v 1.4 2001/01/16 05:04:25 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -34,6 +34,7 @@
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
+#include "tests.h"
 
 #include "video.h"
 #include "video_output.h"
@@ -142,6 +143,11 @@ static void idct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
+    if( TestMethod( IDCT_METHOD_VAR, "idctclassic" ) )
+    {
+        return( 999 );
+    }
+
     /* This plugin always works */
     return( 100 );
 }
index 15540e6bbe6c6b939cfab7b7bb6a3ad0152deb23..f120e2281bf684f922f9fc28f7ed1ddf9e8c0155 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmx.c : MMX IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctmmx.c,v 1.3 2001/01/16 02:16:38 sam Exp $
+ * $Id: idctmmx.c,v 1.4 2001/01/16 05:04:25 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -145,7 +145,14 @@ static int idct_Probe( probedata_t *p_data )
 {
     if( TestCPU() & CPU_CAPABILITY_MMX )
     {
-        return( 100 );
+        if( TestMethod( IDCT_METHOD_VAR, "idctmmx" ) )
+        {
+            return( 999 );
+        }
+       else
+        {
+            return( 100 );
+       }
     }
     else
     {
index eabdeb4c8a7391d73b7b89d46163e91c0fc28779..34524c8e7d039417ee181fc975b7186822d6c5eb 100644 (file)
@@ -38,7 +38,6 @@
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
-#include "plugins.h"
 
 #include "video.h"
 #include "video_output.h"
index 1e8dbb987da248b735c72b2ee00d690a3a84204d..0ea57c2bab4a2fc1e9ab57e8ee62ee9585821cc3 100644 (file)
@@ -36,7 +36,6 @@
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
-#include "plugins.h"
 
 #include "video.h"
 #include "video_output.h"
index 0d60637b8d2a3f45140c2636f66454707a49fbb7..64e2f3718ee94a46ef6d5132f6a3887bff2537c1 100644 (file)
@@ -38,6 +38,7 @@
 #include "common.h"
 #include "threads.h"
 #include "mtime.h"
+#include "tests.h"
 #include "modules.h"
 
 #include "video.h"
@@ -75,6 +76,11 @@ void yuv_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int yuv_Probe( probedata_t *p_data )
 {
+    if( TestMethod( YUV_METHOD_VAR, "yuv" ) )
+    {
+        return( 999 );
+    }
+
     /* This module always works */
     return( 100 );
 }
index 4f795862b1f0ac766aec7b76dc9b30c2c108e5e9..2d72f51dcdd8f036a5c5fa35412624236ad98da5 100644 (file)
@@ -77,7 +77,14 @@ static int yuv_Probe( probedata_t *p_data )
     /* Test for MMX support in the CPU */
     if( TestCPU() & CPU_CAPABILITY_MMX )
     {
-        return( 100 );
+        if( TestMethod( YUV_METHOD_VAR, "yuvmmx" ) )
+        {
+            return( 999 );
+        }
+        else
+        {
+            return( 100 );
+        }
     }
     else
     {
index 89f97f0883aec8eedd0649087a6efc2af4a84405..f2ceb33ae8501ffd1d682c5f45c0582cfbcdd5fa 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.70 2001/01/16 04:41:20 stef Exp $
+ * $Id: input.c,v 1.71 2001/01/16 05:04:25 sam Exp $
  *
  * Authors: 
  *
@@ -363,7 +363,7 @@ static void FileOpen( input_thread_t * p_input )
 
     if( stat( p_config->p_source, &stat_info ) == (-1) )
     {
-        intf_ErrMsg( "input error: cannot stat() file %s (%s)",
+        intf_ErrMsg( "input error: cannot stat() file `%s' (%s)",
                      p_config->p_source, strerror(errno));
         p_input->b_error = 1;
         return;
@@ -388,7 +388,7 @@ static void FileOpen( input_thread_t * p_input )
     else
     {
         vlc_mutex_unlock( &p_input->stream.stream_lock );
-        intf_ErrMsg( "input error: unknown file type for %s",
+        intf_ErrMsg( "input error: unknown file type for `%s'",
                      p_config->p_source );
         p_input->b_error = 1;
         return;
@@ -401,7 +401,7 @@ static void FileOpen( input_thread_t * p_input )
     if( (p_input->i_handle = open( p_config->p_source,
                                    /*O_NONBLOCK | O_LARGEFILE*/0 )) == (-1) )
     {
-        intf_ErrMsg( "input error: cannot open file %s", strerror(errno) );
+        intf_ErrMsg( "input error: cannot open file (%s)", strerror(errno) );
         p_input->b_error = 1;
         return;
     }
@@ -418,7 +418,7 @@ static void DvdOpen( input_thread_t * p_input )
     if( (p_input->i_handle = open( p_input->p_config->p_source,
                                    O_RDONLY|O_LARGEFILE )) == (-1) )
     {
-        intf_ErrMsg( "input error: cannot open device %s", strerror(errno) );
+        intf_ErrMsg( "input error: cannot open device (%s)", strerror(errno) );
         p_input->b_error = 1;
         return;
     }
index d15b7da488668a3bb01be349442e0f00db32f69e..adec47184e588b34ca7babce7c7e9be0d26d21bd 100644 (file)
@@ -79,7 +79,8 @@
 #define OPT_WIDTH               163
 #define OPT_HEIGHT              164
 #define OPT_COLOR               165
-#define OPT_YUV                 166
+#define OPT_IDCT                166
+#define OPT_YUV                 167
 
 #define OPT_VLANS               170
 #define OPT_SERVER              171
@@ -121,6 +122,7 @@ static const struct option longopts[] =
     {   "height",           1,          0,      OPT_HEIGHT },
     {   "grayscale",        0,          0,      'g' },
     {   "color",            0,          0,      OPT_COLOR },
+    {   "idct",             1,          0,      OPT_IDCT },
     {   "yuv",              1,          0,      OPT_YUV },
 
     /* DVD options */
@@ -556,6 +558,9 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
         case OPT_COLOR:                                           /* --color */
             main_PutIntVariable( VOUT_GRAYSCALE_VAR, 0 );
             break;
+       case OPT_IDCT:                                             /* --idct */
+            main_PutPszVariable( IDCT_METHOD_VAR, optarg );
+            break;
         case OPT_YUV:                                               /* --yuv */
             main_PutPszVariable( YUV_METHOD_VAR, optarg );
             break;
@@ -645,16 +650,20 @@ static void Usage( int i_fashion )
     /* Options */
     intf_Msg( "\nOptions:"
               "\n      --noaudio                  \tdisable audio"
-              "\n      --aout <plugin>            \taudio output method"
+              "\n      --aout <module>            \taudio output method"
               "\n      --stereo, --mono           \tstereo/mono audio"
               "\n"
               "\n      --novideo                  \tdisable video"
-              "\n      --vout <plugin>            \tvideo output method"
+              "\n      --vout <module>            \tvideo output method"
               "\n      --display <display>        \tdisplay string"
               "\n      --width <w>, --height <h>  \tdisplay dimensions"
               "\n  -g, --grayscale                \tgrayscale output"
               "\n      --color                    \tcolor output"
+              "\n      --idct <module>            \tIDCT method"
+              "\n      --yuv <module>             \tYUV method"
+              "\n      --synchro <type>           \tforce synchro algorithm"
               "\n"
+              "\n      --dvd                      \tDVD mode"
               "\n  -a, --dvdaudio <type>          \tchoose DVD audio type"
               "\n  -c, --dvdchannel <channel>     \tchoose DVD audio channel"
               "\n  -s, --dvdsubtitle <channel>    \tchoose DVD subtitle channel"
@@ -663,9 +672,6 @@ static void Usage( int i_fashion )
               "\n      --server <host>            \tvideo server address"
               "\n      --port <port>              \tvideo server port"
               "\n      --broadcast                \tlisten to a broadcast"
-              "\n      --dvd                      \tread dvd"
-              "\n"
-              "\n      --synchro <type>           \tforce synchro algorithm"
               "\n"
               "\n      --warning <level>          \tdisplay warning messages"
               "\n"
@@ -696,10 +702,14 @@ static void Usage( int i_fashion )
               "\n  " VOUT_WIDTH_VAR "=<width>               \tdisplay width"
               "\n  " VOUT_HEIGHT_VAR "=<height>             \tdislay height"
               "\n  " VOUT_FB_DEV_VAR "=<filename>           \tframebuffer device path"
-              "\n  " VOUT_GRAYSCALE_VAR "={1|0}             \tgrayscale or color output" );
+              "\n  " VOUT_GRAYSCALE_VAR "={1|0}             \tgrayscale or color output"
+              "\n  " IDCT_METHOD_VAR "=<method name>        \tIDCT method"
+              "\n  " YUV_METHOD_VAR "=<method name>         \tYUV method"
+              "\n  " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB}   \tsynchro algorithm" );
 
     /* DVD parameters */
     intf_Msg( "\nDVD parameters:"
+              "\n  " INPUT_DVD_DEVICE_VAR "=<device>           \tDVD device"
               "\n  " INPUT_DVD_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
               "\n  " INPUT_DVD_CHANNEL_VAR "=[0-15]            \taudio channel"
               "\n  " INPUT_DVD_SUBTITLE_VAR "=[0-31]           \tsubtitle channel" );
@@ -712,12 +722,8 @@ static void Usage( int i_fashion )
               "\n  " INPUT_BROADCAST_VAR "={1|0}            \tbroadcast mode"
               "\n  " INPUT_VLAN_SERVER_VAR "=<hostname>     \tvlan server"
               "\n  " INPUT_VLAN_PORT_VAR "=<port>           \tvlan server port"
-              "\n  " INPUT_DVD_DEVICE_VAR "=<device>        \tDVD device"
  );
 
-    /* Synchro parameters */
-    intf_Msg( "\nSynchro parameters:"
-              "\n  " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB}   \tsynchro algorithm");
 }
 
 /*****************************************************************************