Commit 0fde9b2d authored by Laurent Aimar's avatar Laurent Aimar

* all: added a i_id field in es_format_t.

parent fee32b8e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc_es.h * vlc_es.h
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: vlc_es.h,v 1.5 2003/11/24 02:35:50 fenrir Exp $ * $Id: vlc_es.h,v 1.6 2004/01/19 18:15:29 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -107,6 +107,8 @@ struct es_format_t ...@@ -107,6 +107,8 @@ struct es_format_t
int i_cat; int i_cat;
vlc_fourcc_t i_codec; vlc_fourcc_t i_codec;
int i_id; /* -1: let the core mark the right id
>=0: valid id */
int i_group; /* -1 : standalone int i_group; /* -1 : standalone
>= 0 then a "group" (program) is created >= 0 then a "group" (program) is created
for each value */ for each value */
...@@ -140,6 +142,7 @@ static inline void es_format_Init( es_format_t *fmt, ...@@ -140,6 +142,7 @@ static inline void es_format_Init( es_format_t *fmt,
{ {
fmt->i_cat = i_cat; fmt->i_cat = i_cat;
fmt->i_codec = i_codec; fmt->i_codec = i_codec;
fmt->i_id = -1;
fmt->i_group = 0; fmt->i_group = 0;
fmt->i_priority = 0; fmt->i_priority = 0;
fmt->psz_language = NULL; fmt->psz_language = NULL;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* es_out.c: Es Out handler for input. * es_out.c: Es Out handler for input.
***************************************************************************** *****************************************************************************
* Copyright (C) 2003-2004 VideoLAN * Copyright (C) 2003-2004 VideoLAN
* $Id: es_out.c,v 1.18 2004/01/18 19:35:48 fenrir Exp $ * $Id: es_out.c,v 1.19 2004/01/19 18:15:29 fenrir Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -274,13 +274,17 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt ) ...@@ -274,13 +274,17 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
} }
} }
} }
if( fmt->i_id < 0 )
{
fmt->i_id = out->p_sys->i_id - 1;
}
es->p_es = input_AddES( p_input, es->p_es = input_AddES( p_input,
p_prgm, p_prgm,
out->p_sys->i_id, fmt->i_id + 1,
fmt->i_cat, fmt->i_cat,
fmt->psz_language, 0 ); fmt->psz_language, 0 );
es->p_es->i_stream_id = out->p_sys->i_id; es->p_es->i_stream_id = fmt->i_id;
es->p_es->i_fourcc = fmt->i_codec; es->p_es->i_fourcc = fmt->i_codec;
switch( fmt->i_cat ) switch( fmt->i_cat )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders * input_dec.c: Functions for the management of decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2004 VideoLAN * Copyright (C) 1999-2004 VideoLAN
* $Id: input_dec.c,v 1.86 2004/01/18 23:52:02 gbazin Exp $ * $Id: input_dec.c,v 1.87 2004/01/19 18:15:29 fenrir Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -548,6 +548,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -548,6 +548,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
p_dec->p_owner->sout.i_group = p_dec->p_owner->sout.i_group =
p_dec->p_owner->p_es_descriptor->p_pgrm->i_number; p_dec->p_owner->p_es_descriptor->p_pgrm->i_number;
} }
p_dec->p_owner->sout.i_id = p_dec->p_owner->p_es_descriptor->i_id - 1;
p_dec->p_owner->p_sout = p_dec->p_owner->p_sout =
sout_InputNew( p_dec, &p_dec->p_owner->sout ); sout_InputNew( p_dec, &p_dec->p_owner->sout );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment