* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.23 2001/05/08 00:43:57 sam Exp $
+ * $Id: input_ps.c,v 1.25 2001/05/30 17:03:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
#define input p_function_list->functions.input
p_function_list->pf_probe = PSProbe;
input.pf_init = PSInit;
- input.pf_open = input_FileOpen;
- input.pf_close = input_FileClose;
+ input.pf_open = NULL; /* Set in PSInit */
+ input.pf_close = NULL;
input.pf_end = PSEnd;
input.pf_set_area = NULL;
input.pf_read = PSRead;
}
p_input->p_method_data = (void *)p_packet_cache;
+ /* Set callback */
+ p_input->pf_open = p_input->pf_file_open;
+ p_input->pf_close = p_input->pf_file_close;
+
/* Initialize packet cache mutex */
vlc_mutex_init( &p_packet_cache->lock );
break;
case LPCM_AUDIO_ES:
- /* FIXME ! */
+ if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
+ == ((p_es->i_id & 0x1F00) >> 8) )
+ switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
+ {
+ case 0:
+ main_PutIntVariable( INPUT_AUDIO_VAR,
+ REQUESTED_LPCM );
+ case REQUESTED_LPCM:
+ input_SelectES( p_input, p_es );
+ }
break;
}
}