Commit 95b4a56a authored by gbazin's avatar gbazin

* ALL: changed the prototype of input_AddES() to include enough information so we can build an "video-es", "audio-es" and "spu-es" object variable. These variables can be used by the interfaces to navigate between the elementary streams.
* modules/gui/wxwindows/menus.cpp: use the "foo-es" object variables.
parent 45d50b96
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* control the pace of reading. * control the pace of reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.88 2003/04/13 20:00:20 fenrir Exp $ * $Id: input_ext-intf.h,v 1.89 2003/05/05 22:23:31 gbazin Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -52,7 +52,7 @@ struct es_descriptor_t ...@@ -52,7 +52,7 @@ struct es_descriptor_t
uint8_t i_cat; /* stream category (audio, video, spu) */ uint8_t i_cat; /* stream category (audio, video, spu) */
int i_demux_fd; /* used to store demux device int i_demux_fd; /* used to store demux device
file handle */ file handle */
char psz_desc[20]; /* description of ES: audio language char *psz_desc; /* description of ES: audio language
* for instance ; NULL if not * for instance ; NULL if not
* available */ * available */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* but exported to plug-ins * but exported to plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.41 2003/03/11 23:56:53 gbazin Exp $ * $Id: input_ext-plugins.h,v 1.42 2003/05/05 22:23:31 gbazin Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -47,7 +47,7 @@ VLC_EXPORT( int, input_SetProgram,( input_thread_t *, pgrm_descriptor_t * ) ); ...@@ -47,7 +47,7 @@ VLC_EXPORT( int, input_SetProgram,( input_thread_t *, pgrm_descriptor_t * ) );
VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t *, uint16_t, uint16_t ) ); VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t *, uint16_t, uint16_t ) );
VLC_EXPORT( void, input_DelArea, ( input_thread_t *, input_area_t * ) ); VLC_EXPORT( void, input_DelArea, ( input_thread_t *, input_area_t * ) );
VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, uint16_t ) ); VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, uint16_t ) );
VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, uint16_t, size_t ) ); VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, uint16_t, int, char const *, size_t ) );
VLC_EXPORT( void, input_DelES, ( input_thread_t *, es_descriptor_t * ) ); VLC_EXPORT( void, input_DelES, ( input_thread_t *, es_descriptor_t * ) );
VLC_EXPORT( int, input_SelectES, ( input_thread_t *, es_descriptor_t * ) ); VLC_EXPORT( int, input_SelectES, ( input_thread_t *, es_descriptor_t * ) );
VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) ); VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) );
......
/* es.c: functions to find and select ES /* es.c: functions to find and select ES
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: es.c,v 1.4 2002/12/06 16:34:04 sam Exp $ * $Id: es.c,v 1.5 2003/05/05 22:23:32 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -64,16 +64,20 @@ void DVDLaunchDecoders( input_thread_t * p_input ); ...@@ -64,16 +64,20 @@ void DVDLaunchDecoders( input_thread_t * p_input );
#define vmg p_dvd->p_ifo->vmg #define vmg p_dvd->p_ifo->vmg
#define vts p_dvd->p_ifo->vts #define vts p_dvd->p_ifo->vts
#define ADDES( stream_id, private_id, fourcc, cat, lang, size ) \ #define ADDES( stream_id, private_id, fourcc, cat, lang, descr, size ) \
i_id = ( (private_id) << 8 ) | (stream_id); \ i_id = ( (private_id) << 8 ) | (stream_id); \
p_es = input_AddES( p_input, NULL, i_id, size ); \
p_es->i_stream_id = (stream_id); \
p_es->i_fourcc = (fourcc); \
p_es->i_cat = (cat); \
if( lang ) \
{ \ { \
strcpy( p_es->psz_desc, DecodeLanguage( lang ) ); \ char *psz_descr; \
} psz_descr = malloc( strlen(DecodeLanguage( lang )) + \
strlen(descr) + 1 ); \
if( psz_descr ) {strcpy( psz_descr, DecodeLanguage( lang ) ); \
strcat( psz_descr, descr );} \
p_es = input_AddES( p_input, NULL, i_id, cat, \
psz_descr, size ); \
if( psz_descr ) free( psz_descr ); \
} \
p_es->i_stream_id = (stream_id); \
p_es->i_fourcc = (fourcc);
/***************************************************************************** /*****************************************************************************
...@@ -94,12 +98,13 @@ void DVDReadVideo( input_thread_t * p_input ) ...@@ -94,12 +98,13 @@ void DVDReadVideo( input_thread_t * p_input )
if( i_ratio ) if( i_ratio )
{ {
ADDES( 0xe0, 0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, sizeof(int) ); ADDES( 0xe0, 0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0,
"", sizeof(int) );
*(int*)(p_es->p_demux_data) = i_ratio; *(int*)(p_es->p_demux_data) = i_ratio;
} }
else else
{ {
ADDES( 0xe0, 0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, 0 ); ADDES( 0xe0, 0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, "", 0 );
} }
} }
...@@ -137,27 +142,27 @@ void DVDReadAudio( input_thread_t * p_input ) ...@@ -137,27 +142,27 @@ void DVDReadAudio( input_thread_t * p_input )
{ {
case 0x00: /* A52 */ case 0x00: /* A52 */
ADDES( 0xbd, 0x80 + audio_status.i_position, ADDES( 0xbd, 0x80 + audio_status.i_position,
VLC_FOURCC('a','5','2','b'), AUDIO_ES, i_lang, 0 ); VLC_FOURCC('a','5','2','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (A52)" ); " (A52)", 0 );
break; break;
case 0x02: case 0x02:
case 0x03: /* MPEG audio */ case 0x03: /* MPEG audio */
ADDES( 0xc0 + audio_status.i_position, 0, ADDES( 0xc0 + audio_status.i_position, 0,
VLC_FOURCC('m','p','g','a'), AUDIO_ES, i_lang, 0 ); VLC_FOURCC('m','p','g','a'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (mpeg)" ); " (mpeg)", 0 );
break; break;
case 0x04: /* LPCM */ case 0x04: /* LPCM */
ADDES( 0xbd, 0xa0 + audio_status.i_position, ADDES( 0xbd, 0xa0 + audio_status.i_position,
VLC_FOURCC('l','p','c','b'), AUDIO_ES, i_lang, 0 ); VLC_FOURCC('l','p','c','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (lpcm)" ); " (lpcm)", 0 );
break; break;
case 0x06: /* DTS */ case 0x06: /* DTS */
ADDES( 0xbd, 0x88 + audio_status.i_position, ADDES( 0xbd, 0x88 + audio_status.i_position,
VLC_FOURCC('d','t','s','b'), AUDIO_ES, i_lang, 0 ); VLC_FOURCC('d','t','s','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (dts)" ); " (dts)", 0 );
break; break;
default: default:
...@@ -222,7 +227,7 @@ void DVDReadSPU( input_thread_t * p_input ) ...@@ -222,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, VLC_FOURCC('s','p','u','b'), SPU_ES, ADDES( 0xbd, 0x20 + i_id, VLC_FOURCC('s','p','u','b'), 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;
memcpy( (char*)p_es->p_demux_data + sizeof(int), memcpy( (char*)p_es->p_demux_data + sizeof(int),
...@@ -231,7 +236,7 @@ void DVDReadSPU( input_thread_t * p_input ) ...@@ -231,7 +236,7 @@ void DVDReadSPU( input_thread_t * p_input )
else else
{ {
ADDES( 0xbd, 0x20 + i_id, VLC_FOURCC('s','p','u','b'), SPU_ES, ADDES( 0xbd, 0x20 + i_id, VLC_FOURCC('s','p','u','b'), 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 );
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* es.c: functions to handle elementary streams. * es.c: functions to handle elementary streams.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: es.c,v 1.5 2003/01/29 11:17:44 gbazin Exp $ * $Id: es.c,v 1.6 2003/05/05 22:23:32 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -71,16 +71,20 @@ void dvdplay_DeleteES( input_thread_t* p_input ) ...@@ -71,16 +71,20 @@ void dvdplay_DeleteES( input_thread_t* p_input )
} }
#define ADDES( id, fourcc, cat, lang, size ) \ #define ADDES( id, fourcc, cat, lang, descr, size ) \
msg_Dbg( p_input, "new es 0x%x", i_id ); \ msg_Dbg( p_input, "new es 0x%x", i_id ); \
p_es = input_AddES( p_input, NULL, id, size ); \
p_es->i_stream_id = i_id & 0xff; \
p_es->i_fourcc = (fourcc); \
p_es->i_cat = (cat); \
if( lang ) \
{ \ { \
strcpy( p_es->psz_desc, DecodeLanguage( lang ) ); \ char *psz_descr; \
} psz_descr = malloc( strlen(DecodeLanguage( lang )) + \
strlen(descr) + 1 ); \
if( psz_descr ) {strcpy( psz_descr, DecodeLanguage( lang ) ); \
strcat( psz_descr, descr );} \
p_es = input_AddES( p_input, NULL, id, cat, \
psz_descr, size ); \
if( psz_descr ) free( psz_descr ); \
} \
p_es->i_stream_id = i_id & 0xff; \
p_es->i_fourcc = (fourcc);
/***************************************************************************** /*****************************************************************************
* dvdplay_Video: read video ES * dvdplay_Video: read video ES
...@@ -100,12 +104,13 @@ void dvdplay_Video( input_thread_t * p_input ) ...@@ -100,12 +104,13 @@ void dvdplay_Video( input_thread_t * p_input )
if( p_attr->display_aspect_ratio ) if( p_attr->display_aspect_ratio )
{ {
ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, sizeof(int) ); ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0,
"", sizeof(int) );
*(int*)(p_es->p_demux_data) = p_attr->display_aspect_ratio; *(int*)(p_es->p_demux_data) = p_attr->display_aspect_ratio;
} }
else else
{ {
ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, 0 ); ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, "", 0 );
} }
} }
...@@ -143,29 +148,29 @@ void dvdplay_Audio( input_thread_t * p_input ) ...@@ -143,29 +148,29 @@ void dvdplay_Audio( input_thread_t * p_input )
switch( p_attr->audio_format ) switch( p_attr->audio_format )
{ {
case 0x00: /* A52 */ case 0x00: /* A52 */
ADDES( i_id, VLC_FOURCC('a','5','2','b'), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('a','5','2','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (A52)" ); " (A52)", 0 );
break; break;
case 0x02: case 0x02:
case 0x03: /* MPEG audio */ case 0x03: /* MPEG audio */
ADDES( i_id, VLC_FOURCC('m','p','g','a'), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('m','p','g','a'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (mpeg)" ); " (mpeg)", 0 );
break; break;
case 0x04: /* LPCM */ case 0x04: /* LPCM */
ADDES( i_id, VLC_FOURCC('l','p','c','b'), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('l','p','c','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (lpcm)" ); " (lpcm)", 0 );
break; break;
case 0x05: /* SDDS */ case 0x05: /* SDDS */
ADDES( i_id, VLC_FOURCC('s','d','d','b'), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('s','d','d','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (sdds)" ); " (sdds)", 0 );
break; break;
case 0x06: /* DTS */ case 0x06: /* DTS */
ADDES( i_id, VLC_FOURCC('d','t','s','b'), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('d','t','s','b'), AUDIO_ES, i_lang,
strcat( p_es->psz_desc, " (dts)" ); " (dts)", 0 );
break; break;
default: default:
...@@ -207,7 +212,7 @@ void dvdplay_Subp( input_thread_t * p_input ) ...@@ -207,7 +212,7 @@ void dvdplay_Subp( input_thread_t * p_input )
if( pi_palette ) if( pi_palette )
{ {
ADDES( i_id, VLC_FOURCC('s','p','u','b'), SPU_ES, ADDES( i_id, VLC_FOURCC('s','p','u','b'), SPU_ES,
p_attr->lang_code, sizeof(int) + 16*sizeof(u32) ); p_attr->lang_code, "", sizeof(int) + 16*sizeof(u32) );
*(int*)p_es->p_demux_data = 0xBeeF; *(int*)p_es->p_demux_data = 0xBeeF;
memcpy( (void*)p_es->p_demux_data + sizeof(int), memcpy( (void*)p_es->p_demux_data + sizeof(int),
pi_palette, 16*sizeof(u32) ); pi_palette, 16*sizeof(u32) );
...@@ -215,7 +220,7 @@ void dvdplay_Subp( input_thread_t * p_input ) ...@@ -215,7 +220,7 @@ void dvdplay_Subp( input_thread_t * p_input )
else else
{ {
ADDES( i_id, VLC_FOURCC('s','p','u','b'), SPU_ES, ADDES( i_id, VLC_FOURCC('s','p','u','b'), SPU_ES,
p_attr->lang_code, 0 ); p_attr->lang_code, "", 0 );
} }
} }
} }
......
...@@ -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, 2003 VideoLAN * Copyright (C) 2001, 2003 VideoLAN
* $Id: input.c,v 1.20 2003/05/04 22:42:14 gbazin Exp $ * $Id: input.c,v 1.21 2003/05/05 22:23:33 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -666,10 +666,9 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -666,10 +666,9 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
/* ES 0 -> video MPEG2 */ /* ES 0 -> video MPEG2 */
// IfoPrintVideo( p_dvd ); // IfoPrintVideo( p_dvd );
p_es = input_AddES( p_input, NULL, 0xe0, 0 ); p_es = input_AddES( p_input, NULL, 0xe0, VIDEO_ES, NULL, 0 );
p_es->i_stream_id = 0xe0; p_es->i_stream_id = 0xe0;
p_es->i_fourcc = VLC_FOURCC('m','p','g','v'); p_es->i_fourcc = VLC_FOURCC('m','p','g','v');
p_es->i_cat = VIDEO_ES;
#define audio_control \ #define audio_control \
p_dvd->p_vts_file->vts_pgcit->pgci_srp[pgc_id-1].pgc->audio_control[i-1] p_dvd->p_vts_file->vts_pgcit->pgci_srp[pgc_id-1].pgc->audio_control[i-1]
...@@ -687,42 +686,36 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -687,42 +686,36 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
i_audio_nb++; i_audio_nb++;
i_position = ( audio_control & 0x7F00 ) >> 8; i_position = ( audio_control & 0x7F00 ) >> 8;
msg_Dbg( p_input, "audio position %d", i_position ); msg_Dbg( p_input, "audio position %d", i_position );
switch( p_vts->vtsi_mat->vts_audio_attr[i-1].audio_format ) switch( p_vts->vtsi_mat->vts_audio_attr[i-1].audio_format )
{ {
case 0x00: /* A52 */ case 0x00: /* A52 */
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, AUDIO_ES,
DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ), 0 );
p_es->i_stream_id = 0xbd; p_es->i_stream_id = 0xbd;
p_es->i_fourcc = VLC_FOURCC('a','5','2','b'); p_es->i_fourcc = VLC_FOURCC('a','5','2','b');
p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) );
strcat( p_es->psz_desc, " (A52)" );
break; break;
case 0x02: case 0x02:
case 0x03: /* MPEG audio */ case 0x03: /* MPEG audio */
i_id = 0xc0 + i_position; i_id = 0xc0 + i_position;
p_es = input_AddES( p_input, NULL, i_id, 0 ); p_es = input_AddES( p_input, NULL, i_id, AUDIO_ES,
DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ), 0 );
p_es->i_stream_id = i_id; p_es->i_stream_id = i_id;
p_es->i_fourcc = VLC_FOURCC('m','p','g','a'); p_es->i_fourcc = VLC_FOURCC('m','p','g','a');
p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) );
strcat( p_es->psz_desc, " (mpeg)" );
break; break;
case 0x04: /* LPCM */ case 0x04: /* LPCM */
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, AUDIO_ES,
DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ), 0 );
p_es->i_stream_id = i_id; p_es->i_stream_id = i_id;
p_es->i_fourcc = VLC_FOURCC('l','p','c','b'); p_es->i_fourcc = VLC_FOURCC('l','p','c','b');
p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) );
strcat( p_es->psz_desc, " (lpcm)" );
break; break;
case 0x06: /* DTS */ case 0x06: /* DTS */
...@@ -779,12 +772,11 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -779,12 +772,11 @@ 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, SPU_ES,
DecodeLanguage(
p_vts->vtsi_mat->vts_subp_attr[i-1].lang_code ), 0 );
p_es->i_stream_id = 0xbd; p_es->i_stream_id = 0xbd;
p_es->i_fourcc = VLC_FOURCC('s','p','u','b'); p_es->i_fourcc = VLC_FOURCC('s','p','u','b');
p_es->i_cat = SPU_ES;
strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_subp_attr[i-1].lang_code ) );
} }
} }
#undef spu_control #undef spu_control
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* v4l.c : Video4Linux input module for vlc * v4l.c : Video4Linux input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: v4l.c,v 1.12 2003/05/03 12:36:17 fenrir Exp $ * $Id: v4l.c,v 1.13 2003/05/05 22:23:33 gbazin Exp $
* *
* Author: Samuel Hocevar <sam@zoy.org> * Author: Samuel Hocevar <sam@zoy.org>
* *
...@@ -1191,13 +1191,12 @@ static int DemuxOpen( vlc_object_t *p_this ) ...@@ -1191,13 +1191,12 @@ static int DemuxOpen( vlc_object_t *p_this )
{ {
es_descriptor_t *p_es; es_descriptor_t *p_es;
p_es = input_AddES( p_input,
p_input->stream.pp_programs[0], i + 1, 0 );
p_es->i_stream_id = i + 1;
if( !strncmp( p_peek, "auds", 4 ) ) if( !strncmp( p_peek, "auds", 4 ) )
{ {
#define wf ((WAVEFORMATEX*)p_es->p_waveformatex) #define wf ((WAVEFORMATEX*)p_es->p_waveformatex)
p_es->i_cat = AUDIO_ES; p_es = input_AddES( p_input, p_input->stream.pp_programs[0],
i + 1, AUDIO_ES, NULL, 0 );
p_es->i_stream_id = i + 1;
p_es->i_fourcc = p_es->i_fourcc =
VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] ); VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] );
...@@ -1220,7 +1219,9 @@ static int DemuxOpen( vlc_object_t *p_this ) ...@@ -1220,7 +1219,9 @@ static int DemuxOpen( vlc_object_t *p_this )
else if( !strncmp( p_peek, "vids", 4 ) ) else if( !strncmp( p_peek, "vids", 4 ) )
{ {
#define bih ((BITMAPINFOHEADER*)p_es->p_bitmapinfoheader) #define bih ((BITMAPINFOHEADER*)p_es->p_bitmapinfoheader)
p_es->i_cat = VIDEO_ES; p_es = input_AddES( p_input, p_input->stream.pp_programs[0],
i + 1, VIDEO_ES, NULL, 0 );
p_es->i_stream_id = i + 1;
p_es->i_fourcc = p_es->i_fourcc =
VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] ); VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* rc.c : remote control stdin/stdout plugin for vlc * rc.c : remote control stdin/stdout plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: rc.c,v 1.31 2003/05/04 22:42:15 gbazin Exp $ * $Id: rc.c,v 1.32 2003/05/05 22:23:34 gbazin Exp $
* *
* Authors: Peter Surda <shurdeek@panorama.sth.ac.at> * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
* *
...@@ -845,7 +845,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -845,7 +845,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
text.p_list->p_values[i].psz_string ); text.p_list->p_values[i].psz_string );
} }
var_Change( (vlc_object_t *)p_aout, psz_variable, VLC_VAR_FREELIST, var_Change( (vlc_object_t *)p_aout, psz_variable, VLC_VAR_FREELIST,
&val, NULL ); &val, &text );
printf( "+----[ end of %s ]\n", val_name.psz_string ); printf( "+----[ end of %s ]\n", val_name.psz_string );
if( val_name.psz_string ) free( val_name.psz_string ); if( val_name.psz_string ) free( val_name.psz_string );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* a52sys.c : A/52 input module for vlc * a52sys.c : A/52 input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: a52sys.c,v 1.2 2003/02/27 13:19:43 gbazin Exp $ * $Id: a52sys.c,v 1.3 2003/05/05 22:23:34 gbazin Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -103,10 +103,10 @@ static int Init( vlc_object_t * p_this ) ...@@ -103,10 +103,10 @@ static int Init( vlc_object_t * p_this )
input_AddProgram( p_input, 0, 0 ); input_AddProgram( p_input, 0, 0 );
p_input->stream.p_selected_program = p_input->stream.pp_programs[0]; p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xBD, 0 ); p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xBD,
AUDIO_ES, NULL, 0 );
p_es->i_stream_id = 0xBD; p_es->i_stream_id = 0xBD;
p_es->i_fourcc = VLC_FOURCC('a','5','2',' '); p_es->i_fourcc = VLC_FOURCC('a','5','2',' ');
p_es->i_cat = AUDIO_ES;
input_SelectES( p_input, p_es ); input_SelectES( p_input, p_es );
p_input->stream.p_selected_area->i_tell = 0; p_input->stream.p_selected_area->i_tell = 0;
p_input->stream.p_selected_program->b_is_ok = 1; p_input->stream.p_selected_program->b_is_ok = 1;
......