Commit c87d50dd authored by Gildas Bazin's avatar Gildas Bazin

* ALL: changed the prototype of module_Need() to accept a "strict" boolean argument.
If "strict" is true and a module name is provided then module_Need() will only look for the specified module
If "strict" is false, then module_Need() will first look for the specified module and if it wasn't found, will continue with the other modules with the same "capability".
parent 577e22f2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.h : Module management functions. * modules.h : Module management functions.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.65 2003/10/04 12:25:00 sam Exp $ * $Id: modules.h,v 1.66 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -126,8 +126,8 @@ void __module_EndBank ( vlc_object_t * ); ...@@ -126,8 +126,8 @@ void __module_EndBank ( vlc_object_t * );
#define module_ResetBank(a) __module_ResetBank(VLC_OBJECT(a)) #define module_ResetBank(a) __module_ResetBank(VLC_OBJECT(a))
void __module_ResetBank ( vlc_object_t * ); void __module_ResetBank ( vlc_object_t * );
#define module_Need(a,b,c) __module_Need(VLC_OBJECT(a),b,c) #define module_Need(a,b,c,d) __module_Need(VLC_OBJECT(a),b,c,d)
VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char * ) ); VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, vlc_bool_t ) );
#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b) #define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) ); VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
/* demux.c: DVD demux functions. /* demux.c: DVD demux functions.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: demux.c,v 1.3 2003/09/07 22:49:05 fenrir Exp $ * $Id: demux.c,v 1.4 2004/03/03 20:39:51 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -85,7 +85,7 @@ int E_(DVDInit) ( vlc_object_t *p_this ) ...@@ -85,7 +85,7 @@ int E_(DVDInit) ( vlc_object_t *p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demux.c: demux functions for dvdplay. * demux.c: demux functions for dvdplay.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: demux.c,v 1.7 2003/09/07 22:49:05 fenrir Exp $ * $Id: demux.c,v 1.8 2004/03/03 20:39:51 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -92,7 +92,7 @@ int E_(InitDVD) ( vlc_object_t *p_this ) ...@@ -92,7 +92,7 @@ int E_(InitDVD) ( vlc_object_t *p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -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.23 2003/09/07 22:49:05 fenrir Exp $ * $Id: input.c,v 1.24 2004/03/03 20:39:51 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -121,7 +121,7 @@ int E_(InitDVD) ( vlc_object_t *p_this ) ...@@ -121,7 +121,7 @@ int E_(InitDVD) ( vlc_object_t *p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demux.c: demux functions for dvdplay. * demux.c: demux functions for dvdplay.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: demux.c,v 1.3 2003/12/05 04:24:47 rocky Exp $ * $Id: demux.c,v 1.4 2004/03/03 20:39:51 gbazin Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -95,7 +95,7 @@ int E_(InitVCD) ( vlc_object_t *p_this ) ...@@ -95,7 +95,7 @@ int E_(InitVCD) ( vlc_object_t *p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* udp.c * udp.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: udp.c,v 1.22 2004/03/03 10:51:55 massiot Exp $ * $Id: udp.c,v 1.23 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org> * Eric Petit <titer@videolan.org>
...@@ -203,7 +203,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -203,7 +203,7 @@ static int Open( vlc_object_t *p_this )
socket_desc.i_ttl = atoi( psz_val ); socket_desc.i_ttl = atoi( psz_val );
} }
p_sys->p_thread->p_private = (void*)&socket_desc; p_sys->p_thread->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_sys->p_thread, "network", "" ) ) ) if( !( p_network = module_Need( p_sys->p_thread, "network", NULL, 0 ) ) )
{ {
msg_Err( p_access, "failed to open a connection (udp)" ); msg_Err( p_access, "failed to open a connection (udp)" );
return VLC_EGENERIC; return VLC_EGENERIC;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* coreaudio.c resampler based on CoreAudio's AudioConverter * coreaudio.c resampler based on CoreAudio's AudioConverter
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: coreaudio.c,v 1.4 2003/05/11 01:00:26 massiot Exp $ * $Id: coreaudio.c,v 1.5 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -168,7 +168,7 @@ static int Create( vlc_object_t *p_this ) ...@@ -168,7 +168,7 @@ static int Create( vlc_object_t *p_this )
sizeof(audio_sample_format_t) ); sizeof(audio_sample_format_t) );
p_sys->p_secondary_resampler->p_module p_sys->p_secondary_resampler->p_module
= module_Need( p_sys->p_secondary_resampler, "audio filter", = module_Need( p_sys->p_secondary_resampler, "audio filter",
"ugly_resampler" ); "ugly_resampler", VLC_TRUE );
if ( p_sys->p_secondary_resampler->p_module == NULL ) if ( p_sys->p_secondary_resampler->p_module == NULL )
{ {
vlc_object_detach( p_sys->p_secondary_resampler ); vlc_object_detach( p_sys->p_secondary_resampler );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* a52.c : raw A/52 stream input module for vlc * a52.c : raw A/52 stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: a52.c,v 1.7 2004/03/03 11:40:19 fenrir Exp $ * $Id: a52.c,v 1.8 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -165,7 +165,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -165,7 +165,7 @@ static int Open( vlc_object_t * p_this )
VLC_FOURCC( 'a', '5', '2', ' ' ) ); VLC_FOURCC( 'a', '5', '2', ' ' ) );
p_sys->p_packetizer->p_module = p_sys->p_packetizer->p_module =
module_Need( p_sys->p_packetizer, "packetizer", NULL ); module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module ) if( !p_sys->p_packetizer->p_module )
{ {
msg_Err( p_demux, "cannot find A52 packetizer" ); msg_Err( p_demux, "cannot find A52 packetizer" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aac.c : Raw aac Stream input module for vlc * aac.c : Raw aac Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: aac.c,v 1.10 2004/03/03 11:40:19 fenrir Exp $ * $Id: aac.c,v 1.11 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -126,7 +126,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -126,7 +126,7 @@ static int Open( vlc_object_t * p_this )
} }
/* skip possible id3 header */ /* skip possible id3 header */
if( ( p_id3 = module_Need( p_demux, "id3", NULL ) ) ) if( ( p_id3 = module_Need( p_demux, "id3", NULL, 0 ) ) )
{ {
module_Unneed( p_demux, p_id3 ); module_Unneed( p_demux, p_id3 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demuxstream.c: Read an MPEG stream from the satellite and stream it * demuxstream.c: Read an MPEG stream from the satellite and stream it
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: demuxstream.c,v 1.2 2004/01/25 20:05:28 hartman Exp $ * $Id: demuxstream.c,v 1.3 2004/03/03 20:39:51 gbazin 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>
...@@ -217,8 +217,7 @@ static int Activate( vlc_object_t * p_this ) ...@@ -217,8 +217,7 @@ static int Activate( vlc_object_t * p_this )
socket_desc.i_bind_port = 0; socket_desc.i_bind_port = 0;
socket_desc.i_ttl = 0; socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc; p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input, if( !( p_network = module_Need( p_input, "network", NULL, 0 ) ) )
"network", "" ) ) )
{ {
msg_Err( p_input, "failed to open a connection (udp)" ); msg_Err( p_input, "failed to open a connection (udp)" );
return( VLC_EGENERIC ); return( VLC_EGENERIC );
...@@ -269,7 +268,7 @@ static int Activate( vlc_object_t * p_this ) ...@@ -269,7 +268,7 @@ static int Activate( vlc_object_t * p_this )
p_demux->i_handle = socket_desc.i_handle; p_demux->i_handle = socket_desc.i_handle;
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dts.c : raw DTS stream input module for vlc * dts.c : raw DTS stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: dts.c,v 1.11 2004/03/03 11:40:19 fenrir Exp $ * $Id: dts.c,v 1.12 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -173,7 +173,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -173,7 +173,7 @@ static int Open( vlc_object_t * p_this )
VLC_FOURCC( 'd', 't', 's', ' ' ) ); VLC_FOURCC( 'd', 't', 's', ' ' ) );
p_sys->p_packetizer->p_module = p_sys->p_packetizer->p_module =
module_Need( p_sys->p_packetizer, "packetizer", NULL ); module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module ) if( !p_sys->p_packetizer->p_module )
{ {
msg_Err( p_demux, "cannot find DTS packetizer" ); msg_Err( p_demux, "cannot find DTS packetizer" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* flac.c : FLAC demux module for vlc * flac.c : FLAC demux module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: flac.c,v 1.12 2004/03/03 11:40:19 fenrir Exp $ * $Id: flac.c,v 1.13 2004/03/03 20:39:51 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -136,7 +136,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -136,7 +136,7 @@ static int Open( vlc_object_t * p_this )
STREAMINFO_SIZE + 4 ); STREAMINFO_SIZE + 4 );
p_sys->p_packetizer->p_module = p_sys->p_packetizer->p_module =
module_Need( p_sys->p_packetizer, "packetizer", NULL ); module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module ) if( !p_sys->p_packetizer->p_module )
{ {
if( p_sys->p_packetizer->fmt_in.p_extra ) if( p_sys->p_packetizer->fmt_in.p_extra )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* m4v.c : MPEG-4 Video demuxer * m4v.c : MPEG-4 Video demuxer
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: m4v.c,v 1.11 2003/12/22 02:24:52 sam Exp $ * $Id: m4v.c,v 1.12 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -122,10 +122,11 @@ static int Open( vlc_object_t * p_this ) ...@@ -122,10 +122,11 @@ static int Open( vlc_object_t * p_this )
p_sys->p_packetizer->pf_decode_video = NULL; p_sys->p_packetizer->pf_decode_video = NULL;
p_sys->p_packetizer->pf_decode_sub = NULL; p_sys->p_packetizer->pf_decode_sub = NULL;
p_sys->p_packetizer->pf_packetize = NULL; p_sys->p_packetizer->pf_packetize = NULL;
es_format_Init( &p_sys->p_packetizer->fmt_in, VIDEO_ES, VLC_FOURCC( 'm', 'p', '4', 'v' ) ); es_format_Init( &p_sys->p_packetizer->fmt_in, VIDEO_ES,
VLC_FOURCC( 'm', 'p', '4', 'v' ) );
es_format_Init( &p_sys->p_packetizer->fmt_out, UNKNOWN_ES, 0 ); es_format_Init( &p_sys->p_packetizer->fmt_out, UNKNOWN_ES, 0 );
p_sys->p_packetizer->p_module = p_sys->p_packetizer->p_module =
module_Need( p_sys->p_packetizer, "packetizer", NULL ); module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( p_sys->p_packetizer->p_module == NULL) if( p_sys->p_packetizer->p_module == NULL)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpga.c : MPEG-I/II Audio input module for vlc * mpga.c : MPEG-I/II Audio input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * Copyright (C) 2001-2004 VideoLAN
* $Id: mpga.c,v 1.17 2004/03/03 11:41:04 fenrir Exp $ * $Id: mpga.c,v 1.18 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this )
} }
/* skip possible id3 header */ /* skip possible id3 header */
if( ( p_id3 = module_Need( p_demux, "id3", NULL ) ) ) if( ( p_id3 = module_Need( p_demux, "id3", NULL, 0 ) ) )
{ {
module_Unneed( p_demux, p_id3 ); module_Unneed( p_demux, p_id3 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpgv.c : MPEG-I/II Video demuxer * mpgv.c : MPEG-I/II Video demuxer
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: mpgv.c,v 1.5 2004/01/25 20:05:28 hartman Exp $ * $Id: mpgv.c,v 1.6 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -135,10 +135,11 @@ static int Open( vlc_object_t * p_this ) ...@@ -135,10 +135,11 @@ static int Open( vlc_object_t * p_this )
p_sys->p_packetizer->pf_decode_video = NULL; p_sys->p_packetizer->pf_decode_video = NULL;
p_sys->p_packetizer->pf_decode_sub = NULL; p_sys->p_packetizer->pf_decode_sub = NULL;
p_sys->p_packetizer->pf_packetize = NULL; p_sys->p_packetizer->pf_packetize = NULL;
es_format_Init( &p_sys->p_packetizer->fmt_in, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) ); es_format_Init( &p_sys->p_packetizer->fmt_in, VIDEO_ES,
VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
es_format_Init( &p_sys->p_packetizer->fmt_out, UNKNOWN_ES, 0 ); es_format_Init( &p_sys->p_packetizer->fmt_out, UNKNOWN_ES, 0 );
p_sys->p_packetizer->p_module = p_sys->p_packetizer->p_module =
module_Need( p_sys->p_packetizer, "packetizer", NULL ); module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( p_sys->p_packetizer->p_module == NULL) if( p_sys->p_packetizer->p_module == NULL)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ps.c : Program Stream input module for vlc * ps.c : Program Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2004, 2004 VideoLAN * Copyright (C) 2000-2004, 2004 VideoLAN
* $Id: ps.c,v 1.17 2004/01/25 20:05:28 hartman Exp $ * $Id: ps.c,v 1.18 2004/03/03 20:39:52 gbazin Exp $
* *
* Author: Christophe Massiot <massiot@via.ecp.fr> * Author: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -123,7 +123,7 @@ static int Activate( vlc_object_t * p_this ) ...@@ -123,7 +123,7 @@ static int Activate( vlc_object_t * p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -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-2004 VideoLAN * Copyright (C) 2000-2004 VideoLAN
* $Id: ts.c,v 1.46 2004/01/25 20:05:28 hartman Exp $ * $Id: ts.c,v 1.47 2004/03/03 20:39:52 gbazin 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>
...@@ -230,7 +230,7 @@ static int Activate( vlc_object_t * p_this ) ...@@ -230,7 +230,7 @@ static int Activate( vlc_object_t * p_this )
} }
p_input->p_private = (void*)&p_demux->mpeg; p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_Need( p_input, "mpeg-system", NULL ); p_demux->p_module = module_Need( p_input, "mpeg-system", NULL, 0 );
if( p_demux->p_module == NULL ) if( p_demux->p_module == NULL )
{ {
free( p_input->p_demux_data ); free( p_input->p_demux_data );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* sub.h * sub.h
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * Copyright (C) 2001-2004 VideoLAN
* $Id: sub.h,v 1.19 2004/01/27 13:10:29 fenrir Exp $ * $Id: sub.h,v 1.20 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -91,7 +91,7 @@ static inline subtitle_demux_t *subtitle_New( input_thread_t *p_input, ...@@ -91,7 +91,7 @@ static inline subtitle_demux_t *subtitle_New( input_thread_t *p_input,
p_sub = vlc_object_create( p_input, sizeof( subtitle_demux_t ) ); p_sub = vlc_object_create( p_input, sizeof( subtitle_demux_t ) );
p_sub->psz_object_name = "subtitle demux"; p_sub->psz_object_name = "subtitle demux";
vlc_object_attach( p_sub, p_input ); vlc_object_attach( p_sub, p_input );
p_sub->p_module = module_Need( p_sub, "subtitle demux", "" ); p_sub->p_module = module_Need( p_sub, "subtitle demux", NULL, 0 );
if( p_sub->p_module && if( p_sub->p_module &&
p_sub->pf_open( p_sub, p_input, psz_name, i_microsecperframe ) >=0 ) p_sub->pf_open( p_sub, p_input, psz_name, i_microsecperframe ) >=0 )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc * gnome.c : Gnome plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.17 2004/01/25 18:53:07 gbazin Exp $ * $Id: gnome.c,v 1.18 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -98,7 +98,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -98,7 +98,8 @@ static int Open( vlc_object_t *p_this )
return VLC_ENOMEM; return VLC_ENOMEM;
} }
p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gnome" ); p_intf->p_sys->p_gtk_main =
module_Need( p_this, "gui-helper", "gnome", VLC_TRUE );
if( p_intf->p_sys->p_gtk_main == NULL ) if( p_intf->p_sys->p_gtk_main == NULL )
{ {
free( p_intf->p_sys ); free( p_intf->p_sys );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc * gtk.c : Gtk+ plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.22 2004/01/25 18:53:07 gbazin Exp $ * $Id: gtk.c,v 1.23 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -97,7 +97,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -97,7 +97,8 @@ static int Open( vlc_object_t *p_this )
} }
#ifdef NEED_GTK_MAIN #ifdef NEED_GTK_MAIN
p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gtk" ); p_intf->p_sys->p_gtk_main =
module_Need( p_this, "gui-helper", "gtk", VLC_TRUE );
if( p_intf->p_sys->p_gtk_main == NULL ) if( p_intf->p_sys->p_gtk_main == NULL )
{ {
free( p_intf->p_sys ); free( p_intf->p_sys );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome2.c : GNOME 2 plugin for vlc * gnome2.c : GNOME 2 plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gnome2.c,v 1.2 2003/03/30 18:14:37 gbazin Exp $ * $Id: gnome2.c,v 1.3 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -83,7 +83,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -83,7 +83,8 @@ static int Open( vlc_object_t *p_this )
} }
#ifdef NEED_GTK2_MAIN #ifdef NEED_GTK2_MAIN
p_intf->p_sys->p_gui_helper = module_Need( p_this, "gui-helper", "gnome2" ); p_intf->p_sys->p_gui_helper =
module_Need( p_this, "gui-helper", "gnome2", VLC_TRUE );
if( p_intf->p_sys->p_gui_helper == NULL ) if( p_intf->p_sys->p_gui_helper == NULL )
{ {
free( p_intf->p_sys ); free( p_intf->p_sys );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2.c : Gtk2 plugin for vlc * gtk2.c : Gtk2 plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2.c,v 1.2 2003/03/30 18:14:37 gbazin Exp $ * $Id: gtk2.c,v 1.3 2004/03/03 20:39:52 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -84,7 +84,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -84,7 +84,8 @@ static int Open( vlc_object_t *p_this )
} }
#ifdef NEED_GTK2_MAIN #ifdef NEED_GTK2_MAIN
p_intf->p_sys->p_gui_helper = module_Need( p_this, "gui-helper", "gtk2" ); p_intf->p_sys->p_gui_helper =
module_Need( p_this, "gui-helper", "gtk2", VLC_TRUE );
if( p_intf->p_sys->p_gui_helper == NULL ) if( p_intf->p_sys->p_gui_helper == NULL )
{ {
free( p_intf->p_sys );