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 @@
* modules.h : Module management functions.
*****************************************************************************
* 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>
*
......@@ -126,8 +126,8 @@ void __module_EndBank ( vlc_object_t * );
#define module_ResetBank(a) __module_ResetBank(VLC_OBJECT(a))
void __module_ResetBank ( vlc_object_t * );
#define module_Need(a,b,c) __module_Need(VLC_OBJECT(a),b,c)
VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char * ) );
#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_bool_t ) );
#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
/* demux.c: DVD demux functions.
*****************************************************************************
* 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>
*
......@@ -85,7 +85,7 @@ int E_(DVDInit) ( vlc_object_t *p_this )
}
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 )
{
free( p_input->p_demux_data );
......
......@@ -2,7 +2,7 @@
* demux.c: demux functions for dvdplay.
*****************************************************************************
* 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>
*
......@@ -92,7 +92,7 @@ int E_(InitDVD) ( vlc_object_t *p_this )
}
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 )
{
free( p_input->p_demux_data );
......
......@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* 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>
*
......@@ -121,7 +121,7 @@ int E_(InitDVD) ( vlc_object_t *p_this )
}
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 )
{
free( p_input->p_demux_data );
......
......@@ -2,7 +2,7 @@
* demux.c: demux functions for dvdplay.
*****************************************************************************
* 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>
*
......@@ -95,7 +95,7 @@ int E_(InitVCD) ( vlc_object_t *p_this )
}
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 )
{
free( p_input->p_demux_data );
......
......@@ -2,7 +2,7 @@
* udp.c
*****************************************************************************
* 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>
* Eric Petit <titer@videolan.org>
......@@ -203,7 +203,7 @@ static int Open( vlc_object_t *p_this )
socket_desc.i_ttl = atoi( psz_val );
}
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)" );
return VLC_EGENERIC;
......
......@@ -2,7 +2,7 @@
* coreaudio.c resampler based on CoreAudio's AudioConverter
*****************************************************************************
* 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>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -168,7 +168,7 @@ static int Create( vlc_object_t *p_this )
sizeof(audio_sample_format_t) );
p_sys->p_secondary_resampler->p_module
= module_Need( p_sys->p_secondary_resampler, "audio filter",
"ugly_resampler" );
"ugly_resampler", VLC_TRUE );
if ( p_sys->p_secondary_resampler->p_module == NULL )
{
vlc_object_detach( p_sys->p_secondary_resampler );
......
......@@ -2,7 +2,7 @@
* a52.c : raw A/52 stream input module for vlc
*****************************************************************************
* 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>
*
......@@ -165,7 +165,7 @@ static int Open( vlc_object_t * p_this )
VLC_FOURCC( 'a', '5', '2', ' ' ) );
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 )
{
msg_Err( p_demux, "cannot find A52 packetizer" );
......
......@@ -2,7 +2,7 @@
* aac.c : Raw aac Stream input module for vlc
*****************************************************************************
* 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>
*
......@@ -126,7 +126,7 @@ static int Open( vlc_object_t * p_this )
}
/* 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 );
}
......
......@@ -2,7 +2,7 @@
* demuxstream.c: Read an MPEG stream from the satellite and stream it
*****************************************************************************
* 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>
* Johan Bilien <jobi@via.ecp.fr>
......@@ -217,8 +217,7 @@ static int Activate( vlc_object_t * p_this )
socket_desc.i_bind_port = 0;
socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input,
"network", "" ) ) )
if( !( p_network = module_Need( p_input, "network", NULL, 0 ) ) )
{
msg_Err( p_input, "failed to open a connection (udp)" );
return( VLC_EGENERIC );
......@@ -269,7 +268,7 @@ static int Activate( vlc_object_t * p_this )
p_demux->i_handle = socket_desc.i_handle;
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 )
{
free( p_input->p_demux_data );
......
......@@ -2,7 +2,7 @@
* dts.c : raw DTS stream input module for vlc
*****************************************************************************
* 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>
*
......@@ -173,7 +173,7 @@ static int Open( vlc_object_t * p_this )
VLC_FOURCC( 'd', 't', 's', ' ' ) );
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 )
{
msg_Err( p_demux, "cannot find DTS packetizer" );
......
......@@ -2,7 +2,7 @@
* flac.c : FLAC demux module for vlc
*****************************************************************************
* 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>
*
......@@ -136,7 +136,7 @@ static int Open( vlc_object_t * p_this )
STREAMINFO_SIZE + 4 );
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->fmt_in.p_extra )
......
......@@ -2,7 +2,7 @@
* m4v.c : MPEG-4 Video demuxer
*****************************************************************************
* 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>
*
......@@ -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_sub = 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 );
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)
{
......
......@@ -2,7 +2,7 @@
* mpga.c : MPEG-I/II Audio input module for vlc
*****************************************************************************
* 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>
*
......@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this )
}
/* 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 );
}
......
......@@ -2,7 +2,7 @@
* mpgv.c : MPEG-I/II Video demuxer
*****************************************************************************
* 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>
*
......@@ -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_sub = 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 );
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)
{
......
......@@ -2,7 +2,7 @@
* ps.c : Program Stream input module for vlc
*****************************************************************************
* 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>
*
......@@ -123,7 +123,7 @@ static int Activate( vlc_object_t * p_this )
}
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 )
{
free( p_input->p_demux_data );
......
......@@ -2,7 +2,7 @@
* mpeg_ts.c : Transport Stream input module for vlc
*****************************************************************************
* 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>
* Johan Bilien <jobi@via.ecp.fr>
......@@ -230,7 +230,7 @@ static int Activate( vlc_object_t * p_this )
}
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 )
{
free( p_input->p_demux_data );
......
......@@ -2,7 +2,7 @@
* sub.h
*****************************************************************************
* 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>
*
......@@ -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->psz_object_name = "subtitle demux";
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 &&
p_sub->pf_open( p_sub, p_input, psz_name, i_microsecperframe ) >=0 )
......
......@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* 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>
*
......@@ -98,7 +98,8 @@ static int Open( vlc_object_t *p_this )
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 )
{
free( p_intf->p_sys );
......
......@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* 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>
*
......@@ -97,7 +97,8 @@ static int Open( vlc_object_t *p_this )
}
#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 )
{
free( p_intf->p_sys );
......
......@@ -2,7 +2,7 @@
* gnome2.c : GNOME 2 plugin for vlc
*****************************************************************************
* 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>
*
......@@ -83,7 +83,8 @@ static int Open( vlc_object_t *p_this )
}
#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 )
{
free( p_intf->p_sys );
......
......@@ -2,7 +2,7 @@
* gtk2.c : Gtk2 plugin for vlc
*****************************************************************************
* 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>
*
......@@ -84,7 +84,8 @@ static int Open( vlc_object_t *p_this )
}
#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 )
{
free( p_intf->p_sys );
......
......@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.22 2004/02/29 22:59:59 jpsaman Exp $
* $Id: pda.c,v 1.23 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
......@@ -87,7 +87,8 @@ static int Open( vlc_object_t *p_this )
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Using gui-helper" );
p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gtk2" );
p_intf->p_sys->p_gtk_main =
module_Need( p_this, "gui-helper", "gtk2", VLC_TRUE );
if( p_intf->p_sys->p_gtk_main == NULL )
{
free( p_intf->p_sys );
......
......@@ -2,7 +2,7 @@
* dialogs.cpp: Handles all the different dialog boxes we provide.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: dialogs.cpp,v 1.17 2003/12/11 02:26:03 asmax Exp $
* $Id: dialogs.cpp,v 1.18 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -63,7 +63,7 @@ Dialogs::Dialogs( intf_thread_t *_p_intf )
return;
}
p_module = module_Need( p_provider, "dialogs provider", NULL );
p_module = module_Need( p_provider, "dialogs provider", NULL, 0 );
if( p_module == NULL )
{
msg_Err( p_intf, "no suitable dialogs provider found" );
......
......@@ -2,7 +2,7 @@
* dialogs.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: dialogs.cpp,v 1.2 2004/01/25 17:20:19 kuehne Exp $
* $Id: dialogs.cpp,v 1.3 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
......@@ -132,7 +132,7 @@ bool Dialogs::init()
return false;
}
m_pModule = module_Need( m_pProvider, "dialogs provider", NULL );
m_pModule = module_Need( m_pProvider, "dialogs provider", NULL, 0 );
if( m_pModule == NULL )
{
msg_Err( getIntf(), "No suitable dialogs provider found" );
......
......@@ -2,7 +2,7 @@
* sap.c : SAP interface module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: sap.c,v 1.53 2004/02/23 21:00:37 sigmunau Exp $
* $Id: sap.c,v 1.54 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Arnaud Schauly <gitan@via.ecp.fr>
* Clment Stenac <zorglub@via.ecp.fr>
......@@ -263,7 +263,7 @@ static int Open( vlc_object_t *p_this )
sock.i_ttl = 0;
p_intf->p_private = (void*) &sock;
p_network = module_Need( p_intf, "network", "ipv4" );
p_network = module_Need( p_intf, "network", "ipv4", VLC_TRUE );
if( p_network )
{
p_sys->fd[0] = sock.i_handle;
......@@ -299,7 +299,7 @@ static int Open( vlc_object_t *p_this )
sock.i_ttl = 0;
p_intf->p_private = (void*) &sock;
p_network = module_Need( p_intf, "network", "ipv6" );
p_network = module_Need( p_intf, "network", "ipv6", VLC_TRUE );
if( p_network )
{
p_sys->fd[1] = sock.i_handle;
......
......@@ -220,7 +220,7 @@ sap_session_t * sout_SAPNew ( sout_instance_t *p_sout,
/* Call the network module */
p_sout->p_private = (void*) &socket_desc;
if( !( p_network = module_Need( p_sout, "network", "ipv4" ) ) )
if( !( p_network = module_Need(p_sout, "network", "ipv4", VLC_TRUE) ) )
{
msg_Warn( p_sout, "failed to open a connection (udp)" );
return NULL;
......@@ -260,7 +260,7 @@ sap_session_t * sout_SAPNew ( sout_instance_t *p_sout,
/* Call the network module */
p_sout->p_private = (void *) &socket_desc;
if( !( p_network = module_Need( p_sout, "network", "ipv6" ) ) )
if( !( p_network = module_Need(p_sout, "network", "ipv6", VLC_TRUE) ) )
{
msg_Warn( p_sout, "failed to open a connection (udp)" );
return NULL;
......
......@@ -2,7 +2,7 @@
* transcode.c: transcoding stream output module
*****************************************************************************
* Copyright (C) 2003-2004 VideoLAN
* $Id: transcode.c,v 1.81 2004/03/03 11:29:26 massiot Exp $
* $Id: transcode.c,v 1.82 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -786,7 +786,7 @@ static int transcode_audio_ffmpeg_new( sout_stream_t *p_stream,
id->p_encoder->fmt_out.i_bitrate = id->f_dst.i_bitrate;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", NULL );
module_Need( id->p_encoder, "encoder", NULL, 0 );
if( !id->p_encoder->p_module )
{
vlc_object_destroy( id->p_encoder );
......@@ -1178,7 +1178,7 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
id->p_vresample = NULL;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", NULL );
module_Need( id->p_encoder, "encoder", NULL, 0 );
if( !id->p_encoder->p_module )
{
......@@ -1375,7 +1375,7 @@ static int transcode_video_ffmpeg_process( sout_stream_t *p_stream,
id->p_encoder->fmt_out.p_extra = NULL;
id->p_encoder->p_module =
module_Need( id->p_encoder, "encoder", NULL );
module_Need( id->p_encoder, "encoder", NULL, 0 );
if( !id->p_encoder->p_module )
{
vlc_object_destroy( id->p_encoder );
......
......@@ -2,7 +2,7 @@
* qte.cpp : QT Embedded plugin for vlc
*****************************************************************************
* Copyright (C) 1998-2003 VideoLAN
* $Id: qte.cpp,v 1.21 2004/01/26 16:45:02 zorglub Exp $
* $Id: qte.cpp,v 1.22 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Gerald Hansink <gerald.hansink@ordain.nl>
* Jean-Paul Saman <jpsaman@wxs.nl>
......@@ -150,7 +150,8 @@ static int Open( vlc_object_t *p_this )
p_vout->pf_display = Display;
#ifdef NEED_QTE_MAIN
p_vout->p_sys->p_qte_main = module_Need( p_this, "gui-helper", "qte" );
p_vout->p_sys->p_qte_main =
module_Need( p_this, "gui-helper", "qte", VLC_TRUE );
if( p_vout->p_sys->p_qte_main == NULL )
{
free( p_vout->p_sys );
......
......@@ -2,7 +2,7 @@
* filters.c : audio output filters management
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: filters.c,v 1.19 2004/01/06 12:02:05 zorglub Exp $
* $Id: filters.c,v 1.20 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -52,7 +52,7 @@ static aout_filter_t * FindFilter( aout_instance_t * p_aout,
memcpy( &p_filter->input, p_input_format, sizeof(audio_sample_format_t) );
memcpy( &p_filter->output, p_output_format,
sizeof(audio_sample_format_t) );
p_filter->p_module = module_Need( p_filter, "audio filter", NULL );
p_filter->p_module = module_Need( p_filter, "audio filter", NULL, 0 );
if ( p_filter->p_module == NULL )
{
vlc_object_detach( p_filter );
......
......@@ -2,7 +2,7 @@
* input.c : internal management of input streams for the audio output
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: input.c,v 1.43 2004/01/06 12:02:05 zorglub Exp $
* $Id: input.c,v 1.44 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -177,7 +177,7 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
sizeof(audio_sample_format_t) );
p_filter->p_module =
module_Need( p_filter,"audio filter", psz_parser );
module_Need( p_filter,"audio filter", psz_parser, VLC_TRUE );
if( p_filter->p_module== NULL )
{
......@@ -527,7 +527,7 @@ static aout_filter_t * allocateUserChannelMixer( aout_instance_t * p_aout,
memcpy( &p_channel_mixer->output, p_output_format,
sizeof(audio_sample_format_t) );
p_channel_mixer->p_module =
module_Need( p_channel_mixer,"audio filter", psz_name );
module_Need( p_channel_mixer,"audio filter", psz_name, VLC_TRUE );
if( p_channel_mixer->p_module== NULL )
{
msg_Err( p_aout, "cannot add user channel mixer %s", psz_name );
......
......@@ -2,7 +2,7 @@
* mixer.c : audio output mixing operations
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: mixer.c,v 1.29 2004/01/06 12:02:05 zorglub Exp $
* $Id: mixer.c,v 1.30 2004/03/03 20:39:52 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -43,7 +43,7 @@
*****************************************************************************/
int aout_MixerNew( aout_instance_t * p_aout )
{
p_aout->mixer.p_module = module_Need( p_aout, "audio mixer", NULL );
p_aout->mixer.p_module = module_Need( p_aout, "audio mixer", NULL, 0 );
if ( p_aout->mixer.p_module == NULL )
{
msg_Err( p_aout, "no suitable aout mixer" );
......