]> git.sesse.net Git - vlc/commitdiff
Remove useless parameters
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 12 Feb 2011 18:49:40 +0000 (20:49 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 12 Feb 2011 18:50:06 +0000 (20:50 +0200)
25 files changed:
include/vlc_threads.h
modules/access/dv.c
modules/access_output/bonjour.c
modules/audio_output/directx.c
modules/audio_output/hd1000a.cpp
modules/audio_output/oss.c
modules/audio_output/portaudio.c
modules/audio_output/waveout.c
modules/demux/mkv/demux.cpp
modules/media_library/ml_watch.c
modules/misc/rtsp.c
modules/stream_filter/httplive.c
modules/stream_out/transcode/video.c
modules/stream_out/vod.c
modules/video_filter/atmo/AtmoThread.cpp
modules/video_filter/atmo/atmo.cpp
modules/video_filter/remoteosd.c
modules/visualization/goom.c
src/input/decoder.c
src/input/es_out_timeshift.c
src/input/input.c
src/input/stream_demux.c
src/interface/interface.c
src/misc/threads.c
src/misc/update.c

index 5542ecb82e9d92e3da8b365571d68474b3c5a4d9..d53c9e39a0bd03cd093527136e26bd0f777dde97 100644 (file)
@@ -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) )
index db6680bc9b015a855ad09cd512efe4b449a71329..a41906adf5b86a08f58c396170544bc43dcb9953 100644 (file)
@@ -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;
index 3dfb9b888a136860df1342217a7629f9e7dfca92..57d3b5c6f6df7d962dda133333d024d1be545d27 100644 (file)
@@ -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 ) )
     {
index 72dc7dc4c4bd1e8f7c42acca8c1218c7799c60b0..7e9694d1e293ccccada8f33d1fa81caf51232985 100644 (file)
@@ -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 ) )
     {
index 29481707c72ed01bf51b26ad13ce0d51c96d39ce..bba795997bfff5bf183d78877de19f158fba5d9f 100644 (file)
@@ -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)" );
index 72a9e8922b266502d95a3ec3bf2536180b9793c5..2be5669a5a49bd5178a379adbcfe8d569248a6e2 100644 (file)
@@ -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)" );
index 4ddaffac62fca73c158679aac909556fa0951136..2c6a0ea1dfb0e9f2fddc5979ed853f30ad24c56f 100644 (file)
@@ -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" );
index e7979e89d5730d1ac1daed1acd56ce79f4784193..402e580eb5e97cc6a9ac1729f551bb08d4788cd1 100644 (file)
@@ -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" );
     }
index fca6315df1a8a476fa90b823f9cae7e2cd4b09a3..994b354faa9069b0f23f216c141d730b67ce2b44 100644 (file)
@@ -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 );
     }
 }
 
index 502a6afe86d60d47141ba207e72fc34a812968d0..f542d81814fc6e6faf32e0268c583b42b670692e 100644 (file)
@@ -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 );
index ea437e6285b596d7855f37a1ec839de3b6285b4f..54e3a26f2f7195f7b51d5e1d7696a563e264cdc1 100644 (file)
@@ -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 );
index 197a2dc25214d07cbe8a5fb48dd7a80fd25f7951..4c2654e567d359572bdcdfd03e6700e6c80cc4ad 100644 (file)
@@ -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;
     }
index b983ddc0cafabedf57110c2d9ad31e4bc19ea139..3740f63cbf79e65e946ee0d6d436bee11e6443eb 100644 (file)
@@ -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 );
index 4dd6d7b7f57915be6043ab766c21936e07e06faf..f80dccbb2f59a7455d38b3d7db483dabd9f978ea 100644 (file)
@@ -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 );
index 5aea76706326c9a56a063bd20a10f4da571aa952..f916cba9c9253ebe8a1b8f70a492c6c7361e8bec 100644 (file)
@@ -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 ))
    {
index 1145e0e2266bda71e1d28c2b1468ee99b5dcc31a..ca3e44995a43277f80ee93188516705e1f3a26d5 100644 (file)
@@ -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 ) )
                 {
index 07f75a59694312dfafd5b6324ca0725aa2d11aba..cd1b28453e4813530366f501ef07abeb1b14de6b 100644 (file)
@@ -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 );
index e68e1485ac50b32d266772adc3ee99ab68f1cf7d..325d585242084fc2820e4f74d789da41f2b75a65 100644 (file)
@@ -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" );
index 22201b2b9c034a57e380b6f281394e3511e54787..2efe9e5896921aa765dd81b53f84598f75690183 100644 (file)
@@ -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 );
index 3ac19d5abd660db7efdf1b2728c0c25205670ebe..b83d72011f4a174464d75e22d8b82bbe99a4aae5 100644 (file)
@@ -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" );
 
index 60a6746f8fadeafe33cc33523c8677e38472754c..15434c89597899411e56d178031e8912649ed5a2 100644 (file)
@@ -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" );
index ac55d4c0e3ce6293369a86e847be65a2dc262f9d..3d57d853c599ff3c63bb4fd9d07f66b3d8ecd0d5 100644 (file)
@@ -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 );
index 43b45f28d17af44730c25f12abea815042f5072b..7f44cc0963fa63add9aae4db84dc7a867479c279 100644 (file)
@@ -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" );
index cbb61bc709d9d0dd14a19bdd63f20c25ee969346..265f60bd8bb922636cc36f47e6d34c710faf9d89 100644 (file)
@@ -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)*/ )
index 3fccdf97c8562b5732b3222ee5ee0ec95ca51c15..16aa143f4adc6a87b6c41ce696e84dee98cbb6cd 100644 (file)
@@ -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 )