Commit 0b88e775 authored by Christophe Massiot's avatar Christophe Massiot

* demuxes: Worked around a bug in old VLC and VLS by changing TS stream types

  (see my last mail).
* aout: Rewrote our whole lock policy. The output thread now doesn't require
  the mixer_lock, which might avoid delays. We will also be able to change
  the filter pipelines at runtime.
parent b7d33a0d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_internal.h : internal defines for audio output * aout_internal.h : internal defines for audio output
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: aout_internal.h,v 1.12 2002/08/25 09:39:59 sam Exp $ * $Id: aout_internal.h,v 1.13 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -126,6 +126,10 @@ typedef struct aout_mixer_t ...@@ -126,6 +126,10 @@ typedef struct aout_mixer_t
*****************************************************************************/ *****************************************************************************/
struct aout_input_t struct aout_input_t
{ {
/* When this lock is taken, the pipeline cannot be changed by a
* third-party. */
vlc_mutex_t lock;
audio_sample_format_t input; audio_sample_format_t input;
aout_alloc_t input_alloc; aout_alloc_t input_alloc;
...@@ -166,16 +170,26 @@ struct aout_instance_t ...@@ -166,16 +170,26 @@ struct aout_instance_t
{ {
VLC_COMMON_MEMBERS VLC_COMMON_MEMBERS
/* Locks : please note that if you need several of these locks, it is
* mandatory (to avoid deadlocks) to take them in the following order :
* p_input->lock, mixer_lock, output_fifo_lock, input_fifo_lock.
* --Meuuh */
/* When input_fifos_lock is taken, none of the p_input->fifo structures
* can be read or modified by a third-party thread. */
vlc_mutex_t input_fifos_lock;
/* When mixer_lock is taken, all decoder threads willing to mix a
* buffer must wait until it is released. The output pipeline cannot
* be modified. No input stream can be added or removed. */
vlc_mutex_t mixer_lock;
/* When output_fifo_lock is taken, the p_aout->output.fifo structure
* cannot be read or written by a third-party thread. */
vlc_mutex_t output_fifo_lock;
/* Input streams & pre-filters */ /* Input streams & pre-filters */
vlc_mutex_t input_lock;
vlc_cond_t input_signal;
int i_inputs_active;
vlc_bool_t b_change_requested;
aout_input_t * pp_inputs[AOUT_MAX_INPUTS]; aout_input_t * pp_inputs[AOUT_MAX_INPUTS];
int i_nb_inputs; int i_nb_inputs;
/* Mixer */ /* Mixer */
vlc_mutex_t mixer_lock;
aout_mixer_t mixer; aout_mixer_t mixer;
/* Output plug-in */ /* Output plug-in */
......
...@@ -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.70 2002/08/26 23:00:22 massiot Exp $ * $Id: input_ext-dec.h,v 1.71 2002/08/30 22:22:24 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>
...@@ -25,18 +25,6 @@ ...@@ -25,18 +25,6 @@
#ifndef _VLC_INPUT_EXT_DEC_H #ifndef _VLC_INPUT_EXT_DEC_H
#define _VLC_INPUT_EXT_DEC_H 1 #define _VLC_INPUT_EXT_DEC_H 1
/* ES streams types - see ISO/IEC 13818-1 table 2-29 numbers.
* these values are used in src/input/mpeg_system.c, and in
* the following plugins: mpeg_ts, mpeg_ts_dvbpsi, input_satellite. */
#define MPEG1_VIDEO_ES 0x01
#define MPEG2_VIDEO_ES 0x02
#define MPEG1_AUDIO_ES 0x03
#define MPEG2_AUDIO_ES 0x04
#define A52_AUDIO_ES 0x81
/* These ones might violate the norm : */
#define DVD_SPU_ES 0x82
#define LPCM_AUDIO_ES 0x83
/* Structures exported to the decoders */ /* Structures exported to the decoders */
/***************************************************************************** /*****************************************************************************
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.25 2002/08/29 23:53:22 massiot Exp $ * $Id: vlc_common.h,v 1.26 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -133,12 +133,20 @@ typedef s64 mtime_t; ...@@ -133,12 +133,20 @@ typedef s64 mtime_t;
*****************************************************************************/ *****************************************************************************/
typedef u32 vlc_fourcc_t; typedef u32 vlc_fourcc_t;
#define VLC_FOURCC( a, b, c, d ) \ #ifdef WORDS_BIGENDIAN
( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) ) # define VLC_FOURCC( a, b, c, d ) \
( ((u32)d) | ( ((u32)c) << 8 ) | ( ((u32)b) << 16 ) | ( ((u32)a) << 24 ) )
# define VLC_TWOCC( a, b ) \
( (u16)(b) | ( (u16)(a) << 8 ) )
#define VLC_TWOCC( a, b ) \ #else
# define VLC_FOURCC( a, b, c, d ) \
( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) )
# define VLC_TWOCC( a, b ) \
( (u16)(a) | ( (u16)(b) << 8 ) ) ( (u16)(a) | ( (u16)(b) << 8 ) )
#endif
/***************************************************************************** /*****************************************************************************
* Classes declaration * Classes declaration
*****************************************************************************/ *****************************************************************************/
......
/* 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.1 2002/08/04 17:23:41 sam Exp $ * $Id: es.c,v 1.2 2002/08/30 22:22:24 massiot Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -137,7 +137,7 @@ void DVDReadAudio( input_thread_t * p_input ) ...@@ -137,7 +137,7 @@ 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',' '), AUDIO_ES, i_lang, 0 ); VLC_FOURCC('a','5','2','b'), AUDIO_ES, i_lang, 0 );
strcat( p_es->psz_desc, " (A52)" ); strcat( p_es->psz_desc, " (A52)" );
break; break;
...@@ -150,13 +150,15 @@ void DVDReadAudio( input_thread_t * p_input ) ...@@ -150,13 +150,15 @@ 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,
VLC_FOURCC('l','p','c','m'), AUDIO_ES, i_lang, 0 ); VLC_FOURCC('l','p','c','b'), AUDIO_ES, i_lang, 0 );
strcat( p_es->psz_desc, " (lpcm)" ); strcat( p_es->psz_desc, " (lpcm)" );
break; break;
case 0x06: /* DTS */ case 0x06: /* DTS */
i_id = ( ( 0x88 + audio_status.i_position ) << 8 ) | 0xbd; ADDES( 0xbd, 0x88 + audio_status.i_position,
msg_Err( p_input, "DTS audio not handled yet (0x%x)", i_id ); VLC_FOURCC('d','t','s','b'), AUDIO_ES, i_lang, 0 );
strcat( p_es->psz_desc, " (dts)" );
break; break;
default: default:
i_id = 0; i_id = 0;
...@@ -219,7 +221,7 @@ void DVDReadSPU( input_thread_t * p_input ) ...@@ -219,7 +221,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',' '), 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;
...@@ -228,7 +230,7 @@ void DVDReadSPU( input_thread_t * p_input ) ...@@ -228,7 +230,7 @@ void DVDReadSPU( input_thread_t * p_input )
} }
else else
{ {
ADDES( 0xbd, 0x20 + i_id, VLC_FOURCC('s','p','u',' '), 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 );
} }
} }
...@@ -273,13 +275,13 @@ void DVDLaunchDecoders( input_thread_t * p_input ) ...@@ -273,13 +275,13 @@ void DVDLaunchDecoders( input_thread_t * p_input )
{ {
int i_a52 = i_audio; int i_a52 = i_audio;
while( ( p_input->stream.pp_es[i_a52]->i_fourcc != while( ( p_input->stream.pp_es[i_a52]->i_fourcc !=
VLC_FOURCC('a','5','2',' ') ) && ( i_a52 <= VLC_FOURCC('a','5','2','b') ) && ( i_a52 <=
p_dvd->p_ifo->vts.manager_inf.i_audio_nb ) ) p_dvd->p_ifo->vts.manager_inf.i_audio_nb ) )
{ {
i_a52++; i_a52++;
} }
if( p_input->stream.pp_es[i_a52]->i_fourcc if( p_input->stream.pp_es[i_a52]->i_fourcc
== VLC_FOURCC('a','5','2',' ') ) == VLC_FOURCC('a','5','2','b') )
{ {
input_SelectES( p_input, input_SelectES( p_input,
p_input->stream.pp_es[i_a52] ); p_input->stream.pp_es[i_a52] );
...@@ -308,7 +310,7 @@ void DVDLaunchDecoders( input_thread_t * p_input ) ...@@ -308,7 +310,7 @@ void DVDLaunchDecoders( input_thread_t * p_input )
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_fourcc if ( p_input->stream.pp_es[i]->i_fourcc
== VLC_FOURCC('s','p','u',' ') ) == VLC_FOURCC('s','p','u','b') )
{ {
j++; j++;
if ( i_spu == j ) break; if ( i_spu == j ) break;
......
...@@ -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.2 2002/08/07 00:29:36 sam Exp $ * $Id: es.c,v 1.3 2002/08/30 22:22:24 massiot Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -143,7 +143,7 @@ void dvdplay_Audio( input_thread_t * p_input ) ...@@ -143,7 +143,7 @@ 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',' '), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('a','5','2','b'), AUDIO_ES, i_lang, 0 );
strcat( p_es->psz_desc, " (A52)" ); strcat( p_es->psz_desc, " (A52)" );
break; break;
...@@ -154,16 +154,19 @@ void dvdplay_Audio( input_thread_t * p_input ) ...@@ -154,16 +154,19 @@ void dvdplay_Audio( input_thread_t * p_input )
break; break;
case 0x04: /* LPCM */ case 0x04: /* LPCM */
ADDES( i_id, VLC_FOURCC('l','p','c','m'), AUDIO_ES, i_lang, 0 ); ADDES( i_id, VLC_FOURCC('l','p','c','b'), AUDIO_ES, i_lang, 0 );
strcat( p_es->psz_desc, " (lpcm)" ); strcat( p_es->psz_desc, " (lpcm)" );
break; break;
case 0x05: /* SDDS */ case 0x05: /* SDDS */
msg_Warn( p_input, "SDDS audio not handled" ); ADDES( i_id, VLC_FOURCC('s','d','d','b'), AUDIO_ES, i_lang, 0 );
strcat( p_es->psz_desc, " (sdds)" );
break; break;
case 0x06: /* DTS */ case 0x06: /* DTS */
msg_Warn( p_input, "DTS audio not handled yet" ADDES( i_id, VLC_FOURCC('d','t','s','b'), AUDIO_ES, i_lang, 0 );
"(0x%x)", i_id ); strcat( p_es->psz_desc, " (dts)" );
break; break;
default: default:
i_id = 0; i_id = 0;
...@@ -203,7 +206,7 @@ void dvdplay_Subp( input_thread_t * p_input ) ...@@ -203,7 +206,7 @@ void dvdplay_Subp( input_thread_t * p_input )
if( pi_palette ) if( pi_palette )
{ {
ADDES( i_id, VLC_FOURCC('s','p','u',' '), 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),
...@@ -211,7 +214,7 @@ void dvdplay_Subp( input_thread_t * p_input ) ...@@ -211,7 +214,7 @@ void dvdplay_Subp( input_thread_t * p_input )
} }
else else
{ {
ADDES( i_id, VLC_FOURCC('s','p','u',' '), SPU_ES, ADDES( i_id, VLC_FOURCC('s','p','u','b'), SPU_ES,
p_attr->lang_code, 0 ); p_attr->lang_code, 0 );
} }
} }
...@@ -250,12 +253,12 @@ void dvdplay_LaunchDecoders( input_thread_t * p_input ) ...@@ -250,12 +253,12 @@ void dvdplay_LaunchDecoders( input_thread_t * p_input )
while( ( i_a52 < p_dvd->i_audio_nb ) && while( ( i_a52 < p_dvd->i_audio_nb ) &&
( p_input->stream.pp_es[i_a52]->i_fourcc != ( p_input->stream.pp_es[i_a52]->i_fourcc !=
VLC_FOURCC('a','5','2',' ') ) ) VLC_FOURCC('a','5','2','b') ) )
{ {
i_a52++; i_a52++;
} }
if( p_input->stream.pp_es[i_a52]->i_fourcc == if( p_input->stream.pp_es[i_a52]->i_fourcc ==
VLC_FOURCC('a','5','2',' ') ) VLC_FOURCC('a','5','2','b') )
{ {
input_SelectES( p_input, input_SelectES( p_input,
p_input->stream.pp_es[i_a52] ); p_input->stream.pp_es[i_a52] );
......
...@@ -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.c,v 1.3 2002/08/29 23:53:22 massiot Exp $ * $Id: input.c,v 1.4 2002/08/30 22:22:24 massiot Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -679,7 +679,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -679,7 +679,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_fourcc = VLC_FOURCC('a','5','2',' '); p_es->i_fourcc = VLC_FOURCC('a','5','2','b');
p_es->i_cat = AUDIO_ES; p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage( strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) ); p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) );
...@@ -703,7 +703,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -703,7 +703,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_fourcc = VLC_FOURCC('l','p','c','m'); p_es->i_fourcc = VLC_FOURCC('l','p','c','b');
p_es->i_cat = AUDIO_ES; p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, DecodeLanguage( strcpy( p_es->psz_desc, DecodeLanguage(
p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) ); p_vts->vtsi_mat->vts_audio_attr[i-1].lang_code ) );
...@@ -766,7 +766,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -766,7 +766,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_fourcc = VLC_FOURCC('s','p','u',' '); p_es->i_fourcc = VLC_FOURCC('s','p','u','b');
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 ) );
...@@ -1226,13 +1226,13 @@ static void DvdReadLauchDecoders( input_thread_t * p_input ) ...@@ -1226,13 +1226,13 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
{ {
int i_a52 = i_audio; int i_a52 = i_audio;
while( ( p_input->stream.pp_es[i_a52]->i_fourcc != while( ( p_input->stream.pp_es[i_a52]->i_fourcc !=
VLC_FOURCC('a','5','2',' ') ) && ( i_a52 <= VLC_FOURCC('a','5','2','b') ) && ( i_a52 <=
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_a52++; i_a52++;
} }
if( p_input->stream.pp_es[i_a52]->i_fourcc if( p_input->stream.pp_es[i_a52]->i_fourcc
== VLC_FOURCC('a','5','2',' ') ) == VLC_FOURCC('a','5','2','b') )
{ {
input_SelectES( p_input, input_SelectES( p_input,
p_input->stream.pp_es[i_a52] ); p_input->stream.pp_es[i_a52] );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* file.c : audio output which writes the samples to a file * file.c : audio output which writes the samples to a file
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: file.c,v 1.8 2002/08/19 23:12:57 massiot Exp $ * $Id: file.c,v 1.9 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -150,8 +150,6 @@ static void Play( aout_instance_t * p_aout ) ...@@ -150,8 +150,6 @@ static void Play( aout_instance_t * p_aout )
{ {
aout_buffer_t * p_buffer; aout_buffer_t * p_buffer;
/* We don't need the mixer lock, since Play is entered _with_ the
* mixer lock. */
p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo );
if( fwrite( p_buffer->p_buffer, p_buffer->i_nb_bytes, 1, if( fwrite( p_buffer->p_buffer, p_buffer->i_nb_bytes, 1,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* sdl.c : SDL audio output plugin for vlc * sdl.c : SDL audio output plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2002 VideoLAN * Copyright (C) 2000-2002 VideoLAN
* $Id: sdl.c,v 1.7 2002/08/25 16:55:55 sam Exp $ * $Id: sdl.c,v 1.8 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -167,9 +167,9 @@ static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len ) ...@@ -167,9 +167,9 @@ static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len )
* hardware latency, or the buffer state. So we just pop data and throw * hardware latency, or the buffer state. So we just pop data and throw
* it at SDL's face. Nah. */ * it at SDL's face. Nah. */
vlc_mutex_lock( &p_aout->mixer_lock ); vlc_mutex_lock( &p_aout->output_fifo_lock );
p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo ); p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo );
vlc_mutex_unlock( &p_aout->mixer_lock ); vlc_mutex_unlock( &p_aout->output_fifo_lock );
if ( p_buffer != NULL ) if ( p_buffer != NULL )
{ {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (http://liba52.sf.net/). * (http://liba52.sf.net/).
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: a52.c,v 1.7 2002/08/26 23:00:22 massiot Exp $ * $Id: a52.c,v 1.8 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -118,7 +118,8 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -118,7 +118,8 @@ static int OpenDecoder( vlc_object_t *p_this )
{ {
decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this; decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this;
if( p_fifo->i_fourcc != VLC_FOURCC('a','5','2',' ') ) if( p_fifo->i_fourcc != VLC_FOURCC('a','5','2',' ')
&& p_fifo->i_fourcc != VLC_FOURCC('a','5','2','b') )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* a52old.c: A52 decoder module main file * a52old.c: A52 decoder module main file
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: a52old.c,v 1.5 2002/08/26 23:00:22 massiot Exp $ * $Id: a52old.c,v 1.6 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Michel Lespinasse <walken@zoy.org> * Authors: Michel Lespinasse <walken@zoy.org>
* *
...@@ -77,7 +77,8 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -77,7 +77,8 @@ static int OpenDecoder( vlc_object_t *p_this )
{ {
decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this; decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this;
if( p_fifo->i_fourcc != VLC_FOURCC('a','5','2',' ') ) if( p_fifo->i_fourcc != VLC_FOURCC('a','5','2',' ')
&& p_fifo->i_fourcc != VLC_FOURCC('a','5','2','b') )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* lpcm.c: lpcm decoder module * lpcm.c: lpcm decoder module
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm.c,v 1.2 2002/08/11 21:59:46 massiot Exp $ * $Id: lpcm.c,v 1.3 2002/08/30 22:22:24 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org> * Henri Fallon <henri@videolan.org>
...@@ -64,7 +64,8 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -64,7 +64,8 @@ static int OpenDecoder( vlc_object_t *p_this )
{ {
decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this; decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this;
if( p_fifo->i_fourcc != VLC_FOURCC('l','p','c','m') ) if( p_fifo->i_fourcc != VLC_FOURCC('l','p','c','m')
&& p_fifo->i_fourcc != VLC_FOURCC('l','p','c','b') )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* spdif.c: A/52 pass-through to external decoder with enabled soundcard * spdif.c: A/52 pass-through to external decoder with enabled soundcard
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2002 VideoLAN * Copyright (C) 2001-2002 VideoLAN
* $Id: spdif.c,v 1.7 2002/08/26 23:00:22 massiot Exp $ * $Id: spdif.c,v 1.8 2002/08/30 22:22:24 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>
...@@ -100,7 +100,8 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -100,7 +100,8 @@ static int OpenDecoder( vlc_object_t *p_this )
{ {
decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this; decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this;
if( p_fifo->i_fourcc != VLC_FOURCC('a','5','2',' ') ) if( p_fifo->i_fourcc != VLC_FOURCC('a','5','2',' ')
&& p_fifo->i_fourcc != VLC_FOURCC('a','5','2','b') )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* spudec.c : SPU decoder thread * spudec.c : SPU decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: spudec.c,v 1.2 2002/08/16 03:07:56 sam Exp $ * $Id: spudec.c,v 1.3 2002/08/30 22:22:24 massiot Exp $
* *