* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.49 2001/11/25 22:52:21 gbazin Exp $
+ * $Id: input_ext-intf.h,v 1.50 2001/12/05 03:31:04 jobi Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Programs descriptions */
int i_pgrm_number; /* size of the following array */
pgrm_descriptor_t ** pp_programs; /* array of pointers to pgrm */
-
+ pgrm_descriptor_t * p_selected_program; /* currently
+ selected program */
+ pgrm_descriptor_t * p_new_program; /* Newly selected program */
/* ES descriptions */
int i_es_number;
es_descriptor_t ** pp_es; /* carried elementary streams */
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.102 2001/11/28 15:08:05 massiot Exp $
+ * $Id: input_dvd.c,v 1.103 2001/12/05 03:31:04 jobi Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
}
free( p_input->stream.pp_selected_es );
- input_DelProgram( p_input, p_input->stream.pp_programs[0] );
+ input_DelProgram( p_input, p_input->stream.p_selected_program );
p_input->stream.pp_selected_es = NULL;
p_input->stream.i_selected_es_number = 0;
}
input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
+ p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
/* No PSM to read in DVD mode, we already have all information */
- p_input->stream.pp_programs[0]->b_is_ok = 1;
+ p_input->stream.p_selected_program->b_is_ok = 1;
p_es = NULL;
/* ES 0 -> video MPEG2 */
IfoPrintVideo( p_dvd );
- p_es = input_AddES( p_input, p_input->stream.pp_programs[0], 0xe0, 0 );
+ p_es = input_AddES( p_input, p_input->stream.p_selected_program,
+ 0xe0, 0 );
p_es->i_stream_id = 0xe0;
p_es->i_type = MPEG2_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
case 0x00: /* AC3 */
i_id = ( ( 0x80 + audio_status.i_position ) << 8 ) | 0xbd;
p_es = input_AddES( p_input,
- p_input->stream.pp_programs[0], i_id, 0 );
+ p_input->stream.p_selected_program, i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = AC3_AUDIO_ES;
p_es->b_audio = 1;
case 0x03: /* MPEG audio */
i_id = 0xc0 + audio_status.i_position;
p_es = input_AddES( p_input,
- p_input->stream.pp_programs[0], i_id, 0 );
+ p_input->stream.p_selected_program, i_id
+ , 0 );
p_es->i_stream_id = i_id;
p_es->i_type = MPEG2_AUDIO_ES;
p_es->b_audio = 1;
i_id = ( ( 0xa0 + audio_status.i_position ) << 8 ) | 0xbd;
p_es = input_AddES( p_input,
- p_input->stream.pp_programs[0], i_id, 0 );
+ p_input->stream.p_selected_program,
+ i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = LPCM_AUDIO_ES;
p_es->b_audio = 1;
| 0xbd;
}
p_es = input_AddES( p_input,
- p_input->stream.pp_programs[0], i_id, 0 );
+ p_input->stream.p_selected_program,
+ i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = DVD_SPU_ES;
p_es->i_cat = SPU_ES;
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ps.c,v 1.41 2001/12/03 17:55:45 massiot Exp $
+ * $Id: input_ps.c,v 1.42 2001/12/05 03:31:04 jobi Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
/* FIXME : detect if InitStream failed */
input_InitStream( p_input, sizeof( stream_ps_data_t ) );
input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
-
+
+ p_input->stream.p_selected_program =
+ p_input->stream.pp_programs[0] ;
+ p_input->stream.p_new_program =
+ p_input->stream.pp_programs[0] ;
+
if( p_input->stream.b_seekable )
{
stream_ps_data_t * p_demux_data =
/* Set program information. */
- input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
+ input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
+ p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
/* No PSM to read in disc mode, we already have all information */
- p_input->stream.pp_programs[0]->b_is_ok = 1;
+ p_input->stream.p_selected_program->b_is_ok = 1;
- p_es = input_AddES( p_input, p_input->stream.pp_programs[0], 0xe0, 0 );
+ p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xe0, 0 );
p_es->i_stream_id = 0xe0;
p_es->i_type = MPEG1_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
}
p_es = input_AddES( p_input,
- p_input->stream.pp_programs[0], 0xc0, 0 );
+ p_input->stream.p_selected_program, 0xc0, 0 );
p_es->i_stream_id = 0xc0;
p_es->i_type = MPEG1_AUDIO_ES;
p_es->b_audio = 1;
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_clock.c,v 1.24 2001/11/28 15:08:06 massiot Exp $
+ * $Id: input_clock.c,v 1.25 2001/12/05 03:31:04 jobi Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_pgrm->i_synchro_state = SYNCHRO_OK;
if( p_input->stream.b_pace_control
- && p_input->stream.pp_programs[0] == p_pgrm )
+ && p_input->stream.p_selected_program == p_pgrm )
{
p_pgrm->last_cr = i_clock;
mwait( ClockToSysdate( p_input, p_pgrm, i_clock ) );
p_pgrm->last_cr = i_clock;
if( p_input->stream.b_pace_control
- && p_input->stream.pp_programs[0] == p_pgrm )
+ && p_input->stream.p_selected_program == p_pgrm )
{
/* We remember the last system date to be able to restart
* the synchro we statistically better continuity, after
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.66 2001/11/28 15:08:06 massiot Exp $
+ * $Id: input_programs.c,v 1.67 2001/12/05 03:31:04 jobi Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->stream.p_removed_es = NULL;
p_input->stream.p_newly_selected_es = NULL;
p_input->stream.pp_programs = NULL;
-
+ p_input->stream.p_selected_program = NULL;
+ p_input->stream.p_new_program = NULL;
+
if( i_data_len )
{
if ( (p_input->stream.p_demux_data = malloc( i_data_len )) == NULL )
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: mpeg_system.c,v 1.67 2001/12/03 17:55:45 massiot Exp $
+ * $Id: mpeg_system.c,v 1.68 2001/12/05 03:31:04 jobi Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
}
#undef p_psi
+ /* FIXME This has nothing to do here */
+ p_input->stream.p_selected_program = p_input->stream.pp_programs[0] ;
}