* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.69 2001/12/07 18:33:08 sam Exp $
+ * $Id: input_programs.c,v 1.71 2002/02/19 00:50:19 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include "defs.h"
-
#include <stdlib.h>
#include <string.h> /* memcpy(), memset() */
#include <sys/types.h> /* off_t */
-#include "common.h"
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "debug.h"
+#include <videolan/vlc.h>
#include "stream_control.h"
#include "input_ext-intf.h"
#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
/* Where to add the pgrm */
int i_pgrm_index = p_input->stream.i_pgrm_number;
- intf_DbgMsg("Adding description for pgrm %d", i_pgrm_id);
-
/* Add an entry to the list of program associated with the stream */
p_input->stream.i_pgrm_number++;
p_input->stream.pp_programs = realloc( p_input->stream.pp_programs,
ASSERT( p_pgrm );
- intf_DbgMsg("Deleting description for pgrm %d", p_pgrm->i_number);
-
/* Free the structures that describe the es that belongs to that program */
while( p_pgrm->i_es_number )
{
/* Where to add the pgrm */
int i_area_index = p_input->stream.i_area_nb;
- intf_DbgMsg("Adding description for area %d", i_area_index );
-
/* Add an entry to the list of program associated with the stream */
p_input->stream.i_area_nb++;
p_input->stream.pp_areas = realloc( p_input->stream.pp_areas,
ASSERT( p_area );
- intf_DbgMsg("Deleting description for area %d", p_area->i_id );
-
/* Find the area in the areas table */
for( i_area_index = 0; i_area_index < p_input->stream.i_area_nb;
i_area_index++ )
{
es_descriptor_t * p_es;
- intf_DbgMsg("Adding description for ES 0x%x", i_es_id);
-
p_es = (es_descriptor_t *)malloc( sizeof(es_descriptor_t) );
if( p_es == NULL )
{
{
if( p_es == NULL )
{
- intf_ErrMsg( "Nothing to do in input_SelectES" );
+ intf_ErrMsg( "input error: nothing to do in input_SelectES" );
return -1;
}
-#ifdef TRACE_INPUT
- intf_DbgMsg( "Selecting ES 0x%x", p_es->i_id );
-#endif
+ intf_WarnMsg( 4, "input: selecting ES 0x%x", p_es->i_id );
if( p_es->p_decoder_fifo != NULL )
{
return -1;
}
-#ifdef TRACE_INPUT
- intf_DbgMsg( "Unselecting ES 0x%x", p_es->i_id );
-#endif
+ intf_WarnMsg( 4, "input: unselecting ES 0x%x", p_es->i_id );
if( p_es->p_decoder_fifo == NULL )
{
if( p_input->stream.pp_selected_es == NULL )
{
-#ifdef TRACE_INPUT
- intf_DbgMsg( "No more selected ES in input_UnselectES" );
-#endif
+ intf_WarnMsg( 4, "input: no more selected ES in input_UnselectES" );
return( 1 );
}
}