#include "input_ext-intf.h"
#include "intf_msg.h"
-#include "intf_plst.h"
+#include "intf_playlist.h"
#include "interface.h"
#include "audio_output.h"
#define OPT_PORT 172
#define OPT_BROADCAST 173
-#define OPT_AOUT 180
-#define OPT_VOUT 181
-#define OPT_INTF 182
-#define OPT_MOTION 183
-#define OPT_IDCT 184
-#define OPT_YUV 185
-#define OPT_INPUT 186
+#define OPT_INPUT 180
+#define OPT_MOTION 181
+#define OPT_IDCT 182
+#define OPT_YUV 183
#define OPT_SYNCHRO 190
#define OPT_WARNING 191
{ "version", 0, 0, 'v' },
/* Interface options */
- { "intf", 1, 0, OPT_INTF },
+ { "intf", 1, 0, 'I' },
{ "warning", 1, 0, OPT_WARNING },
/* Audio options */
{ "noaudio", 0, 0, OPT_NOAUDIO },
- { "aout", 1, 0, OPT_AOUT },
+ { "aout", 1, 0, 'A' },
{ "stereo", 0, 0, OPT_STEREO },
{ "mono", 0, 0, OPT_MONO },
/* Video options */
{ "novideo", 0, 0, OPT_NOVIDEO },
- { "vout", 1, 0, OPT_VOUT },
+ { "vout", 1, 0, 'V' },
{ "display", 1, 0, OPT_DISPLAY },
{ "width", 1, 0, OPT_WIDTH },
{ "height", 1, 0, OPT_HEIGHT },
{ "overlay", 0, 0, OPT_OVERLAY },
/* DVD options */
+ { "dvdtitle", 1, 0, 't' },
+ { "dvdchapter", 1, 0, 'T' },
{ "dvdaudio", 1, 0, 'a' },
{ "dvdchannel", 1, 0, 'c' },
{ "dvdsubtitle", 1, 0, 's' },
};
/* Short options */
-static const char *psz_shortopts = "hHvga:s:c:";
+static const char *psz_shortopts = "hHvgt:T:a:s:c:I:A:V:";
#endif
/*
* Initialize playlist and get commandline files
*/
- p_main->p_playlist = intf_PlstCreate( );
+ p_main->p_playlist = intf_PlaylistCreate( );
if( !p_main->p_playlist )
{
intf_ErrMsg( "playlist error: playlist initialization failed" );
intf_MsgDestroy();
return( errno );
}
- intf_PlstInit( p_main->p_playlist );
+ intf_PlaylistInit( p_main->p_playlist );
/*
* Get input filenames given as commandline arguments
if( !p_main->p_bank )
{
intf_ErrMsg( "module error: module bank initialization failed" );
- intf_PlstDestroy( p_main->p_playlist );
+ intf_PlaylistDestroy( p_main->p_playlist );
intf_MsgDestroy();
return( errno );
}
{
intf_ErrMsg( "intf error: interface initialization failed" );
module_DestroyBank( p_main->p_bank );
- intf_PlstDestroy( p_main->p_playlist );
+ intf_PlaylistDestroy( p_main->p_playlist );
intf_MsgDestroy();
return( errno );
}
}
/*
- * Open video device and start aout thread
+ * Open video device and start vout thread
*/
if( p_main->b_video )
{
p_main->p_vout = vout_CreateThread( NULL );
if( p_main->p_vout == NULL )
{
- /* On error during video initialization, switch off audio */
+ /* On error during video initialization, switch off video */
intf_ErrMsg( "vout error: video initialization failed,"
" video is deactivated" );
p_main->b_video = 0;
/*
* Free playlist
*/
- intf_PlstDestroy( p_main->p_playlist );
+ intf_PlaylistDestroy( p_main->p_playlist );
#ifdef SYS_BEOS
/*
break;
/* Interface warning messages level */
- case OPT_INTF: /* --intf */
+ case 'I': /* -I, --intf */
main_PutPszVariable( INTF_METHOD_VAR, optarg );
break;
case OPT_WARNING: /* --warning */
case OPT_NOAUDIO: /* --noaudio */
p_main->b_audio = 0;
break;
- case OPT_AOUT: /* --aout */
+ case 'A': /* -A, --aout */
main_PutPszVariable( AOUT_METHOD_VAR, optarg );
break;
case OPT_STEREO: /* --stereo */
case OPT_NOVIDEO: /* --novideo */
p_main->b_video = 0;
break;
- case OPT_VOUT: /* --vout */
+ case 'V': /* -V, --vout */
main_PutPszVariable( VOUT_METHOD_VAR, optarg );
break;
case OPT_DISPLAY: /* --display */
break;
/* DVD options */
+ case 't':
+ main_PutIntVariable( INPUT_TITLE_VAR, atoi(optarg) );
+ break;
+ case 'T':
+ main_PutIntVariable( INPUT_CHAPTER_VAR, atoi(optarg) );
+ break;
case 'a':
if ( ! strcmp(optarg, "ac3") )
main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_AC3 );
/* We assume that the remaining parameters are filenames */
for( i_opt = optind; i_opt < i_argc; i_opt++ )
{
- intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, ppsz_argv[ i_opt ] );
+ intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
+ ppsz_argv[ i_opt ] );
}
return( 0 );
/* Options */
intf_MsgImm( "\nOptions:"
- "\n --intf <module> \tinterface method"
+ "\n -I, --intf <module> \tinterface method"
"\n --warning <level> \tdisplay warning messages"
"\n"
"\n --noaudio \tdisable audio"
- "\n --aout <module> \taudio output method"
+ "\n -A, --aout <module> \taudio output method"
"\n --stereo, --mono \tstereo/mono audio"
"\n"
"\n --novideo \tdisable video"
- "\n --vout <module> \tvideo output method"
+ "\n -V, --vout <module> \tvideo output method"
"\n --display <display> \tdisplay string"
"\n --width <w>, --height <h> \tdisplay dimensions"
"\n -g, --grayscale \tgrayscale output"
"\n --yuv <module> \tYUV method"
"\n --synchro <type> \tforce synchro algorithm"
"\n"
+ "\n -t, --dvdtitle <num> \tchoose DVD title"
+ "\n -T, --dvdchapter <num> \tchoose DVD chapter"
"\n -a, --dvdaudio <type> \tchoose DVD audio type"
"\n -c, --dvdchannel <channel> \tchoose DVD audio channel"
"\n -s, --dvdsubtitle <channel> \tchoose DVD subtitle channel"
return;
/* Interface parameters */
- intf_MsgImm( "\nInterface parameters:\n"
+ intf_MsgImm( "\nInterface parameters:"
"\n " INTF_METHOD_VAR "=<method name> \tinterface method"
- "\n " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script"
+ "\n " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script"
"\n " INTF_CHANNELS_VAR "=<filename> \tchannels list"
"\n " INTF_WARNING_VAR "=<level> \twarning level" );
/* DVD parameters */
intf_MsgImm( "\nDVD parameters:"
"\n " INPUT_DVD_DEVICE_VAR "=<device> \tDVD device"
- "\n " INPUT_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
- "\n " INPUT_CHANNEL_VAR "=[0-15] \taudio channel"
- "\n " INPUT_SUBTITLE_VAR "=[0-31] \tsubtitle channel" );
+ "\n " INPUT_TITLE_VAR "=<title> \ttitle number"
+ "\n " INPUT_CHAPTER_VAR "=<chapter> \tchapter number"
+ "\n " INPUT_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
+ "\n " INPUT_CHANNEL_VAR "=[0-15] \taudio channel"
+ "\n " INPUT_SUBTITLE_VAR "=[0-31] \tsubtitle channel" );
/* Input parameters */
- intf_MsgImm( "\nInput parameters:\n"
+ intf_MsgImm( "\nInput parameters:"
"\n " INPUT_SERVER_VAR "=<hostname> \tvideo server"
"\n " INPUT_PORT_VAR "=<port> \tvideo server port"
"\n " INPUT_IFACE_VAR "=<interface> \tnetwork interface"