#include "es_out.h"
#include "event.h"
#include "info.h"
-#include "item.h"
#include "../stream_output/stream_output.h"
const es_format_t *p_fmt_es = &es->fmt;
lldiv_t div;
- input_item_UpdateTracksInfo(input_GetItem(p_input), fmt);
-
/* Create category */
char psz_cat[128];
snprintf( psz_cat, sizeof(psz_cat),_("Stream %d"), es->i_meta_id );
input_item_node_Delete( p_root );
}
-
-/* Called by es_out when a new Elementary Stream is added or updated. */
-void input_item_UpdateTracksInfo(input_item_t *item, const es_format_t *fmt)
-{
- int i;
- es_format_t *fmt_copy = malloc(sizeof *fmt_copy);
- if (!fmt_copy)
- return;
-
- es_format_Copy(fmt_copy, fmt);
- /* XXX: we could free p_extra to save memory, we will likely not need
- * the decoder specific data */
-
- vlc_mutex_lock( &item->lock );
-
- for( i = 0; i < item->i_es; i++ )
- {
- if (item->es[i]->i_id != fmt->i_id)
- continue;
-
- /* We've found the right ES, replace it */
- es_format_Clean(item->es[i]);
- free(item->es[i]);
- item->es[i] = fmt_copy;
- vlc_mutex_unlock( &item->lock );
- return;
- }
-
- /* ES not found, insert it */
- TAB_APPEND(item->i_es, item->es, fmt_copy);
- vlc_mutex_unlock( &item->lock );
-}
#include "input_interface.h"
void input_item_SetErrorWhenReading( input_item_t *p_i, bool b_error );
-void input_item_UpdateTracksInfo( input_item_t *item, const es_format_t *fmt );
#endif