From 963dd61809aed0c82bfa529fbb80aaedd7e47d82 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Wed, 6 Oct 1999 00:32:24 +0000 Subject: [PATCH] =?utf8?q?*=20L'autospawn=20r=EF=BF=BDagit=20correctement?= =?utf8?q?=20si=20on=20utilise=20les=20flags=20--novideo=20ou=20=20=20--no?= =?utf8?q?audio=20;?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --Meuuh --- src/input/input_psi.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/input/input_psi.c b/src/input/input_psi.c index 11bb02c013..cae2e381ba 100644 --- a/src/input/input_psi.c +++ b/src/input/input_psi.c @@ -16,6 +16,9 @@ #include /* atoi(), malloc(), free() */ #include #include /* ntohs */ +#include +#include +#include #include "common.h" #include "config.h" @@ -26,6 +29,15 @@ #include "input.h" #include "input_ctrl.h" #include "input_psi.h" +#include "input_vlan.h" + +#include "audio_output.h" +#include "video.h" +#include "video_output.h" +#include "xconsole.h" +#include "interface.h" + +#include "pgm_data.h" /* * Precalculated 32-bits CRC table, shared by all instances of the PSI decoder @@ -33,6 +45,14 @@ boolean_t b_crc_initialised = 0; u32 i_crc_32_table[256]; +/* + * Global configuration variable, need by AUTO_SPAWN to determine + * the option (audio and video) passed to the VideoLAN client. + */ +#ifdef AUTO_SPAWN +extern program_data_t *p_program_data; +#endif + /* * Locale type definitions */ @@ -597,10 +617,19 @@ static void DecodePgrmMapSection( u8* p_pms, input_thread_t* p_input ) { case MPEG1_VIDEO_ES: case MPEG2_VIDEO_ES: + if( p_program_data->cfg.b_video ) + { + /* Spawn a video thread */ + input_AddPgrmElem( p_input, p_input->p_es[i_es_loop].i_id ); + } + break; case MPEG1_AUDIO_ES: case MPEG2_AUDIO_ES: - /* Spawn an audio thread */ - input_AddPgrmElem( p_input, p_input->p_es[i_es_loop].i_id ); + if( p_program_data->cfg.b_audio ) + { + /* Spawn an audio thread */ + input_AddPgrmElem( p_input, p_input->p_es[i_es_loop].i_id ); + } break; default: } -- 2.39.2