* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.79 2002/04/10 16:26:21 jobi Exp $
+ * $Id: input_programs.c,v 1.83 2002/04/25 21:52:42 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
-#include "debug.h"
-
/*
* NOTICE : all of these functions expect you to have taken the lock on
* p_input->stream.lock
i_es_index ++ )
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
- if ( p_es->p_decoder_fifo )
+ if ( p_es->p_decoder_fifo ) /* if the ES was selected */
{
input_UnselectES( p_input , p_es );
}
if( p_main->b_audio )
{
/* Default is the first one */
- i_required_audio_es = config_GetIntVariable( "input_channel" );
+ i_required_audio_es = config_GetIntVariable( "audio-channel" );
if( i_required_audio_es < 0 )
{
i_required_audio_es = 1;
if( p_main->b_video )
{
/* for spu, default is none */
- i_required_spu_es = config_GetIntVariable( "input_subtitle" );
+ i_required_spu_es = config_GetIntVariable( "spu-channel" );
if( i_required_spu_es < 0 )
{
i_required_spu_es = 0;
for (i_es_index = 0 ; i_es_index < p_new_prg->i_es_number ; i_es_index ++ )
{
switch( p_new_prg->pp_es[i_es_index]->i_cat )
- {
- case VIDEO_ES:
- intf_WarnMsg( 4, "Selecting ES %x",
- p_new_prg->pp_es[i_es_index]->i_id );
- input_SelectES( p_input,
- p_new_prg->pp_es[i_es_index] );
- break;
- case AUDIO_ES:
- i_audio_es += 1;
- if( i_audio_es <= i_required_audio_es )
- {
- intf_WarnMsg( 4, "Selecting ES %x",
- p_new_prg->pp_es[i_es_index]->i_id );
- input_SelectES( p_input,
- p_new_prg->pp_es[i_es_index]);
- }
- break;
- /* Not sure this one is fully specification-compliant */
- case SPU_ES :
- i_spu_es += 1;
- if( i_spu_es <= i_required_spu_es )
- {
- intf_WarnMsg( 4, "Selecting ES %x",
- p_new_prg->pp_es[i_es_index]->i_id );
- input_SelectES( p_input,
- p_new_prg->pp_es[i_es_index] );
- }
- break;
- default :
- break;
- }
+ {
+ case VIDEO_ES:
+ intf_WarnMsg( 4, "Selecting ES %x",
+ p_new_prg->pp_es[i_es_index]->i_id );
+ input_SelectES( p_input, p_new_prg->pp_es[i_es_index] );
+ break;
+ case AUDIO_ES:
+ i_audio_es += 1;
+ if( i_audio_es <= i_required_audio_es )
+ {
+ intf_WarnMsg( 4, "Selecting ES %x",
+ p_new_prg->pp_es[i_es_index]->i_id );
+ input_SelectES( p_input, p_new_prg->pp_es[i_es_index]);
+ }
+ break;
+ /* Not sure this one is fully specification-compliant */
+ case SPU_ES :
+ i_spu_es += 1;
+ if( i_spu_es <= i_required_spu_es )
+ {
+ intf_WarnMsg( 4, "Selecting ES %x",
+ p_new_prg->pp_es[i_es_index]->i_id );
+ input_SelectES( p_input, p_new_prg->pp_es[i_es_index] );
+ }
+ break;
+ default :
+ intf_WarnMsg( 2, "ES %x has unknown type",
+ p_new_prg->pp_es[i_es_index]->i_id );
+ break;
+ }
}
p_es->p_decoder_fifo = NULL;
p_es->b_audio = 0;
p_es->i_cat = UNKNOWN_ES;
-#ifdef HAVE_SATELLITE
- p_es->i_dmx_fd = 0;
-#endif
+ p_es->i_demux_fd = 0;
if( i_data_len )
{
case AC3_AUDIO_ES:
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
+ case MPEG4_VIDEO_ES:
+ case MSMPEG4_VIDEO_ES:
case LPCM_AUDIO_ES:
if( p_main->b_audio )
{