From: Sam Hocevar Date: Tue, 16 Jan 2001 05:04:25 +0000 (+0000) Subject: [ include/config.h.in has changed, don't forget tu run ./configure ] X-Git-Tag: 0.2.70~217 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=619061c25c60daeb693bcbfd3ac80c91e8572107;p=vlc [ 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. --- diff --git a/debian/vlc.1 b/debian/vlc.1 index 0667cf017e..b1aa912041 100644 --- a/debian/vlc.1 +++ b/debian/vlc.1 @@ -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 -Specify an audio output plugin: "dsp", "esd", for instance. +.B \-\-aout +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 -Specify a video output plugin: "gnome", "fb", "glide", for instance. +.B \-\-vout +Specify a video output module: "gnome", "fb", "glide", for instance. .TP -.B \-\-yuv -Specify a YUV plugin: "mmx", "nommx", for instance. +.B \-\-idct +Specify a module for IDCT: "idct", "idctmmx", for instance. +.TP +.B \-\-yuv +Specify a YUV module: "yuv", "yuvmmx", for instance. .TP .B \-\-display Specify the display name. @@ -62,6 +65,24 @@ Grayscale output. .B \-\-color Color output. .TP +.B \-\-synchro +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 , \-\-port Choose the video server address and port. .TP -.B \-\-synchro -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= initialization script vlc_channels= channels list + warning_level= warning level .TP .B Audio parameters: vlc_aout= audio method @@ -115,14 +126,18 @@ also accepts a lot of parameters to customize its behaviour. vlc_audio_rate= output rate .TP .B Video parameters: - vlc_vout= display method - vlc_display= display used - vlc_width= display width - vlc_height= dislay height - vlc_fb_dev= framebuffer device path - vlc_grayscale={1|0} grayscale or color output + vlc_vout= display method + vlc_display= display used + vlc_width= display width + vlc_height= dislay height + vlc_fb_dev= framebuffer device + vlc_grayscale={1|0} grayscale or color + vlc_idct= IDCT method + vlc_yuv= YUV method + vlc_synchro={I|I+|IP|IP+|IPB} synchro algorithm .TP .B DVD parameters: + vlc_dvd_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= video server vlc_server_port= video server port + vlc_broadcast={1|0} broadcast mode vlc_iface= network interface vlc_vlan_server= vlan server vlc_vlan_port= vlan server port -.TP -.B Synchro parameters: - vlc_synchro= synchro algorithm .SH SEE ALSO .BR vls (1), vlms (1) diff --git a/include/config.h.in b/include/config.h.in index 4bed8ecc27..07e2c5bec0 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -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" diff --git a/plugins/alsa/aout_alsa.c b/plugins/alsa/aout_alsa.c index 895995855b..1d28bee869 100644 --- a/plugins/alsa/aout_alsa.c +++ b/plugins/alsa/aout_alsa.c @@ -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 ); } diff --git a/plugins/dsp/aout_dsp.c b/plugins/dsp/aout_dsp.c index a7421f22c0..0283d80fbc 100644 --- a/plugins/dsp/aout_dsp.c +++ b/plugins/dsp/aout_dsp.c @@ -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 ); } diff --git a/plugins/dummy/aout_dummy.c b/plugins/dummy/aout_dummy.c index 666ebc1ebe..1e7ae3ff8d 100644 --- a/plugins/dummy/aout_dummy.c +++ b/plugins/dummy/aout_dummy.c @@ -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 ); } diff --git a/plugins/esd/aout_esd.c b/plugins/esd/aout_esd.c index ea35b162ac..1387645d88 100644 --- a/plugins/esd/aout_esd.c +++ b/plugins/esd/aout_esd.c @@ -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 ); diff --git a/plugins/idct/idct.c b/plugins/idct/idct.c index 8e40b1a041..b6927cedb2 100644 --- a/plugins/idct/idct.c +++ b/plugins/idct/idct.c @@ -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 * @@ -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 ); } diff --git a/plugins/idct/idctclassic.c b/plugins/idct/idctclassic.c index ef148665c1..1c6928a2c0 100644 --- a/plugins/idct/idctclassic.c +++ b/plugins/idct/idctclassic.c @@ -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 * @@ -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 ); } diff --git a/plugins/idct/idctmmx.c b/plugins/idct/idctmmx.c index 15540e6bbe..f120e2281b 100644 --- a/plugins/idct/idctmmx.c +++ b/plugins/idct/idctmmx.c @@ -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 * @@ -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 { diff --git a/plugins/yuv/transforms_yuv.c b/plugins/yuv/transforms_yuv.c index eabdeb4c8a..34524c8e7d 100644 --- a/plugins/yuv/transforms_yuv.c +++ b/plugins/yuv/transforms_yuv.c @@ -38,7 +38,6 @@ #include "common.h" #include "threads.h" #include "mtime.h" -#include "plugins.h" #include "video.h" #include "video_output.h" diff --git a/plugins/yuv/transforms_yuvmmx.c b/plugins/yuv/transforms_yuvmmx.c index 1e8dbb987d..0ea57c2bab 100644 --- a/plugins/yuv/transforms_yuvmmx.c +++ b/plugins/yuv/transforms_yuvmmx.c @@ -36,7 +36,6 @@ #include "common.h" #include "threads.h" #include "mtime.h" -#include "plugins.h" #include "video.h" #include "video_output.h" diff --git a/plugins/yuv/video_yuv.c b/plugins/yuv/video_yuv.c index 0d60637b8d..64e2f3718e 100644 --- a/plugins/yuv/video_yuv.c +++ b/plugins/yuv/video_yuv.c @@ -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 ); } diff --git a/plugins/yuv/video_yuvmmx.c b/plugins/yuv/video_yuvmmx.c index 4f795862b1..2d72f51dcd 100644 --- a/plugins/yuv/video_yuvmmx.c +++ b/plugins/yuv/video_yuvmmx.c @@ -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 { diff --git a/src/input/input.c b/src/input/input.c index 89f97f0883..f2ceb33ae8 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -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; } diff --git a/src/interface/main.c b/src/interface/main.c index d15b7da488..adec47184e 100644 --- a/src/interface/main.c +++ b/src/interface/main.c @@ -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 \taudio output method" + "\n --aout \taudio output method" "\n --stereo, --mono \tstereo/mono audio" "\n" "\n --novideo \tdisable video" - "\n --vout \tvideo output method" + "\n --vout \tvideo output method" "\n --display \tdisplay string" "\n --width , --height \tdisplay dimensions" "\n -g, --grayscale \tgrayscale output" "\n --color \tcolor output" + "\n --idct \tIDCT method" + "\n --yuv \tYUV method" + "\n --synchro \tforce synchro algorithm" "\n" + "\n --dvd \tDVD mode" "\n -a, --dvdaudio \tchoose DVD audio type" "\n -c, --dvdchannel \tchoose DVD audio channel" "\n -s, --dvdsubtitle \tchoose DVD subtitle channel" @@ -663,9 +672,6 @@ static void Usage( int i_fashion ) "\n --server \tvideo server address" "\n --port \tvideo server port" "\n --broadcast \tlisten to a broadcast" - "\n --dvd \tread dvd" - "\n" - "\n --synchro \tforce synchro algorithm" "\n" "\n --warning \tdisplay warning messages" "\n" @@ -696,10 +702,14 @@ static void Usage( int i_fashion ) "\n " VOUT_WIDTH_VAR "= \tdisplay width" "\n " VOUT_HEIGHT_VAR "= \tdislay height" "\n " VOUT_FB_DEV_VAR "= \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 "= \tIDCT method" + "\n " YUV_METHOD_VAR "= \tYUV method" + "\n " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB} \tsynchro algorithm" ); /* DVD parameters */ intf_Msg( "\nDVD parameters:" + "\n " INPUT_DVD_DEVICE_VAR "= \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 "= \tvlan server" "\n " INPUT_VLAN_PORT_VAR "= \tvlan server port" - "\n " INPUT_DVD_DEVICE_VAR "= \tDVD device" ); - /* Synchro parameters */ - intf_Msg( "\nSynchro parameters:" - "\n " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB} \tsynchro algorithm"); } /*****************************************************************************