Commit b8a94ea5 authored by Christophe Massiot's avatar Christophe Massiot

* New --vlc-backwards-compat option, to go back to the old behavior with old

VLS's.
* Fixed a bug with non-ASCII characters in the OS X playlist.
* Fixed a warning on start-up.
parent e428120b
...@@ -37,6 +37,7 @@ struct module_symbols_t ...@@ -37,6 +37,7 @@ struct module_symbols_t
int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), int, vlc_bool_t ) ; int (* __vlc_thread_create_inner) ( vlc_object_t *, char *, int, char *, void * ( * ) ( void * ), int, vlc_bool_t ) ;
int (* __vlc_threads_end_inner) ( vlc_object_t * ) ; int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
int (* __vlc_threads_init_inner) ( vlc_object_t * ) ; int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
int (* aout_BufferPlay_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
int (* aout_FormatNbChannels_inner) ( audio_sample_format_t * p_format ) ; int (* aout_FormatNbChannels_inner) ( audio_sample_format_t * p_format ) ;
int (* aout_VolumeDown_inner) ( aout_instance_t *, int, audio_volume_t * ) ; int (* aout_VolumeDown_inner) ( aout_instance_t *, int, audio_volume_t * ) ;
int (* aout_VolumeGet_inner) ( aout_instance_t *, audio_volume_t * ) ; int (* aout_VolumeGet_inner) ( aout_instance_t *, audio_volume_t * ) ;
...@@ -111,7 +112,6 @@ struct module_symbols_t ...@@ -111,7 +112,6 @@ struct module_symbols_t
void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ; void (* __vlc_thread_join_inner) ( vlc_object_t *, char *, int ) ;
void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ; void (* __vlc_thread_ready_inner) ( vlc_object_t * ) ;
void (* aout_BufferDelete_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ; void (* aout_BufferDelete_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
void (* aout_BufferPlay_inner) ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) ;
void (* aout_DateInit_inner) ( audio_date_t *, u32 ) ; void (* aout_DateInit_inner) ( audio_date_t *, u32 ) ;
void (* aout_DateMove_inner) ( audio_date_t *, mtime_t ) ; void (* aout_DateMove_inner) ( audio_date_t *, mtime_t ) ;
void (* aout_DateSet_inner) ( audio_date_t *, mtime_t ) ; void (* aout_DateSet_inner) ( audio_date_t *, mtime_t ) ;
......
...@@ -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: ts.c,v 1.4 2002/08/30 22:22:24 massiot Exp $ * $Id: ts.c,v 1.5 2002/09/23 23:05:58 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>
...@@ -90,6 +90,12 @@ static void TS_DVBPSI_HandlePMT ( input_thread_t *, dvbpsi_pmt_t * ); ...@@ -90,6 +90,12 @@ static void TS_DVBPSI_HandlePMT ( input_thread_t *, dvbpsi_pmt_t * );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
#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.")
vlc_module_begin(); vlc_module_begin();
#if defined MODULE_NAME_IS_ts #if defined MODULE_NAME_IS_ts
set_description( _("ISO 13818-1 MPEG Transport Stream input") ); set_description( _("ISO 13818-1 MPEG Transport Stream input") );
...@@ -100,6 +106,8 @@ vlc_module_begin(); ...@@ -100,6 +106,8 @@ vlc_module_begin();
set_capability( "demux", 170 ); set_capability( "demux", 170 );
add_shortcut( "ts_dvbpsi" ); add_shortcut( "ts_dvbpsi" );
#endif #endif
add_bool( "vls-backwards-compat", 0, NULL,
VLS_BACKWARDS_COMPAT_TEXT, VLS_BACKWARDS_COMPAT_LONGTEXT );
set_callbacks( Activate, Deactivate ); set_callbacks( Activate, Deactivate );
vlc_module_end(); vlc_module_end();
...@@ -545,6 +553,7 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -545,6 +553,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;
vlc_bool_t b_vls_compat = config_GetInt( p_input, "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;
...@@ -625,7 +634,10 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -625,7 +634,10 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es )
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
break; break;
case A52_AUDIO_ES: case A52_AUDIO_ES:
p_new_es->i_fourcc = VLC_FOURCC('a','5','2',' '); if ( !b_vls_compat )
p_new_es->i_fourcc = VLC_FOURCC('a','5','2',' ');
else
p_new_es->i_fourcc = VLC_FOURCC('a','5','2','b');
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;
...@@ -635,7 +647,10 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -635,7 +647,10 @@ static void TSDecodePMT( input_thread_t * p_input, es_descriptor_t * p_es )
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
break; break;
case DVD_SPU_ES: case DVD_SPU_ES:
p_new_es->i_fourcc = VLC_FOURCC('s','p','u',' '); if ( !b_vls_compat )
p_new_es->i_fourcc = VLC_FOURCC('s','p','u',' ');
else
p_new_es->i_fourcc = VLC_FOURCC('s','p','u','b');
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;
...@@ -840,6 +855,7 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) ...@@ -840,6 +855,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;
vlc_bool_t b_vls_compat = config_GetInt( p_input, "vls-backwards-compat" );
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -883,12 +899,19 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt ) ...@@ -883,12 +899,19 @@ void TS_DVBPSI_HandlePMT( input_thread_t * p_input, dvbpsi_pmt_t * p_new_pmt )
p_new_es->i_cat = AUDIO_ES; p_new_es->i_cat = AUDIO_ES;
break; break;
case A52_AUDIO_ES: case A52_AUDIO_ES:
p_new_es->i_fourcc = VLC_FOURCC('a','5','2',' '); if ( !b_vls_compat )
p_new_es->i_fourcc = VLC_FOURCC('a','5','2',' ');
else
p_new_es->i_fourcc = VLC_FOURCC('a','5','2','b');
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:
p_new_es->i_fourcc = VLC_FOURCC('s','p','u',' '); case A52_AUDIO_ES:
if ( !b_vls_compat )
p_new_es->i_fourcc = VLC_FOURCC('s','p','u',' ');
else
p_new_es->i_fourcc = VLC_FOURCC('s','p','u','b');
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;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin * playlist.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: playlist.m,v 1.1 2002/08/04 17:23:43 sam Exp $ * $Id: playlist.m,v 1.2 2002/09/23 23:05:58 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
} }
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
o_value = [NSString stringWithCString: o_value = [NSString stringWithUTF8String:
p_playlist->pp_items[i_row]->psz_name]; p_playlist->pp_items[i_row]->psz_name];
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mixer.c : audio output mixing operations * mixer.c : audio output mixing operations
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: mixer.c,v 1.14 2002/09/20 23:27:04 massiot Exp $ * $Id: mixer.c,v 1.15 2002/09/23 23:05:58 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -304,12 +304,6 @@ int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier ) ...@@ -304,12 +304,6 @@ int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier )
{ {
float f_old = p_aout->mixer.f_multiplier; float f_old = p_aout->mixer.f_multiplier;
if ( p_aout->mixer.mixer.i_format != AOUT_FMT_FLOAT32 )
{
msg_Warn( p_aout, "MixerMultiplierSet called for non-float32 mixer" );
return -1;
}
aout_MixerDelete( p_aout ); aout_MixerDelete( p_aout );
p_aout->mixer.f_multiplier = f_multiplier; p_aout->mixer.f_multiplier = f_multiplier;
...@@ -332,12 +326,6 @@ int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier ) ...@@ -332,12 +326,6 @@ int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier )
*****************************************************************************/ *****************************************************************************/
int aout_MixerMultiplierGet( aout_instance_t * p_aout, float * pf_multiplier ) int aout_MixerMultiplierGet( aout_instance_t * p_aout, float * pf_multiplier )
{ {
if ( p_aout->mixer.mixer.i_format != AOUT_FMT_FLOAT32 )
{
msg_Warn( p_aout, "MixerMultiplierGet called for non-float32 mixer" );
return -1;
}
*pf_multiplier = p_aout->mixer.f_multiplier; *pf_multiplier = p_aout->mixer.f_multiplier;
return 0; return 0;
} }
......
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