Commit ffbbecfb authored by Rémi Duraffort's avatar Rémi Duraffort

module_need wants pointers and boolean so give NULL and false instead of 0.

parent 17444691
......@@ -349,7 +349,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
p_sys->p_blend->fmt_in.video = p_sys->p_mouse->format;
p_sys->p_blend->fmt_out = p_sys->fmt;
p_sys->p_blend->p_module =
module_need( p_sys->p_blend, "video blending", 0, 0 );
module_need( p_sys->p_blend, "video blending", NULL, false );
if( !p_sys->p_blend->p_module )
{
msg_Err( p_demux, "Could not load video blending module" );
......
......@@ -95,7 +95,7 @@ int VCDInit ( vlc_object_t *p_this )
}
p_input->p_private = (void*)&p_demux->mpeg;
p_demux->p_module = module_need( p_input, "mpeg-system", NULL, 0 );
p_demux->p_module = module_need( p_input, "mpeg-system", NULL, false );
if( p_demux->p_module == NULL )
{
free( p_input->p_demux_data );
......
......@@ -547,7 +547,7 @@ static int OpenBlending( intf_thread_t *p_intf )
VLC_FOURCC('Y','U','V','A');
p_intf->p_sys->p_blend->p_module =
module_need( p_intf->p_sys->p_blend, "video blending", 0, 0 );
module_need( p_intf->p_sys->p_blend, "video blending", NULL, false );
if( !p_intf->p_sys->p_blend->p_module )
return VLC_EGENERIC;
......@@ -596,7 +596,7 @@ static int OpenTextRenderer( intf_thread_t *p_intf )
if( !p_intf->p_sys->p_text->p_module )
{
p_intf->p_sys->p_text->p_module =
module_need( p_intf->p_sys->p_text, "text renderer", 0, 0 );
module_need( p_intf->p_sys->p_text, "text renderer", NULL, false );
}
free( psz_modulename );
......
......@@ -405,7 +405,7 @@ static VLCInfo *_o_sharedInstance = nil;
PL_LOCK;
p_playlist->p_private = &p_export;
module_t *p_mod = module_need( p_playlist, "meta writer", NULL, 0 );
module_t *p_mod = module_need( p_playlist, "meta writer", NULL, false );
if( p_mod )
module_unneed( p_playlist, p_mod );
PL_UNLOCK;
......
......@@ -272,7 +272,7 @@ void MetaPanel::saveMeta()
PL_LOCK;
p_playlist->p_private = &p_export;
module_t *p_mod = module_need( p_playlist, "meta writer", NULL, 0 );
module_t *p_mod = module_need( p_playlist, "meta writer", NULL, false );
if( p_mod )
module_unneed( p_playlist, p_mod );
PL_UNLOCK;
......
......@@ -163,7 +163,7 @@ bool Dialogs::init()
if( m_pProvider == NULL )
return false;
m_pModule = module_need( m_pProvider, "dialogs provider", NULL, 0 );
m_pModule = module_need( m_pProvider, "dialogs provider", NULL, false );
if( m_pModule == NULL )
{
msg_Err( getIntf(), "no suitable dialogs provider found (hint: compile the qt4 plugin, and make sure it is loaded properly)" );
......
......@@ -354,7 +354,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
//p_sys->p_decoder->p_cfg = p_sys->p_video_cfg;
p_sys->p_decoder->p_module =
module_need( p_sys->p_decoder, "decoder", "$codec", 0 );
module_need( p_sys->p_decoder, "decoder", "$codec", false );
if( !p_sys->p_decoder->p_module || !p_sys->p_decoder->pf_decode_video )
{
......
......@@ -1077,7 +1077,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
/* id->p_decoder->p_cfg = p_sys->p_audio_cfg; */
id->p_decoder->p_module =
module_need( id->p_decoder, "decoder", "$codec", 0 );
module_need( id->p_decoder, "decoder", "$codec", false );
if( !id->p_decoder->p_module )
{
msg_Err( p_stream, "cannot find audio decoder" );
......@@ -1467,7 +1467,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
/* id->p_decoder->p_cfg = p_sys->p_video_cfg; */
id->p_decoder->p_module =
module_need( id->p_decoder, "decoder", "$codec", 0 );
module_need( id->p_decoder, "decoder", "$codec", false );
if( !id->p_decoder->p_module )
{
......@@ -2279,7 +2279,7 @@ static int transcode_spu_new( sout_stream_t *p_stream, sout_stream_id_t *id )
/* id->p_decoder->p_cfg = p_sys->p_spu_cfg; */
id->p_decoder->p_module =
module_need( id->p_decoder, "decoder", "$codec", 0 );
module_need( id->p_decoder, "decoder", "$codec", false );
if( !id->p_decoder->p_module )
{
......
......@@ -228,7 +228,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
vlc_object_attach( p_blend, p_filter );
p_blend->fmt_out.video = p_sys->p_base_image->format;
p_blend->fmt_in.video = p_sys->p_blend_image->format;
p_blend->p_module = module_need( p_blend, "video blending", 0, 0 );
p_blend->p_module = module_need( p_blend, "video blending", NULL, false );
if( !p_blend->p_module )
{
picture_Release( p_pic );
......
......@@ -411,7 +411,7 @@ static int Init( vout_thread_t *p_vout )
p_vout->output.i_height;
p_sys->p_blend->p_module =
module_need( p_sys->p_blend, "video blending", 0, 0 );
module_need( p_sys->p_blend, "video blending", NULL, false );
if( !p_sys->p_blend->p_module )
{
msg_Err( p_vout, "can't open blending filter, aborting" );
......
......@@ -334,7 +334,7 @@ static int Init( vout_thread_t *p_vout )
if (p_vout->p_sys->psz_inner_name)
p_sys->p_opencv->p_module =
module_need( p_sys->p_opencv, p_sys->psz_inner_name, 0, 0 );
module_need( p_sys->p_opencv, p_sys->psz_inner_name, NULL, false );
if( !p_sys->p_opencv->p_module )
{
......
......@@ -295,7 +295,7 @@ static int CreateVout( vlc_object_t *p_this )
psz ? psz : "default" );
p_sys->p_vout->p_module =
module_need( p_sys->p_vout, "opengl provider", psz, 0 );
module_need( p_sys->p_vout, "opengl provider", psz, false );
free( psz );
if( p_sys->p_vout->p_module == NULL )
{
......
......@@ -226,7 +226,7 @@ static void* Thread( vlc_object_t *p_this )
p_thread->p_opengl->fmt_render = p_thread->p_opengl->fmt_in;
p_thread->p_module =
module_need( p_thread->p_opengl, "opengl provider", NULL, 0 );
module_need( p_thread->p_opengl, "opengl provider", NULL, false );
if( p_thread->p_module == NULL )
{
msg_Err( p_thread, "unable to initialize OpenGL" );
......
......@@ -58,7 +58,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, 0 );
p_filter->p_module = module_need( p_filter, "audio filter", NULL, false );
if ( p_filter->p_module == NULL )
{
vlc_object_detach( p_filter );
......
......@@ -43,7 +43,7 @@
*****************************************************************************/
int aout_MixerNew( aout_instance_t * p_aout )
{
p_aout->mixer.p_module = module_need( p_aout, "audio mixer", NULL, 0 );
p_aout->mixer.p_module = module_need( p_aout, "audio mixer", NULL, false );
if ( p_aout->mixer.p_module == NULL )
{
msg_Err( p_aout, "no suitable audio mixer" );
......
......@@ -54,7 +54,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
aout_lock_output_fifo( p_aout );
/* Find the best output plug-in. */
p_aout->output.p_module = module_need( p_aout, "audio output", "$aout", 0);
p_aout->output.p_module = module_need( p_aout, "audio output", "$aout", false );
if ( p_aout->output.p_module == NULL )
{
msg_Err( p_aout, "no suitable audio output module" );
......
......@@ -755,9 +755,9 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
/* Find a suitable decoder/packetizer module */
if( i_object_type == VLC_OBJECT_DECODER )
p_dec->p_module = module_need( p_dec, "decoder", "$codec", 0 );
p_dec->p_module = module_need( p_dec, "decoder", "$codec", false );
else
p_dec->p_module = module_need( p_dec, "packetizer", "$packetizer", 0 );
p_dec->p_module = module_need( p_dec, "packetizer", "$packetizer", false );
/* Check if decoder requires already packetized data */
if( i_object_type == VLC_OBJECT_DECODER &&
......@@ -777,7 +777,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
p_dec->p_owner->p_packetizer->p_module =
module_need( p_dec->p_owner->p_packetizer,
"packetizer", "$packetizer", 0 );
"packetizer", "$packetizer", false );
if( !p_dec->p_owner->p_packetizer->p_module )
{
......
......@@ -315,7 +315,7 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
p_packetizer->fmt_in = *p_fmt;
es_format_Init( &p_packetizer->fmt_out, UNKNOWN_ES, 0 );
p_packetizer->p_module = module_need( p_packetizer, "packetizer", NULL, 0 );
p_packetizer->p_module = module_need( p_packetizer, "packetizer", NULL, false );
if( !p_packetizer->p_module )
{
es_format_Clean( p_fmt );
......
......@@ -2677,7 +2677,7 @@ static void InputSourceMeta( input_thread_t *p_input,
if( !p_demux_meta )
return;
module_t *p_id3 = module_need( p_demux, "meta reader", NULL, 0 );
module_t *p_id3 = module_need( p_demux, "meta reader", NULL, false );
if( p_id3 )
{
if( p_demux_meta->p_meta )
......
......@@ -165,7 +165,7 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
}
free( psz_title );
p_module = module_need( p_playlist, "art finder", 0, false );
p_module = module_need( p_playlist, "art finder", NULL, false );
if( p_module )
i_ret = 1;
......
......@@ -608,7 +608,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
p_vlm->p_vod = vlc_custom_create( VLC_OBJECT(p_vlm), sizeof( vod_t ),
VLC_OBJECT_GENERIC, "vod server" );
vlc_object_attach( p_vlm->p_vod, p_vlm );
p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", 0, 0 );
p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", NULL, false );
if( !p_vlm->p_vod->p_module )
{
msg_Err( p_vlm, "cannot find vod server" );
......
......@@ -788,7 +788,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/*
* Choose the best memcpy module
*/
priv->p_memcpy_module = module_need( p_libvlc, "memcpy", "$memcpy", 0 );
priv->p_memcpy_module = module_need( p_libvlc, "memcpy", "$memcpy", false );
priv->b_stats = config_GetInt( p_libvlc, "stats" ) > 0;
priv->i_timers = 0;
......
......@@ -621,7 +621,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
vlc_object_attach( p_dec, p_this );
/* Find a suitable decoder module */
p_dec->p_module = module_need( p_dec, "decoder", "$codec", 0 );
p_dec->p_module = module_need( p_dec, "decoder", "$codec", false );
if( !p_dec->p_module )
{
msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'.\n"
......@@ -703,7 +703,7 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, video_format_t *fmt_in,
vlc_object_attach( p_enc, p_this );
/* Find a suitable decoder module */
p_enc->p_module = module_need( p_enc, "encoder", 0, 0 );
p_enc->p_module = module_need( p_enc, "encoder", NULL, false );
if( !p_enc->p_module )
{
msg_Err( p_enc, "no suitable encoder module for fourcc `%4.4s'.\n"
......@@ -752,7 +752,7 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
p_filter->fmt_out.i_codec = p_fmt_out->i_chroma;
p_filter->fmt_out.video = *p_fmt_out;
p_filter->p_module = module_need( p_filter, "video filter2",
psz_module, 0 );
psz_module, false );
if( !p_filter->p_module )
{
......
......@@ -43,7 +43,7 @@ xml_t *__xml_Create( vlc_object_t *p_this )
"xml" );
vlc_object_attach( p_xml, p_this );
p_xml->p_module = module_need( p_xml, "xml", 0, 0 );
p_xml->p_module = module_need( p_xml, "xml", NULL, false );
if( !p_xml->p_module )
{
vlc_object_detach( p_xml );
......
......@@ -69,7 +69,7 @@ tls_ServerCreate (vlc_object_t *obj, const char *cert_path,
var_SetString (srv, "tls-x509-key", key_path);
}
srv->p_module = module_need (srv, "tls server", 0, 0);
srv->p_module = module_need (srv, "tls server", NULL, false );
if (srv->p_module == NULL)
{
msg_Err (srv, "TLS server plugin not available");
......@@ -185,7 +185,7 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
else
msg_Dbg (cl, "requested anonymous server");
cl->p_module = module_need (cl, "tls client", 0, 0);
cl->p_module = module_need (cl, "tls client", NULL, false );
if (cl->p_module == NULL)
{
msg_Err (cl, "TLS client plugin not available");
......
......@@ -1450,7 +1450,7 @@ static int ChromaCreate( vout_thread_t *p_vout )
VideoFormatImportRgb( &p_chroma->fmt_in.video, &p_vout->render );
VideoFormatImportRgb( &p_chroma->fmt_out.video, &p_vout->output );
p_chroma->p_module = module_need( p_chroma, "video filter2", NULL, 0 );
p_chroma->p_module = module_need( p_chroma, "video filter2", NULL, false );
if( p_chroma->p_module == NULL )
{
......
......@@ -116,7 +116,7 @@ void *vout_RequestWindow( vout_thread_t *p_vout,
wnd->pos_y = *pi_y_hint;
vlc_object_attach (wnd, p_vout);
wnd->module = module_need (wnd, "vout_window", 0, 0);
wnd->module = module_need (wnd, "vout_window", NULL, false);
if (wnd->module == NULL)
{
msg_Dbg (wnd, "no window provider available");
......
......@@ -949,7 +949,7 @@ static void SpuRenderUpdateBlend( spu_t *p_spu, int i_out_width, int i_out_heigh
/* */
if( !p_blend->p_module )
p_blend->p_module = module_need( p_blend, "video blending", 0, 0 );
p_blend->p_module = module_need( p_blend, "video blending", NULL, false );
}
static void SpuRenderCreateAndLoadText( spu_t *p_spu )
{
......@@ -1021,7 +1021,7 @@ static filter_t *CreateAndLoadScale( vlc_object_t *p_obj,
p_scale->pf_vout_buffer_del = spu_del_video_buffer;
vlc_object_attach( p_scale, p_obj );
p_scale->p_module = module_need( p_scale, "video filter2", 0, 0 );
p_scale->p_module = module_need( p_scale, "video filter2", NULL, false );
return p_scale;
}
......
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