Commit fcd50b7d authored by Christophe Massiot's avatar Christophe Massiot

Backported support for VLS CVS with regards to A/52 streams. Also

backported --vls-backwards-compat option. Please test.
parent 52e86083
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders * input_ext-dec.h: structures exported to the VideoLAN decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-dec.h,v 1.59 2002/05/24 12:42:14 gbazin Exp $ * $Id: input_ext-dec.h,v 1.59.2.1 2002/09/25 23:11:51 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr> * Michel Kaempf <maxx@via.ecp.fr>
...@@ -28,9 +28,19 @@ ...@@ -28,9 +28,19 @@
#define MPEG1_AUDIO_ES 0x03 #define MPEG1_AUDIO_ES 0x03
#define MPEG2_AUDIO_ES 0x04 #define MPEG2_AUDIO_ES 0x04
#define AC3_AUDIO_ES 0x81 #define AC3_AUDIO_ES 0x81
/* These ones might violate the norm : */ /* These ones might violate the usage : */
#define DVD_SPU_ES 0x82 #define DVD_SPU_ES 0x82
#define LPCM_AUDIO_ES 0x83 #define LPCM_AUDIO_ES 0x83
/* These ones are only here to work around a bug in VLS - VLS doesn't
* skip the first bytes of the PES payload (stream private ID) when
* streaming. This is incompatible with all equipments. 'B' is for
* buggy. Please note that they are associated with FOURCCs '***b'.
* --Meuuh 2002-08-30
*/
#define A52B_AUDIO_ES 0x91
#define DVDB_SPU_ES 0x92
#define LPCMB_AUDIO_ES 0x93
#define MSMPEG4v1_VIDEO_ES 0x40 #define MSMPEG4v1_VIDEO_ES 0x40
#define MSMPEG4v2_VIDEO_ES 0x41 #define MSMPEG4v2_VIDEO_ES 0x41
#define MSMPEG4v3_VIDEO_ES 0x42 #define MSMPEG4v3_VIDEO_ES 0x42
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (http://liba52.sf.net/). * (http://liba52.sf.net/).
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: a52.c,v 1.14.2.2 2002/06/02 10:28:14 gbazin Exp $ * $Id: a52.c,v 1.14.2.3 2002/09/25 23:11:51 massiot Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -111,7 +111,7 @@ MODULE_DEACTIVATE_STOP ...@@ -111,7 +111,7 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/ *****************************************************************************/
static int decoder_Probe( u8 *pi_type ) static int decoder_Probe( u8 *pi_type )
{ {
return ( *pi_type == AC3_AUDIO_ES ? 0 : -1 ); return ( (*pi_type == AC3_AUDIO_ES || *pi_type == A52B_AUDIO_ES) ? 0 : -1 );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ac3_adec.c: ac3 decoder module main file * ac3_adec.c: ac3 decoder module main file
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ac3_adec.c,v 1.31 2002/05/27 16:01:42 fenrir Exp $ * $Id: ac3_adec.c,v 1.31.2.1 2002/09/25 23:11:51 massiot Exp $
* *
* Authors: Michel Lespinasse <walken@zoy.org> * Authors: Michel Lespinasse <walken@zoy.org>
* *
...@@ -104,7 +104,7 @@ MODULE_DEACTIVATE_STOP ...@@ -104,7 +104,7 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/ *****************************************************************************/
static int decoder_Probe( u8 *pi_type ) static int decoder_Probe( u8 *pi_type )
{ {
return ( *pi_type == AC3_AUDIO_ES ) ? 0 : -1; return ( (*pi_type == AC3_AUDIO_ES || *pi_type == A52B_AUDIO_ES) ? 0 : -1 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.26 2002/05/27 16:01:42 fenrir Exp $ * $Id: ac3_spdif.c,v 1.26.2.1 2002/09/25 23:11:52 massiot Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi> * Juha Yrjola <jyrjola@cc.hut.fi>
...@@ -138,7 +138,7 @@ MODULE_DEACTIVATE_STOP ...@@ -138,7 +138,7 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/ *****************************************************************************/
static int decoder_Probe( u8 *pi_type ) static int decoder_Probe( u8 *pi_type )
{ {
return( *pi_type == AC3_AUDIO_ES ) ? 0 : -1; return ( (*pi_type == AC3_AUDIO_ES || *pi_type == A52B_AUDIO_ES) ? 0 : -1 );
} }
......
/* dvd_es.c: functions to find and select ES /* dvd_es.c: functions to find and select ES
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_es.c,v 1.11.2.1 2002/06/27 19:44:54 sam Exp $ * $Id: dvd_es.c,v 1.11.2.2 2002/09/25 23:11:52 massiot Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -141,7 +141,7 @@ void DVDReadAudio( input_thread_t * p_input ) ...@@ -141,7 +141,7 @@ void DVDReadAudio( input_thread_t * p_input )
{ {
case 0x00: /* AC3 */ case 0x00: /* AC3 */
ADDES( 0xbd, 0x80 + audio_status.i_position, ADDES( 0xbd, 0x80 + audio_status.i_position,
AC3_AUDIO_ES, AUDIO_ES, i_lang, 0 ); A52B_AUDIO_ES, AUDIO_ES, i_lang, 0 );
p_es->b_audio = 1; p_es->b_audio = 1;
strcat( p_es->psz_desc, " (ac3)" ); strcat( p_es->psz_desc, " (ac3)" );
...@@ -156,7 +156,7 @@ void DVDReadAudio( input_thread_t * p_input ) ...@@ -156,7 +156,7 @@ void DVDReadAudio( input_thread_t * p_input )
break; break;
case 0x04: /* LPCM */ case 0x04: /* LPCM */
ADDES( 0xbd, 0xa0 + audio_status.i_position, ADDES( 0xbd, 0xa0 + audio_status.i_position,
LPCM_AUDIO_ES, AUDIO_ES, i_lang, 0 ); LPCMB_AUDIO_ES, AUDIO_ES, i_lang, 0 );
p_es->b_audio = 1; p_es->b_audio = 1;
strcat( p_es->psz_desc, " (lpcm)" ); strcat( p_es->psz_desc, " (lpcm)" );
...@@ -227,7 +227,7 @@ void DVDReadSPU( input_thread_t * p_input ) ...@@ -227,7 +227,7 @@ void DVDReadSPU( input_thread_t * p_input )
if( vmg.title.pi_yuv_color ) if( vmg.title.pi_yuv_color )
{ {
ADDES( 0xbd, 0x20 + i_id, DVD_SPU_ES, SPU_ES, ADDES( 0xbd, 0x20 + i_id, DVDB_SPU_ES, SPU_ES,
vts.manager_inf.p_spu_attr[i-1].i_lang_code, vts.manager_inf.p_spu_attr[i-1].i_lang_code,
sizeof(int) + 16*sizeof(u32) ); sizeof(int) + 16*sizeof(u32) );
*(int*)p_es->p_demux_data = 0xBeeF; *(int*)p_es->p_demux_data = 0xBeeF;
...@@ -236,7 +236,7 @@ void DVDReadSPU( input_thread_t * p_input ) ...@@ -236,7 +236,7 @@ void DVDReadSPU( input_thread_t * p_input )
} }
else else
{ {
ADDES( 0xbd, 0x20 + i_id, DVD_SPU_ES, SPU_ES, ADDES( 0xbd, 0x20 + i_id, DVDB_SPU_ES, SPU_ES,
vts.manager_inf.p_spu_attr[i-1].i_lang_code, 0 ); vts.manager_inf.p_spu_attr[i-1].i_lang_code, 0 );
} }
} }
...@@ -280,12 +280,12 @@ void DVDLaunchDecoders( input_thread_t * p_input ) ...@@ -280,12 +280,12 @@ void DVDLaunchDecoders( input_thread_t * p_input )
{ {
int i_ac3 = i_audio; int i_ac3 = i_audio;
while( ( p_input->stream.pp_es[i_ac3]->i_type != while( ( p_input->stream.pp_es[i_ac3]->i_type !=
AC3_AUDIO_ES ) && ( i_ac3 <= A52B_AUDIO_ES ) && ( i_ac3 <=
p_dvd->p_ifo->vts.manager_inf.i_audio_nb ) ) p_dvd->p_ifo->vts.manager_inf.i_audio_nb ) )
{ {
i_ac3++; i_ac3++;
} }
if( p_input->stream.pp_es[i_ac3]->i_type == AC3_AUDIO_ES ) if( p_input->stream.pp_es[i_ac3]->i_type == A52B_AUDIO_ES )
{ {
input_SelectES( p_input, input_SelectES( p_input,
p_input->stream.pp_es[i_ac3] ); p_input->stream.pp_es[i_ac3] );
...@@ -312,7 +312,7 @@ void DVDLaunchDecoders( input_thread_t * p_input ) ...@@ -312,7 +312,7 @@ void DVDLaunchDecoders( input_thread_t * p_input )
{ {
int i=0,j=0; int i=0,j=0;
for (i=0; i < p_input->stream.i_es_number; i++ ) { for (i=0; i < p_input->stream.i_es_number; i++ ) {
if ( p_input->stream.pp_es[i]->i_type == DVD_SPU_ES ) { if ( p_input->stream.pp_es[i]->i_type == DVDB_SPU_ES ) {
j++; j++;
if ( i_spu == j ) break; if ( i_spu == j ) break;
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading. * It depends on: libdvdread for ifo files and block reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: input_dvdread.c,v 1.38 2002/05/14 19:33:54 bozo Exp $ * $Id: input_dvdread.c,v 1.38.2.1 2002/09/25 23:11:53 massiot Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -680,7 +680,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -680,7 +680,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
i_id = ( ( 0x80 + i_position ) << 8 ) | 0xbd; i_id = ( ( 0x80 + i_position ) << 8 ) | 0xbd;
p_es = input_AddES( p_input, NULL, i_id, 0 ); p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd; p_es->i_stream_id = 0xbd;
p_es->i_type = AC3_AUDIO_ES; p_es->i_type = A52B_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES; p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage( strcpy( p_es->psz_desc, DecodeLanguage(
...@@ -706,7 +706,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -706,7 +706,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
i_id = ( ( 0xa0 + i_position ) << 8 ) | 0xbd; i_id = ( ( 0xa0 + i_position ) << 8 ) | 0xbd;
p_es = input_AddES( p_input, NULL, i_id, 0 ); p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = i_id; p_es->i_stream_id = i_id;
p_es->i_type = LPCM_AUDIO_ES; p_es->i_type = LPCMB_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES; p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage( strcpy( p_es->psz_desc, DecodeLanguage(
...@@ -770,7 +770,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -770,7 +770,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
i_id = ( ( 0x20 + i_position ) << 8 ) | 0xbd; i_id = ( ( 0x20 + i_position ) << 8 ) | 0xbd;
p_es = input_AddES( p_input, NULL, i_id, 0 ); p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd; p_es->i_stream_id = 0xbd;
p_es->i_type = DVD_SPU_ES; p_es->i_type = DVDB_SPU_ES;
p_es->i_cat = SPU_ES; p_es->i_cat = SPU_ES;
strcpy( p_es->psz_desc, DecodeLanguage( strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_subp_attr[i-1].lang_code ) ); p_vts->vtsi_mat->vts_subp_attr[i-1].lang_code ) );
...@@ -1229,12 +1229,12 @@ static void DvdReadLauchDecoders( input_thread_t * p_input ) ...@@ -1229,12 +1229,12 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
{ {
int i_ac3 = i_audio; int i_ac3 = i_audio;
while( ( p_input->stream.pp_es[i_ac3]->i_type != while( ( p_input->stream.pp_es[i_ac3]->i_type !=
AC3_AUDIO_ES ) && ( i_ac3 <= A52B_AUDIO_ES ) && ( i_ac3 <=
p_dvd->p_vts_file->vtsi_mat->nr_of_vts_audio_streams ) ) p_dvd->p_vts_file->vtsi_mat->nr_of_vts_audio_streams ) )
{ {
i_ac3++; i_ac3++;
} }
if( p_input->stream.pp_es[i_ac3]->i_type == AC3_AUDIO_ES ) if( p_input->stream.pp_es[i_ac3]->i_type == A52B_AUDIO_ES )
{ {
input_SelectES( p_input, input_SelectES( p_input,
p_input->stream.pp_es[i_ac3] ); p_input->stream.pp_es[i_ac3] );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* lpcm_decoder_thread.c: lpcm decoder thread * lpcm_decoder_thread.c: lpcm decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm_adec.c,v 1.15.2.1 2002/08/11 21:56:04 massiot Exp $ * $Id: lpcm_adec.c,v 1.15.2.2 2002/09/25 23:11:53 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org> * Henri Fallon <henri@videolan.org>
...@@ -84,7 +84,7 @@ MODULE_DEACTIVATE_STOP ...@@ -84,7 +84,7 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/ *****************************************************************************/
static int decoder_Probe( u8 *pi_type ) static int decoder_Probe( u8 *pi_type )
{ {
return ( *pi_type == LPCM_AUDIO_ES ) ? 0 : -1; return ( (*pi_type == LPCM_AUDIO_ES || *pi_type == LPCMB_AUDIO_ES) ? 0 : -1 );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpeg_ps.c : Program Stream input module for vlc * mpeg_ps.c : Program Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: mpeg_ps.c,v 1.14 2002/05/15 22:53:10 jobi Exp $ * $Id: mpeg_ps.c,v 1.14.2.1 2002/09/25 23:11:53 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -225,7 +225,7 @@ static int PSInit( input_thread_t * p_input ) ...@@ -225,7 +225,7 @@ static int PSInit( input_thread_t * p_input )
} }
break; break;
case AC3_AUDIO_ES: case A52B_AUDIO_ES:
if( config_GetIntVariable( "audio-channel" ) if( config_GetIntVariable( "audio-channel" )
== ((p_es->i_id & 0xF00) >> 8) || == ((p_es->i_id & 0xF00) >> 8) ||
( config_GetIntVariable( "audio-channel" ) < 0 ( config_GetIntVariable( "audio-channel" ) < 0
...@@ -238,7 +238,7 @@ static int PSInit( input_thread_t * p_input ) ...@@ -238,7 +238,7 @@ static int PSInit( input_thread_t * p_input )
} }
break; break;
case DVD_SPU_ES: case DVDB_SPU_ES:
if( config_GetIntVariable( "spu-channel" ) if( config_GetIntVariable( "spu-channel" )
== ((p_es->i_id & 0x1F00) >> 8) ) == ((p_es->i_id & 0x1F00) >> 8) )
{ {
...@@ -246,7 +246,7 @@ static int PSInit( input_thread_t * p_input ) ...@@ -246,7 +246,7 @@ static int PSInit( input_thread_t * p_input )
} }
break; break;
case LPCM_AUDIO_ES: case LPCMB_AUDIO_ES:
if( config_GetIntVariable( "audio-channel" ) if( config_GetIntVariable( "audio-channel" )
== ((p_es->i_id & 0x1F00) >> 8) || == ((p_es->i_id & 0x1F00) >> 8) ||
( config_GetIntVariable( "audio-channel" ) < 0 ( config_GetIntVariable( "audio-channel" ) < 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpeg_ts.c : Transport Stream input module for vlc * mpeg_ts.c : Transport Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: mpeg_ts.c,v 1.13.2.1 2002/06/03 23:14:49 sam Exp $ * $Id: mpeg_ts.c,v 1.13.2.2 2002/09/25 23:11:53 massiot Exp $
* *
* Authors: Henri Fallon <henri@via.ecp.fr> * Authors: Henri Fallon <henri@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr> * Johan Bilien <jobi@via.ecp.fr>
...@@ -87,7 +87,15 @@ static void TS_DVBPSI_HandlePMT ...@@ -87,7 +87,15 @@ static void TS_DVBPSI_HandlePMT
/***************************************************************************** /*****************************************************************************
* Build configuration tree. * Build configuration tree.
*****************************************************************************/ *****************************************************************************/
#define VLS_BACKWARDS_COMPAT_TEXT N_("compatibility with pre-0.4 VLS")
#define VLS_BACKWARDS_COMPAT_LONGTEXT N_( \
"The protocol for transmitting A/52 audio streams changed between VLC " \
"0.3.x and 0.4. By default VLC assumes you have the latest VLS. In case " \
"you're using an old version, select this option.")
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Input"), NULL )
ADD_BOOL ( "vls-backwards-compat", 0, NULL, VLS_BACKWARDS_COMPAT_TEXT, VLS_BACKWARDS_COMPAT_LONGTEXT )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
MODULE_INIT_START MODULE_INIT_START
...@@ -536,6 +544,7 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -536,6 +544,7 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es )
pgrm_ts_data_t * p_pgrm_data; pgrm_ts_data_t * p_pgrm_data;
es_ts_data_t * p_demux_data; es_ts_data_t * p_demux_data;
boolean_t b_vls_compat = config_GetIntVariable( "vls-backwards-compat" );
p_demux_data = (es_ts_data_t *)p_es->p_demux_data; p_demux_data = (es_ts_data_t *)p_es->p_demux_data;
p_pgrm_data = (pgrm_ts_data_t *)p_es->p_pgrm->p_demux_data; p_pgrm_data = (pgrm_ts_data_t *)p_es->p_pgrm->p_demux_data;
...@@ -616,13 +625,21 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -616,13 +625,21 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es )
case MPEG2_AUDIO_ES: case MPEG2_AUDIO_ES:
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
break; break;
case LPCM_AUDIO_ES :
case AC3_AUDIO_ES : case AC3_AUDIO_ES :
if ( b_vls_compat )
p_new_es->i_type = A52B_AUDIO_ES;
/* pass-through */
case LPCM_AUDIO_ES :
case A52B_AUDIO_ES :
p_new_es->i_stream_id = 0xBD; p_new_es->i_stream_id = 0xBD;
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
break; break;
/* Not sure this one is fully specification-compliant */ /* Not sure this one is fully specification-compliant */
case DVD_SPU_ES : case DVD_SPU_ES :
if ( b_vls_compat )
p_new_es->i_type = DVDB_SPU_ES;
/* pass-through */
case DVDB_SPU_ES :
p_new_es->i_stream_id = 0xBD; p_new_es->i_stream_id = 0xBD;
p_new_es->i_cat = SPU_ES; p_new_es->i_cat = SPU_ES;
break; break;
...@@ -800,6 +817,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) ...@@ -800,6 +817,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt )
pgrm_descriptor_t * p_pgrm; pgrm_descriptor_t * p_pgrm;
es_descriptor_t * p_new_es; es_descriptor_t * p_new_es;
pgrm_ts_data_t * p_pgrm_demux; pgrm_ts_data_t * p_pgrm_demux;
boolean_t b_vls_compat = config_GetIntVariable( "vls-backwards-compat" );
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -841,12 +859,20 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) ...@@ -841,12 +859,20 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt )
case MPEG2_AUDIO_ES: case MPEG2_AUDIO_ES:
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
break; break;
case LPCM_AUDIO_ES:
case AC3_AUDIO_ES: case AC3_AUDIO_ES:
if ( b_vls_compat )
p_new_es->i_type = A52B_AUDIO_ES;
/* pass-through */
case LPCM_AUDIO_ES:
case A52B_AUDIO_ES:
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
p_new_es->i_stream_id = 0xBD; p_new_es->i_stream_id = 0xBD;
break; break;
case DVD_SPU_ES: case DVD_SPU_ES:
if ( b_vls_compat )
p_new_es->i_type = DVDB_SPU_ES;
/* pass-through */
case DVDB_SPU_ES:
p_new_es->i_cat = SPU_ES; p_new_es->i_cat = SPU_ES;
p_new_es->i_stream_id = 0xBD; p_new_es->i_stream_id = 0xBD;
break; break;
...@@ -894,6 +920,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) ...@@ -894,6 +920,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt )
strcat( p_new_es->psz_desc, " (lpcm)" ); strcat( p_new_es->psz_desc, " (lpcm)" );
break; break;
case AC3_AUDIO_ES: case AC3_AUDIO_ES:
case A52B_AUDIO_ES:
strcat( p_new_es->psz_desc, " (ac3)" ); strcat( p_new_es->psz_desc, " (ac3)" );
break; break;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* spu_decoder.c : spu decoder thread * spu_decoder.c : spu decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: spu_decoder.c,v 1.24.2.3 2002/08/07 20:42:36 massiot Exp $ * $Id: spu_decoder.c,v 1.24.2.4 2002/09/25 23:11:54 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Rudolf Cornelissen <rag.cornelissen@inter.nl.net> * Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
...@@ -96,7 +96,7 @@ MODULE_DEACTIVATE_STOP ...@@ -96,7 +96,7 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/ *****************************************************************************/
static int decoder_Probe( u8 *pi_type ) static int decoder_Probe( u8 *pi_type )
{ {
return ( *pi_type == DVD_SPU_ES ) ? 0 : -1; return ( (*pi_type == DVD_SPU_ES || *pi_type == DVDB_SPU_ES) ? 0 : -1 );
} }
/***************************************************************************** /*****************************************************************************
...@@ -862,7 +862,6 @@ static void RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic, ...@@ -862,7 +862,6 @@ static void RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
int i_x, i_y; int i_x, i_y;
int i_len, i_color, i_colprecomp, i_destalpha; int i_len, i_color, i_colprecomp, i_destalpha;
int i;
u8 i_cnt; u8 i_cnt;
/* RGB-specific */ /* RGB-specific */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: input_programs.c,v 1.88 2002/05/17 00:58:14 sam Exp $ * $Id: input_programs.c,v 1.88.2.1 2002/09/25 23:11:54 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -664,9 +664,11 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -664,9 +664,11 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
switch( p_es->i_type ) switch( p_es->i_type )
{ {
case AC3_AUDIO_ES: case AC3_AUDIO_ES:
case A52B_AUDIO_ES:
case MPEG1_AUDIO_ES: case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES: case MPEG2_AUDIO_ES:
case LPCM_AUDIO_ES: case LPCM_AUDIO_ES:
case LPCMB_AUDIO_ES:
if( p_main->b_audio ) if( p_main->b_audio )
{ {
/* Release the lock, not to block the input thread during /* Release the lock, not to block the input thread during
...@@ -684,6 +686,7 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -684,6 +686,7 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
case MSMPEG4v2_VIDEO_ES: case MSMPEG4v2_VIDEO_ES:
case MSMPEG4v3_VIDEO_ES: case MSMPEG4v3_VIDEO_ES:
case DVD_SPU_ES: case DVD_SPU_ES:
case DVDB_SPU_ES:
if( p_main->b_video ) if( p_main->b_video )
{ {
/* Release the lock, not to block the input thread during /* Release the lock, not to block the input thread during
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management * mpeg_system.c: TS, PS and PES management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: mpeg_system.c,v 1.97.2.1 2002/06/02 10:55:53 sam Exp $ * $Id: mpeg_system.c,v 1.97.2.2 2002/09/25 23:11:54 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr> * Michel Lespinasse <walken@via.ecp.fr>
...@@ -333,17 +333,16 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -333,17 +333,16 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
break; break;
} }
if( p_es->i_stream_id == 0xbd ) if ( p_es->i_type == A52B_AUDIO_ES )
{ {
/* With private stream 1, the first byte of the payload /* With A/52 audio, we need to skip the first 4 bytes */
* is a stream_private_id, so skip it. */ i_pes_header_size += 4;
i_pes_header_size++;
} }
else if( p_es->i_type == LPCMB_AUDIO_ES
if( p_es->i_type == AC3_AUDIO_ES ) || p_es->i_type == DVDB_SPU_ES )
{ {
/* With ac3 audio, we need to skip first 3 bytes */ /* With others, we need to skip the first byte */
i_pes_header_size += 3; i_pes_header_size += 1;
} }
/* Now we've parsed the header, we just have to indicate in some /* Now we've parsed the header, we just have to indicate in some
...@@ -605,7 +604,9 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data ) ...@@ -605,7 +604,9 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
p_es->b_audio = ( p_es->i_type == MPEG1_AUDIO_ES p_es->b_audio = ( p_es->i_type == MPEG1_AUDIO_ES
|| p_es->i_type == MPEG2_AUDIO_ES || p_es->i_type == MPEG2_AUDIO_ES
|| p_es->i_type == AC3_AUDIO_ES || p_es->i_type == AC3_AUDIO_ES
|| p_es->i_type == A52B_AUDIO_ES
|| p_es->i_type == LPCM_AUDIO_ES || p_es->i_type == LPCM_AUDIO_ES
|| p_es->i_type == LPCMB_AUDIO_ES
); );
/* input_AddES has inserted the new element at the end. */ /* input_AddES has inserted the new element at the end. */
...@@ -825,7 +826,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -825,7 +826,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
else if( (i_id & 0xF0FF) == 0x80BD ) else if( (i_id & 0xF0FF) == 0x80BD )
{ {
/* AC3 audio (0x80->0x8F) */ /* AC3 audio (0x80->0x8F) */
p_es->i_type = AC3_AUDIO_ES; p_es->i_type = A52B_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES; p_es->i_cat = AUDIO_ES;
#ifdef AUTO_SPAWN #ifdef AUTO_SPAWN
...@@ -845,7 +846,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -845,7 +846,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
else if( (i_id & 0xE0FF) == 0x20BD ) else if( (i_id & 0xE0FF) == 0x20BD )
{ {
/* Subtitles video (0x20->0x3F) */ /* Subtitles video (0x20->0x3F) */
p_es->i_type = DVD_SPU_ES; p_es->i_type = DVDB_SPU_ES;
p_es->i_cat = SPU_ES; p_es->i_cat = SPU_ES;
#ifdef AUTO_SPAWN #ifdef AUTO_SPAWN
if( config_GetIntVariable( "spu-channel" ) if( config_GetIntVariable( "spu-channel" )
...@@ -859,7 +860,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -859,7 +860,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
else if( (i_id & 0xF0FF) == 0xA0BD ) else if( (i_id & 0xF0FF) == 0xA0BD )
{ {
/* LPCM audio (0xA0->0xAF) */ /* LPCM audio (0xA0->0xAF) */
p_es->i_type = LPCM_AUDIO_ES; p_es->i_type = LPCMB_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES; p_es->i_cat = AUDIO_ES;
} }
......
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