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

Remove useless parameters

parent e6a323e4
......@@ -197,11 +197,11 @@ VLC_EXPORT( void *, vlc_threadvar_get, (vlc_threadvar_t) );
#if defined (__GNUC__) && !defined __cplusplus
__attribute__((deprecated))
#endif
VLC_EXPORT( int, vlc_thread_create, ( vlc_object_t *, const char *, int, const char *, void * ( * ) ( vlc_object_t * ), int ) LIBVLC_USED );
VLC_EXPORT( int, vlc_thread_create, ( vlc_object_t *, void * ( * ) ( vlc_object_t * ), int ) LIBVLC_USED );
#if defined (__GNUC__) && !defined __cplusplus
__attribute__((deprecated))
#endif
VLC_EXPORT( int, vlc_thread_set_priority, ( vlc_object_t *, const char *, int, int ) );
VLC_EXPORT( int, vlc_thread_set_priority, ( vlc_object_t *, int ) );
#if defined (__GNUC__) && !defined __cplusplus
__attribute__((deprecated))
#endif
......@@ -402,11 +402,11 @@ static inline void barrier (void)
#endif
}
#define vlc_thread_create( P_THIS, PSZ_NAME, FUNC, PRIORITY ) \
vlc_thread_create( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PSZ_NAME, FUNC, PRIORITY )
#define vlc_thread_create( P_THIS, FUNC, PRIORITY ) \
vlc_thread_create( VLC_OBJECT(P_THIS), FUNC, PRIORITY )
#define vlc_thread_set_priority( P_THIS, PRIORITY ) \
vlc_thread_set_priority( VLC_OBJECT(P_THIS), __FILE__, __LINE__, PRIORITY )
vlc_thread_set_priority( VLC_OBJECT(P_THIS), PRIORITY )
#define vlc_thread_join( P_THIS ) \
vlc_thread_join( VLC_OBJECT(P_THIS) )
......
......@@ -226,7 +226,7 @@ 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",
vlc_thread_create( p_sys->p_ev,
Raw1394EventThread, VLC_THREAD_PRIORITY_OUTPUT );
return VLC_SUCCESS;
......
......@@ -234,7 +234,7 @@ void *bonjour_start_service( vlc_object_t *p_log, const char *psz_stype,
goto error;
p_sys->poll_thread->simple_poll = p_sys->simple_poll;
if( vlc_thread_create( p_sys->poll_thread, "Avahi Poll Iterate Thread",
if( vlc_thread_create( p_sys->poll_thread,
poll_iterate_thread,
VLC_THREAD_PRIORITY_HIGHEST ) )
{
......
......@@ -315,7 +315,6 @@ static int OpenAudio( vlc_object_t *p_this )
/* then launch the notification thread */
msg_Dbg( p_aout, "creating DirectSoundThread" );
if( vlc_thread_create( p_aout->output.p_sys->p_notif,
"DirectSound Notification Thread",
DirectSoundThread,
VLC_THREAD_PRIORITY_HIGHEST ) )
{
......
......@@ -165,7 +165,7 @@ static int Open( vlc_object_t * p_this )
pPlayer->SetVolume( (u32)__MIN( i_volume * 64, 0xFFFF ) );
/* Create thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", Thread,
if( vlc_thread_create( p_aout, Thread,
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create OSS thread (%m)" );
......
......@@ -513,7 +513,7 @@ static int Open( vlc_object_t *p_this )
var_InheritBool( p_aout, "oss-buggy" );
/* Create OSS thread and wait for its readiness. */
if( vlc_thread_create( p_aout, "aout", OSSThread,
if( vlc_thread_create( p_aout, OSSThread,
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create OSS thread (%m)" );
......
......@@ -220,7 +220,7 @@ static int Open( vlc_object_t * p_this )
pa_thread->b_signal = false;
/* Create PORTAUDIOThread */
if( vlc_thread_create( pa_thread, "aout", PORTAUDIOThread,
if( vlc_thread_create( pa_thread, PORTAUDIOThread,
VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create PORTAUDIO thread" );
......
......@@ -344,8 +344,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 ) )
WaveOutThread, VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_aout, "cannot create WaveOutThread" );
}
......
......@@ -196,8 +196,7 @@ void demux_sys_t::StartUiThread()
p_ev->p_demux = &demuxer;
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 );
vlc_thread_create( p_ev, EventThread, VLC_THREAD_PRIORITY_LOW );
}
}
......
......@@ -98,8 +98,7 @@ int watch_Init( media_library_t *p_ml )
vlc_cond_init( &p_wt->cond );
vlc_mutex_init( &p_wt->lock );
if( vlc_thread_create( p_wt, "Media Library Auto-Update",
watch_Thread, VLC_THREAD_PRIORITY_LOW ) )
if( vlc_thread_create( p_wt, watch_Thread, VLC_THREAD_PRIORITY_LOW ) )
{
msg_Dbg( p_ml, "unable to launch the auto-updating thread" );
vlc_object_release( p_wt );
......
......@@ -300,8 +300,7 @@ static int Open( vlc_object_t *p_this )
p_vod->pf_media_del = MediaAskDel;
p_sys->p_fifo_cmd = block_FifoNew();
if( vlc_thread_create( p_vod, "rtsp vod thread", CommandThread,
VLC_THREAD_PRIORITY_LOW ) )
if( vlc_thread_create( p_vod, CommandThread, VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_vod, "cannot spawn rtsp vod thread" );
block_FifoRelease( p_sys->p_fifo_cmd );
......
......@@ -1562,8 +1562,7 @@ static int Open(vlc_object_t *p_this)
vlc_mutex_init(&p_sys->download.lock_wait);
vlc_cond_init(&p_sys->download.wait);
if (vlc_thread_create(s, "HTTP Live Streaming client",
hls_Thread, VLC_THREAD_PRIORITY_INPUT))
if (vlc_thread_create(s, hls_Thread, VLC_THREAD_PRIORITY_INPUT))
{
goto fail_thread;
}
......
......@@ -275,7 +275,7 @@ 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 ) )
if( vlc_thread_create( p_sys, EncoderThread, i_priority ) )
{
msg_Err( p_stream, "cannot spawn encoder thread" );
module_unneed( id->p_decoder, id->p_decoder->p_module );
......
......@@ -141,8 +141,7 @@ int OpenVoD( vlc_object_t *p_this )
p_vod->pf_media_del = MediaAskDel;
p_sys->p_fifo_cmd = block_FifoNew();
if( vlc_thread_create( p_vod, "rtsp vod thread", CommandThread,
VLC_THREAD_PRIORITY_LOW ) )
if( vlc_thread_create( p_vod, CommandThread, VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_vod, "cannot spawn rtsp vod thread" );
block_FifoRelease( p_sys->p_fifo_cmd );
......
......@@ -136,7 +136,6 @@ void CThread::Run()
#if defined(_ATMO_VLC_PLUGIN_)
m_pAtmoThread->b_die = false;
if(vlc_thread_create( m_pAtmoThread,
"Atmo-CThread-Class",
CThread::ThreadProc,
VLC_THREAD_PRIORITY_LOW ))
{
......
......@@ -1118,7 +1118,6 @@ static void Atmo_Shutdown(filter_t *p_filter)
p_sys->p_fadethread->i_steps = p_sys->i_endfadesteps;
if( vlc_thread_create( p_sys->p_fadethread,
"AtmoLight fadeing",
FadeToColorThread,
VLC_THREAD_PRIORITY_LOW ) )
{
......@@ -2492,7 +2491,6 @@ static int StateCallback( vlc_object_t *p_this, char const *psz_cmd,
p_sys->p_fadethread->i_steps = p_sys->i_fadesteps;
if( vlc_thread_create( p_sys->p_fadethread,
"AtmoLight fadeing",
FadeToColorThread,
VLC_THREAD_PRIORITY_LOW ) )
{
......
......@@ -326,7 +326,7 @@ static int CreateFilter ( vlc_object_t *p_this )
p_sys->p_worker_thread = vlc_object_create( 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",
if( vlc_thread_create( p_sys->p_worker_thread,
vnc_worker_thread, VLC_THREAD_PRIORITY_LOW ) )
{
vlc_object_release( p_sys->p_worker_thread );
......@@ -701,7 +701,6 @@ static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
sizeof( vlc_object_t ) );
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 ) )
{
vlc_object_release( p_update_request_thread );
......
......@@ -171,7 +171,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,
if( vlc_thread_create( p_thread, Thread,
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_filter, "cannot lauch goom thread" );
......
......@@ -301,7 +301,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 ) )
if( vlc_thread_create( p_dec, DecoderThread, i_priority ) )
{
msg_Err( p_dec, "cannot spawn decoder thread" );
module_unneed( p_dec, p_dec->p_module );
......
......@@ -764,8 +764,7 @@ static int TsStart( es_out_t *p_out )
vlc_object_set_destructor( p_ts, TsDestructor );
p_sys->b_delayed = true;
if( vlc_thread_create( p_ts, "es out timeshift",
TsRun, VLC_THREAD_PRIORITY_INPUT ) )
if( vlc_thread_create( p_ts, TsRun, VLC_THREAD_PRIORITY_INPUT ) )
{
msg_Err( p_sys->p_input, "cannot create input thread" );
......
......@@ -217,8 +217,7 @@ int input_Preparse( vlc_object_t *p_parent, input_item_t *p_item )
int input_Start( input_thread_t *p_input )
{
/* Create thread and wait for its readiness. */
if( vlc_thread_create( p_input, "input", Run,
VLC_THREAD_PRIORITY_INPUT ) )
if( vlc_thread_create( p_input, Run, VLC_THREAD_PRIORITY_INPUT ) )
{
input_ChangeState( p_input, ERROR_S );
msg_Err( p_input, "cannot create input thread" );
......
......@@ -96,8 +96,7 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
vlc_object_attach( s, p_obj );
if( vlc_thread_create( s, "stream out", DStreamThread,
VLC_THREAD_PRIORITY_INPUT ) )
if( vlc_thread_create( s, DStreamThread, VLC_THREAD_PRIORITY_INPUT ) )
{
stream_CommonDelete( s );
free( p_sys->psz_name );
......
......@@ -132,7 +132,7 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
* (it needs access to the main thread) */
if( p_intf->b_should_run_on_first_thread )
{
if( vlc_thread_create( p_intf, "interface", MonitorLibVLCDeath,
if( vlc_thread_create( p_intf, MonitorLibVLCDeath,
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_intf, "cannot spawn libvlc death monitoring thread" );
......@@ -149,7 +149,7 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
#endif
/* Run the interface in a separate thread */
if( p_intf->pf_run
&& vlc_thread_create( p_intf, "interface", RunInterface,
&& vlc_thread_create( p_intf, RunInterface,
VLC_THREAD_PRIORITY_LOW ) )
{
msg_Err( p_intf, "cannot spawn interface thread" );
......
......@@ -68,8 +68,7 @@ static void *thread_entry (void *data)
* 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 vlc_thread_create( vlc_object_t *p_this, void *(*func) ( vlc_object_t * ),
int i_priority )
{
int i_ret;
......@@ -84,17 +83,14 @@ int vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line,
/* Make sure we don't re-create a thread if the object has already one */
assert( !p_priv->b_thread );
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 );
p_priv->b_thread = true;
else
{
p_priv->b_thread = false;
errno = i_ret;
msg_Err( p_this, "%s thread could not be created at %s:%d (%m)",
psz_name, psz_file, i_line );
msg_Err( p_this, "cannot create thread (%m)" );
free (boot);
}
return i_ret;
......@@ -105,8 +101,7 @@ int vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line,
* vlc_thread_set_priority: set the priority of the current thread when we
* couldn't set it in vlc_thread_create (for instance for the main thread)
*****************************************************************************/
int vlc_thread_set_priority( vlc_object_t *p_this, const char * psz_file,
int i_line, int i_priority )
int vlc_thread_set_priority( vlc_object_t *p_this, int i_priority )
{
vlc_object_internals_t *p_priv = vlc_internals( p_this );
......@@ -141,14 +136,12 @@ int vlc_thread_set_priority( vlc_object_t *p_this, const char * psz_file,
i_policy, &param )) )
{
errno = i_error;
msg_Warn( p_this, "couldn't set thread priority (%s:%d): %m",
psz_file, i_line );
msg_Warn( p_this, "cannot set thread priority (%m)" );
i_priority = 0;
}
}
#elif defined( WIN32 ) || defined( UNDER_CE )
VLC_UNUSED( psz_file); VLC_UNUSED( i_line );
#warning vlc_thread_set_priority() is BROKEN
if( true /*!SetThreadPriority(p_priv->thread_id->id, i_priority)*/ )
......
......@@ -405,8 +405,7 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
p_uct->pf_callback = pf_callback;
p_uct->p_data = p_data;
vlc_thread_create( p_uct, "check for update", update_CheckReal,
VLC_THREAD_PRIORITY_LOW );
vlc_thread_create( p_uct, update_CheckReal, VLC_THREAD_PRIORITY_LOW );
}
void* update_CheckReal( vlc_object_t* p_this )
......@@ -518,8 +517,7 @@ void update_Download( update_t *p_update, const char *psz_destdir )
p_update->p_download = p_udt;
p_udt->psz_destdir = psz_destdir ? strdup( psz_destdir ) : NULL;
vlc_thread_create( p_udt, "download update", update_DownloadReal,
VLC_THREAD_PRIORITY_LOW );
vlc_thread_create( p_udt, update_DownloadReal, VLC_THREAD_PRIORITY_LOW );
}
static void* update_DownloadReal( vlc_object_t *p_this )
......
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