Commit 619061c2 authored by Sam Hocevar's avatar Sam Hocevar

 [ include/config.h.in has changed, don't forget tu run ./configure ]

 . 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.
parent 1cd850a8
......@@ -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)
......
......@@ -224,9 +224,6 @@
/* 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"
......@@ -281,12 +278,12 @@
/* 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"
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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 );
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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
{
......
......@@ -38,7 +38,6 @@
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "plugins.h"
#include "video.h"
#include "video_output.h"
......
......@@ -36,7 +36,6 @@
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "plugins.h"
#include "video.h"
#include "video_output.h"
......
......@@ -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 );
}
......
......@@ -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
{
......
......@@ -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;
}
......
......@@ -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");
}
/*****************************************************************************
......
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