Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
cbca9acd by Steve Lhomme at 2022-06-16T07:39:09+00:00
decoder: add a more specific thread name

We might want to known if it's an audio or video decoder.

- - - - -
7de9b8bd by Steve Lhomme at 2022-06-16T07:39:09+00:00
executor: reset the thread name once the job is finished

In case it set its own thread name.

- - - - -
a1647381 by Steve Lhomme at 2022-06-16T07:39:09+00:00
preparser: set thread names for executor tasks

- - - - -
3cf6cbb3 by Steve Lhomme at 2022-06-16T07:39:09+00:00
thumbnails: set thread names for executor task

- - - - -


5 changed files:

- src/input/decoder.c
- src/input/thumbnailer.c
- src/misc/executor.c
- src/preparser/fetcher.c
- src/preparser/preparser.c


Changes:

=====================================
src/input/decoder.c
=====================================
@@ -1658,7 +1658,17 @@ static void *DecoderThread( void *p_data )
     vlc_tick_t delay = 0;
     bool paused = false;
 
-    vlc_thread_set_name("vlc-decoder");
+    const char *thread_name;
+    switch (p_owner->dec.fmt_in.i_cat)
+    {
+        case VIDEO_ES: thread_name = "vlc-dec-video"; break;
+        case AUDIO_ES: thread_name = "vlc-dec-audio"; break;
+        case SPU_ES:   thread_name = "vlc-dec-spu"; break;
+        case DATA_ES:  thread_name = "vlc-dec-data"; break;
+        default:       thread_name = "vlc-decoder"; break;
+    }
+
+    vlc_thread_set_name(thread_name);
 
     /* The decoder's main loop */
     vlc_fifo_Lock( p_owner->p_fifo );


=====================================
src/input/thumbnailer.c
=====================================
@@ -178,6 +178,8 @@ on_thumbnailer_input_event( input_thread_t *input,
 static void
 RunnableRun(void *userdata)
 {
+    vlc_thread_set_name("vlc-run-thumb");
+
     task_t *task = userdata;
     vlc_thumbnailer_t *thumbnailer = task->thumbnailer;
 


=====================================
src/misc/executor.c
=====================================
@@ -136,6 +136,8 @@ ThreadRun(void *userdata)
         vlc_mutex_lock(&executor->lock);
         thread->current_task = NULL;
 
+        vlc_thread_set_name("vlc-exec-runner");
+
         assert(executor->unfinished > 0);
         --executor->unfinished;
         if (!executor->unfinished)


=====================================
src/preparser/fetcher.c
=====================================
@@ -301,6 +301,8 @@ static void NotifyArtFetchEnded(struct task *task, bool 
fetched)
 
 static void RunDownloader(void *userdata)
 {
+    vlc_thread_set_name("vlc-run-fetcher");
+
     struct task *task = userdata;
     input_fetcher_t *fetcher = task->fetcher;
 
@@ -379,6 +381,8 @@ error:
 
 static void RunSearchLocal(void *userdata)
 {
+    vlc_thread_set_name("vlc-run-searchl");
+
     struct task *task = userdata;
     input_fetcher_t *fetcher = task->fetcher;
 
@@ -410,6 +414,8 @@ end:
 
 static void RunSearchNetwork(void *userdata)
 {
+    vlc_thread_set_name("vlc-run-searchn");
+
     struct task *task = userdata;
 
     vlc_interrupt_set(&task->interrupt);


=====================================
src/preparser/preparser.c
=====================================
@@ -233,6 +233,8 @@ Fetch(struct task *task)
 static void
 RunnableRun(void *userdata)
 {
+    vlc_thread_set_name("vlc-run-prepars");
+
     struct task *task = userdata;
 
     vlc_tick_t deadline = task->timeout ? vlc_tick_now() + task->timeout



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0db5f7dbac49a7278018eeb0fb2a448863745d22...3cf6cbb30daa7923d2793ef08cae9599e672b72c

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0db5f7dbac49a7278018eeb0fb2a448863745d22...3cf6cbb30daa7923d2793ef08cae9599e672b72c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to