* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.10 2001/01/24 19:05:55 massiot Exp $
+ * $Id: input_ext-intf.h,v 1.11 2001/01/30 05:48:23 sam Exp $
*
* Authors:
*
*/
#define INPUT_MAX_PLUGINS 1
/* FIXME ! */
-#define REQUESTED_MPEG 0
-#define REQUESTED_AC3 1
-#define REQUESTED_LPCM 2
+#define REQUESTED_MPEG 1
+#define REQUESTED_AC3 2
+#define REQUESTED_LPCM 3
#define REQUESTED_NOAUDIO 255
/*****************************************************************************
* input_dvd.c: DVD reading
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.8 2001/01/29 06:28:19 stef Exp $
+ * $Id: input_dvd.c,v 1.9 2001/01/30 05:48:23 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
- if( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 )
- == REQUESTED_MPEG
- && main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+ if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
== (p_es->i_id & 0x1F) )
+ switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
{
+ case 0:
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
+ REQUESTED_MPEG );
+ case REQUESTED_MPEG:
input_SelectES( p_input, p_es );
}
break;
case AC3_AUDIO_ES:
- if( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 )
- == REQUESTED_AC3
- && main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+ if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
== ((p_es->i_id & 0xF00) >> 8) )
+ switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
{
+ case 0:
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
+ REQUESTED_AC3 );
+ case REQUESTED_AC3:
input_SelectES( p_input, p_es );
}
break;
while( (i_startcode & 0xFFFFFF00) != 0x100L )
{
i_startcode <<= 8;
-fprintf( stderr, "sprotch\n" );
if( (i_nb = SafeRead( p_input, &i_dummy, 1 )) != 0 )
{
i_startcode |= i_dummy;
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.20 2001/01/10 19:22:11 massiot Exp $
+ * $Id: input_ps.c,v 1.21 2001/01/30 05:48:23 sam Exp $
*
* Authors:
*
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
- if( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 )
- == REQUESTED_MPEG
- && main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+ if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
== (p_es->i_id & 0x1F) )
+ switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
{
+ case 0:
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
+ REQUESTED_MPEG );
+ case REQUESTED_MPEG:
input_SelectES( p_input, p_es );
}
break;
case AC3_AUDIO_ES:
- if( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 )
- == REQUESTED_AC3
- && main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+ if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
== ((p_es->i_id & 0xF00) >> 8) )
+ switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
{
+ case 0:
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
+ REQUESTED_AC3 );
+ case REQUESTED_AC3:
input_SelectES( p_input, p_es );
}
break;
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.27 2001/01/24 19:05:55 massiot Exp $
+ * $Id: mpeg_system.c,v 1.28 2001/01/30 05:48:23 sam Exp $
*
* Authors:
*
p_es->i_type = MPEG2_AUDIO_ES;
p_es->b_audio = 1;
#ifdef AUTO_SPAWN
- if( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 )
- == REQUESTED_MPEG
- && main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+ if( !p_input->stream.b_seekable )
+ if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
== (p_es->i_id & 0x1F) )
+ switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
{
- if( !p_input->stream.b_seekable )
- input_SelectES( p_input, p_es );
+ case 0:
+ main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
+ REQUESTED_MPEG );
+ case REQUESTED_MPEG:
+ input_SelectES( p_input, p_es );
}
#endif
}
p_es->i_type = AC3_AUDIO_ES;
p_es->b_audio = 1;
#ifdef AUTO_SPAWN
- if( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 )
- == REQUESTED_AC3
- && main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+ if( !p_input->stream.b_seekable )
+ if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
== ((p_es->i_id & 0xF00) >> 8) )
+ switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
{
- if( !p_input->stream.b_seekable )
- input_SelectES( p_input, p_es );
+ case 0:
+ main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
+ REQUESTED_AC3 );
+ case REQUESTED_AC3:
+ input_SelectES( p_input, p_es );
}
#endif
}
main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_AC3 );
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
+ else if ( ! strcmp(optarg, "mpeg") )
main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_MPEG );
+ else
+ main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_NOAUDIO );
break;
case 'c':
main_PutIntVariable( INPUT_DVD_CHANNEL_VAR, atoi(optarg) );