#include "mtime.h"
#include "plugins.h"
#include "input_vlan.h"
+#include "input_ps.h"
#include "intf_msg.h"
#include "interface.h"
{ "grayscale", 0, 0, 'g' },
{ "color", 0, 0, OPT_COLOR },
+ /* DVD options */
+ { "dvdaudio", 1, 0, 'a' },
+ { "dvdchannel", 1, 0, 'c' },
+ { "dvdsubtitle", 1, 0, 's' },
+
/* Input options */
{ "novlans", 0, 0, OPT_NOVLANS },
{ "server", 1, 0, OPT_SERVER },
};
/* Short options */
-static const char *psz_shortopts = "hHvg";
+static const char *psz_shortopts = "hHvga:s:c:";
/*****************************************************************************
* Global variable program_data - this is the one and only, see main.h
static void InitSignalHandler ( void );
static void SignalHandler ( int i_signal );
+#ifdef HAVE_MMX
static int TestMMX ( void );
+#endif
/*****************************************************************************
* main: parse command line, start interface and spawn threads
int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
{
main_t main_data; /* root of all data - see main.h */
+ char **p_playlist;
+ int i_list_index;
+
p_main = &main_data; /* set up the global variable */
/*
intf_MsgDestroy();
return( errno );
}
+
+ /* get command line files */
+ i_list_index = 0;
+
+ if( optind < i_argc )
+ {
+ int i_index = 0;
+ p_playlist = malloc( (i_list_index = i_argc - optind)
+ * sizeof(int) );
+
+ while( i_argc - i_index > optind )
+ {
+ p_playlist[ i_index ] = ppsz_argv[ i_argc - i_index - 1];
+ i_index++;
+ }
+ }
+ else
+ {
+ p_playlist = NULL;
+ }
+
intf_MsgImm( COPYRIGHT_MESSAGE "\n" ); /* print welcome message */
/*
main_data.p_intf = intf_Create();
if( main_data.p_intf != NULL )
{
+ main_data.p_intf->p_playlist = p_playlist;
+ main_data.p_intf->i_list_index = i_list_index;
+
InitSignalHandler(); /* prepare signals for interception */
+
intf_Run( main_data.p_intf );
intf_Destroy( main_data.p_intf );
}
main_PutIntVariable( VOUT_GRAYSCALE_VAR, 0 );
break;
+ /* DVD options */
+ case 'a':
+ if ( ! strcmp(optarg, "mpeg") )
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_MPEG );
+ else if ( ! strcmp(optarg, "lpcm") )
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_LPCM );
+ else if ( ! strcmp(optarg, "off") )
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_NOAUDIO );
+ else
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_AC3 );
+ break;
+ case 'c':
+ main_PutIntVariable( INPUT_DVD_CHANNEL_VAR, atoi(optarg) );
+ break;
+ case 's':
+ main_PutIntVariable( INPUT_DVD_SUBTITLE_VAR, atoi(optarg) );
+ break;
+
/* Input options */
case OPT_NOVLANS: /* --novlans */
p_main->b_vlans = 0;
" --aout <plugin> \taudio output method\n"
" --stereo, --mono \tstereo/mono audio\n"
"\n"
- " --novideo \tdisable audio\n"
+ " --novideo \tdisable video\n"
" --vout <plugin> \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"
"\n"
+ " -a, --dvdaudio \tchoose DVD audio type\n"
+ " -c, --dvdchannel \tchoose DVD audio channel\n"
+ " -s, --dvdsubtitle \tchoose DVD subtitle channel\n"
+ "\n"
" --novlans \tdisable vlans\n"
" --server <host> \tvideo server address\n"
" --port <port> \tvideo server port\n"
" " VOUT_FB_DEV_VAR "=<filename> \tframebuffer device path\n"
" " VOUT_GRAYSCALE_VAR "={1|0} \tgrayscale or color output\n" );
+ /* DVD parameters */
+ intf_Msg( "\n"
+ "DVD parameters:\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\n" );
+
/* Input parameters */
intf_Msg( "\n"
"Input parameters:\n"
"You may redistribute it under the terms of the GNU General Public License;\n"
"see the file named COPYING for details.\n"
"Written by the VideoLAN team at Ecole Centrale, Paris.\n" );
-
+
}
/*****************************************************************************