#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
#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) )
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;
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 ) )
{
/* 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 ) )
{
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)" );
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)" );
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" );
/* 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" );
}
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 );
}
}
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 );
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 );
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;
}
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 );
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 );
#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 ))
{
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 ) )
{
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 ) )
{
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 );
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 );
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" );
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 );
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" );
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" );
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 );
* (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" );
#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" );
* 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;
/* 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;
* 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 );
i_policy, ¶m )) )
{
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)*/ )
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 )
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 )