Commit 05974032 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove unused parameter

parent d78cb0b3
......@@ -152,7 +152,7 @@ VLC_EXPORT( void, vlc_cond_wait, (vlc_cond_t *, vlc_mutex_t *) );
VLC_EXPORT( int, vlc_cond_timedwait, (vlc_cond_t *, vlc_mutex_t *, mtime_t) );
VLC_EXPORT( int, vlc_threadvar_create, (vlc_threadvar_t * , void (*) (void *) ) );
VLC_EXPORT( void, vlc_threadvar_delete, (vlc_threadvar_t *) );
VLC_EXPORT( int, __vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( vlc_object_t * ), int, bool ) );
VLC_EXPORT( int, vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( vlc_object_t * ), int ) );
VLC_EXPORT( int, __vlc_thread_set_priority, ( vlc_object_t *, const char *, int, int ) );
VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t * ) );
......@@ -433,8 +433,8 @@ static inline void barrier (void)
/*****************************************************************************
* vlc_thread_create: create a thread
*****************************************************************************/
#define vlc_thread_create( P_THIS, PSZ_NAME, FUNC, PRIORITY, WAIT ) \
__vlc_thread_create( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PSZ_NAME, FUNC, PRIORITY, WAIT )
#define vlc_thread_create( P_THIS, PSZ_NAME, FUNC, PRIORITY ) \
vlc_thread_create( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PSZ_NAME, FUNC, PRIORITY )
/*****************************************************************************
* vlc_thread_set_priority: set the priority of the calling thread
......
......@@ -236,8 +236,8 @@ static int Open( vlc_object_t *p_this )
p_sys->p_ev->pp_last = &p_sys->p_ev->p_frame;
p_sys->p_ev->p_access = p_access;
vlc_mutex_init( &p_sys->p_ev->lock );
vlc_thread_create( p_sys->p_ev, "dv event thread handler", Raw1394EventThread,
VLC_THREAD_PRIORITY_OUTPUT, false );
vlc_thread_create( p_sys->p_ev, "dv event thread handler",
Raw1394EventThread, VLC_THREAD_PRIORITY_OUTPUT );
free( psz_name );
return VLC_SUCCESS;
......
......@@ -349,7 +349,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_ev = vlc_object_create( p_demux, sizeof( event_thread_t ) );
p_sys->p_ev->p_demux = p_demux;
vlc_thread_create( p_sys->p_ev, "dvdnav event thread handler", EventThread,
VLC_THREAD_PRIORITY_LOW, false );
VLC_THREAD_PRIORITY_LOW );
return VLC_SUCCESS;
}
......
......@@ -212,7 +212,7 @@ static int Open( vlc_object_t *p_this )
}
if( vlc_thread_create( p_sys->p_thread, "rtmp control thread", ThreadControl,
VLC_THREAD_PRIORITY_INPUT, false ) )
VLC_THREAD_PRIORITY_INPUT ) )
{
msg_Err( p_access, "cannot spawn rtmp control thread" );
goto error2;
......
......@@ -236,7 +236,7 @@ void *bonjour_start_service( vlc_object_t *p_log, const char *psz_stype,
if( vlc_thread_create( p_sys->poll_thread, "Avahi Poll Iterate Thread",
poll_iterate_thread,
VLC_THREAD_PRIORITY_HIGHEST, false ) )
VLC_THREAD_PRIORITY_HIGHEST ) )
{
msg_Err( p_sys->p_log, "failed to create poll iterate thread" );
goto error;
......
......@@ -218,7 +218,7 @@ static int Open( vlc_object_t *p_this )
}
if( vlc_thread_create( p_sys->p_thread, "rtmp control thread", ThreadControl,
VLC_THREAD_PRIORITY_INPUT, false ) )
VLC_THREAD_PRIORITY_INPUT ) )
{
msg_Err( p_access, "cannot spawn rtmp control thread" );
goto error2;
......
......@@ -250,7 +250,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_buffer = NULL;
if( vlc_thread_create( p_sys->p_thread, "sout write thread", ThreadWrite,
VLC_THREAD_PRIORITY_HIGHEST, false ) )
VLC_THREAD_PRIORITY_HIGHEST ) )
{
msg_Err( p_access, "cannot spawn sout access thread" );
net_Close (i_handle);
......
......@@ -685,7 +685,7 @@ static int Open( vlc_object_t *p_this )
/* Create ALSA thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", ALSAThread,
VLC_THREAD_PRIORITY_OUTPUT, false ) )
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create ALSA thread (%m)" );
goto error;
......
......@@ -389,7 +389,7 @@ static int OpenAudio( vlc_object_t *p_this )
if( vlc_thread_create( p_aout->output.p_sys->p_notif,
"DirectSound Notification Thread",
DirectSoundThread,
VLC_THREAD_PRIORITY_HIGHEST, false ) )
VLC_THREAD_PRIORITY_HIGHEST ) )
{
msg_Err( p_aout, "cannot create DirectSoundThread" );
CloseHandle( p_aout->output.p_sys->p_notif->event );
......
......@@ -168,7 +168,7 @@ static int Open( vlc_object_t * p_this )
/* Create thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", Thread,
VLC_THREAD_PRIORITY_OUTPUT, false ) )
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create OSS thread (%m)" );
pPlayer->Close();
......
......@@ -518,7 +518,7 @@ static int Open( vlc_object_t *p_this )
/* Create OSS thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", OSSThread,
VLC_THREAD_PRIORITY_OUTPUT, false ) )
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create OSS thread (%m)" );
close( p_sys->i_fd );
......
......@@ -220,7 +220,7 @@ static int Open( vlc_object_t * p_this )
/* Create PORTAUDIOThread */
if( vlc_thread_create( pa_thread, "aout", PORTAUDIOThread,
VLC_THREAD_PRIORITY_OUTPUT, false ) )
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create PORTAUDIO thread" );
return VLC_EGENERIC;
......
......@@ -435,7 +435,7 @@ static int Open( vlc_object_t *p_this )
/* Then launch the notification thread */
if( vlc_thread_create( p_aout->output.p_sys->p_notif,
"waveOut Notification Thread", WaveOutThread,
VLC_THREAD_PRIORITY_OUTPUT, false ) )
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create WaveOutThread" );
}
......
......@@ -821,7 +821,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
pp_contexts[i]->b_work = 0;
pp_contexts[i]->b_done = 0;
if ( vlc_thread_create( pp_contexts[i], "encoder", FfmpegThread,
VLC_THREAD_PRIORITY_VIDEO, false ) )
VLC_THREAD_PRIORITY_VIDEO ) )
{
msg_Err( p_enc, "cannot spawn encoder thread, expect to die soon" );
return NULL;
......
......@@ -196,7 +196,7 @@ void demux_sys_t::StartUiThread()
p_ev->b_die = false;
vlc_mutex_init( &p_ev->lock );
vlc_thread_create( p_ev, "mkv event thread handler", EventThread,
VLC_THREAD_PRIORITY_LOW, false );
VLC_THREAD_PRIORITY_LOW );
}
}
......
......@@ -173,7 +173,7 @@ int OpenAudio( vlc_object_t *p_this )
/* Create audio thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", QNXaoutThread,
VLC_THREAD_PRIORITY_OUTPUT, false ) )
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create QNX audio thread (%m)" );
CloseAudio( p_this );
......
......@@ -192,8 +192,7 @@ static void Run( intf_thread_t *p_intf )
/* Create a new thread for the dialogs provider */
p_intf->p_sys->thread_ready = CreateEvent (NULL, TRUE, FALSE, NULL);
if( vlc_thread_create( p_intf, "WinCE Dialogs Thread",
MainLoop, 0, false ) )
if( vlc_thread_create( p_intf, "WinCE Dialogs Thread", MainLoop, 0 ) )
{
msg_Err( p_intf, "cannot create WinCE Dialogs Thread" );
p_intf->pf_show_dialog = NULL;
......
......@@ -278,8 +278,7 @@ static void Run( intf_thread_t *p_intf )
/* The module is used in dialog provider mode */
/* Create a new thread for wxWidgets */
if( vlc_thread_create( p_intf, "Skins Dialogs Thread",
Init, 0, true ) )
if( vlc_thread_create( p_intf, "Skins Dialogs Thread", Init, 0 ) )
{
msg_Err( p_intf, "cannot create Skins Dialogs Thread" );
p_intf->pf_show_dialog = NULL;
......
......@@ -468,8 +468,7 @@ static vlc_object_t *FontBuilderAttach( filter_t *p_filter )
if( vlc_thread_create( p_fontbuilder,
"fontlist builder",
FontBuilderThread,
VLC_THREAD_PRIORITY_LOW,
false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Warn( p_filter, "fontconfig database builder thread can't "
"be launched. Font styling support will be limited." );
......
......@@ -308,7 +308,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_fifo_cmd = block_FifoNew();
if( vlc_thread_create( p_vod, "rtsp vod thread", CommandThread,
VLC_THREAD_PRIORITY_LOW, false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_vod, "cannot spawn rtsp vod thread" );
block_FifoRelease( p_sys->p_fifo_cmd );
......
......@@ -1263,7 +1263,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id->p_fifo = block_FifoNew();
if( vlc_thread_create( id, "RTP send thread", ThreadSend,
VLC_THREAD_PRIORITY_HIGHEST, false ) )
VLC_THREAD_PRIORITY_HIGHEST ) )
goto error;
/* Update p_sys context */
......
......@@ -1538,8 +1538,7 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
p_sys->i_last_pic = 0;
p_sys->p_buffers = NULL;
p_sys->b_die = p_sys->b_error = 0;
if( vlc_thread_create( p_sys, "encoder", EncoderThread, i_priority,
false ) )
if( vlc_thread_create( p_sys, "encoder", EncoderThread, i_priority ) )
{
msg_Err( p_stream, "cannot spawn encoder thread" );
module_unneed( id->p_decoder, id->p_decoder->p_module );
......
......@@ -138,8 +138,7 @@ void CThread::Run()
if(vlc_thread_create( m_pAtmoThread,
"Atmo-CThread-Class",
CThread::ThreadProc,
VLC_THREAD_PRIORITY_LOW,
false ))
VLC_THREAD_PRIORITY_LOW ))
{
msg_Err( m_pOwner, "cannot launch one of the AtmoLight threads");
}
......
......@@ -944,8 +944,7 @@ static void Atmo_Shutdown(filter_t *p_filter)
if( vlc_thread_create( p_sys->p_fadethread,
"AtmoLight fadeing",
FadeToColorThread,
VLC_THREAD_PRIORITY_LOW,
false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_filter, "cannot create FadeToColorThread" );
vlc_object_release( p_sys->p_fadethread );
......@@ -1898,8 +1897,7 @@ static int StateCallback( vlc_object_t *p_this, char const *psz_cmd,
if( vlc_thread_create( p_sys->p_fadethread,
"AtmoLight fadeing",
FadeToColorThread,
VLC_THREAD_PRIORITY_LOW,
false) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_filter, "cannot create FadeToColorThread" );
vlc_object_release( p_sys->p_fadethread );
......
......@@ -333,8 +333,7 @@ static int CreateFilter ( vlc_object_t *p_this )
sizeof( vlc_object_t ) );
vlc_object_attach( p_sys->p_worker_thread, p_this );
if( vlc_thread_create( p_sys->p_worker_thread, "vnc worker thread",
vnc_worker_thread,
VLC_THREAD_PRIORITY_LOW, false ) )
vnc_worker_thread, VLC_THREAD_PRIORITY_LOW ) )
{
vlc_object_detach( p_sys->p_worker_thread );
vlc_object_release( p_sys->p_worker_thread );
......@@ -715,8 +714,7 @@ static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
vlc_object_attach( p_update_request_thread, p_filter );
if( vlc_thread_create( p_update_request_thread,
"vnc update request thread",
update_request_thread,
VLC_THREAD_PRIORITY_LOW, false ) )
update_request_thread, VLC_THREAD_PRIORITY_LOW ) )
{
vlc_object_detach( p_update_request_thread );
vlc_object_release( p_update_request_thread );
......
......@@ -205,7 +205,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout->p_sys->p_event->p_vout = p_vout;
p_vout->p_sys->p_event->window_ready = CreateEvent( NULL, TRUE, FALSE, NULL );
if( vlc_thread_create( p_vout->p_sys->p_event, "Vout Events Thread",
EventThread, 0, false ) )
EventThread, 0 ) )
{
msg_Err( p_vout, "cannot create Vout EventThread" );
CloseHandle( p_vout->p_sys->p_event->window_ready );
......
......@@ -279,7 +279,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout->p_sys->p_event->p_vout = p_vout;
p_vout->p_sys->p_event->window_ready = CreateEvent( NULL, TRUE, FALSE, NULL );
if( vlc_thread_create( p_vout->p_sys->p_event, "Vout Events Thread",
EventThread, 0, false ) )
EventThread, 0 ) )
{
msg_Err( p_vout, "cannot create Vout EventThread" );
CloseHandle( p_vout->p_sys->p_event->window_ready );
......
......@@ -136,7 +136,7 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout->p_sys->p_event->p_vout = p_vout;
p_vout->p_sys->p_event->window_ready = CreateEvent( NULL, TRUE, FALSE, NULL );
if( vlc_thread_create( p_vout->p_sys->p_event, "Vout Events Thread",
EventThread, 0, false ) )
EventThread, 0 ) )
{
msg_Err( p_vout, "cannot create Vout EventThread" );
CloseHandle( p_vout->p_sys->p_event->window_ready );
......
......@@ -244,7 +244,7 @@ static int OpenVideo ( vlc_object_t *p_this )
p_vout->p_sys->p_event->p_vout = p_vout;
p_vout->p_sys->p_event->window_ready = CreateEvent( NULL, TRUE, FALSE, NULL );
if( vlc_thread_create( p_vout->p_sys->p_event, "Vout Events Thread",
EventThread, 0, false ) )
EventThread, 0 ) )
{
msg_Err( p_vout, "cannot create Vout EventThread" );
CloseHandle( p_vout->p_sys->p_event->window_ready );
......
......@@ -121,7 +121,7 @@ static int Open( vlc_object_t *p_this )
p_thread->psz_title = TitleGet( VLC_OBJECT( p_filter ) );
if( vlc_thread_create( p_thread, "galaktos update thread", Thread,
VLC_THREAD_PRIORITY_LOW, false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_filter, "cannot lauch galaktos thread" );
free( p_thread->psz_title );
......
......@@ -193,7 +193,7 @@ static int Open( vlc_object_t *p_this )
p_thread->psz_title = TitleGet( VLC_OBJECT( p_filter ) );
if( vlc_thread_create( p_thread, "Goom Update Thread", Thread,
VLC_THREAD_PRIORITY_LOW, false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_filter, "cannot lauch goom thread" );
vlc_object_release( p_thread->p_vout );
......
......@@ -312,8 +312,7 @@ decoder_t *input_DecoderNew( input_thread_t *p_input,
i_priority = VLC_THREAD_PRIORITY_VIDEO;
/* Spawn the decoder thread */
if( vlc_thread_create( p_dec, "decoder", DecoderThread,
i_priority, false ) )
if( vlc_thread_create( p_dec, "decoder", DecoderThread, i_priority ) )
{
msg_Err( p_dec, "cannot spawn decoder thread" );
module_unneed( p_dec, p_dec->p_module );
......
......@@ -732,7 +732,7 @@ static int TsStart( es_out_t *p_out )
p_sys->b_delayed = true;
if( vlc_thread_create( p_ts, "es out timeshift",
TsRun, VLC_THREAD_PRIORITY_INPUT, false ) )
TsRun, VLC_THREAD_PRIORITY_INPUT ) )
{
msg_Err( p_sys->p_input, "cannot create input thread" );
......
......@@ -365,7 +365,7 @@ input_thread_t *__input_CreateThreadExtended( vlc_object_t *p_parent,
/* Create thread and wait for its readiness. */
if( vlc_thread_create( p_input, "input", Run,
VLC_THREAD_PRIORITY_INPUT, false ) )
VLC_THREAD_PRIORITY_INPUT ) )
{
input_ChangeState( p_input, ERROR_S );
msg_Err( p_input, "cannot create input thread" );
......@@ -403,7 +403,7 @@ int __input_Read( vlc_object_t *p_parent, input_item_t *p_item,
else
{
if( vlc_thread_create( p_input, "input", RunAndDestroy,
VLC_THREAD_PRIORITY_INPUT, false ) )
VLC_THREAD_PRIORITY_INPUT ) )
{
input_ChangeState( p_input, ERROR_S );
msg_Err( p_input, "cannot create input thread" );
......
......@@ -92,7 +92,7 @@ stream_t *__stream_DemuxNew( vlc_object_t *p_obj, const char *psz_demux,
}
if( vlc_thread_create( s, "stream out", DStreamThread,
VLC_THREAD_PRIORITY_INPUT, false ) )
VLC_THREAD_PRIORITY_INPUT ) )
{
stream_CommonDelete( s );
free( p_sys->psz_name );
......
......@@ -130,7 +130,7 @@ int intf_RunThread( intf_thread_t *p_intf )
if( p_intf->b_should_run_on_first_thread )
{
if( vlc_thread_create( p_intf, "interface", MonitorLibVLCDeath,
VLC_THREAD_PRIORITY_LOW, false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_intf, "cannot spawn libvlc death monitoring thread" );
return VLC_EGENERIC;
......@@ -150,7 +150,7 @@ int intf_RunThread( intf_thread_t *p_intf )
#endif
/* Run the interface in a separate thread */
if( vlc_thread_create( p_intf, "interface", RunInterface,
VLC_THREAD_PRIORITY_LOW, false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_intf, "cannot spawn interface thread" );
return VLC_EGENERIC;
......
......@@ -504,7 +504,7 @@ vlc_strcasestr
vlc_strlcpy
vlc_strtoll
vlc_submodule_create
__vlc_thread_create
vlc_thread_create
__vlc_thread_join
__vlc_thread_set_priority
vlc_threadvar_create
......
......@@ -845,15 +845,16 @@ static void *thread_entry (void *data)
return NULL;
}
#undef vlc_thread_create
/*****************************************************************************
* vlc_thread_create: create a thread, inner version
* vlc_thread_create: create a thread
*****************************************************************************
* Note that i_priority is only taken into account on platforms supporting
* userland real-time priority threads.
*****************************************************************************/
int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line,
const char *psz_name, void * ( *func ) ( vlc_object_t * ),
int i_priority, bool b_wait )
int vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line,
const char *psz_name, void *(*func) ( vlc_object_t * ),
int i_priority )
{
int i_ret;
vlc_object_internals_t *p_priv = vlc_internals( p_this );
......@@ -881,11 +882,8 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
p_priv->b_thread = true;
i_ret = vlc_clone( &p_priv->thread_id, thread_entry, boot, i_priority );
if( i_ret == 0 )
{
msg_Dbg( p_this, "thread (%s) created at priority %d (%s:%d)",
psz_name, i_priority, psz_file, i_line );
assert( !b_wait );
}
else
{
p_priv->b_thread = false;
......
......@@ -1392,7 +1392,7 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
p_uct->p_data = p_data;
vlc_thread_create( p_uct, "check for update", update_CheckReal,
VLC_THREAD_PRIORITY_LOW, false );
VLC_THREAD_PRIORITY_LOW );
}
void* update_CheckReal( vlc_object_t* p_this )
......@@ -1505,7 +1505,7 @@ void update_Download( update_t *p_update, const char *destination )
p_udt->psz_destination = destination ? strdup( destination ) : NULL;
vlc_thread_create( p_udt, "download update", update_DownloadReal,
VLC_THREAD_PRIORITY_LOW, false );
VLC_THREAD_PRIORITY_LOW );
}
static void* update_DownloadReal( vlc_object_t *p_this )
......
......@@ -1110,7 +1110,7 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
/* create the thread */
if( vlc_thread_create( host, "httpd host thread", httpd_HostThread,
VLC_THREAD_PRIORITY_LOW, false ) )
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_this, "cannot spawn http host thread" );
goto error;
......
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