Просмотр исходного кода

libobs, linux-v4l2: Set thread names

Sets thread names for the hotkey and v4l2 capture threads.
Kurt Kartaltepe 4 лет назад
Родитель
Сommit
d8a253c42f
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      libobs/obs-hotkey.c
  2. 1 0
      plugins/linux-v4l2/v4l2-input.c

+ 2 - 0
libobs/obs-hotkey.c

@@ -1373,6 +1373,8 @@ void *obs_hotkey_thread(void *arg)
 {
 	UNUSED_PARAMETER(arg);
 
+	os_set_thread_name("libobs: hotkey thread");
+
 	const char *hotkey_thread_name =
 		profile_store_name(obs_get_profiler_name_store(),
 				   "obs_hotkey_thread(%g" NBSP "ms)", 25.);

+ 1 - 0
plugins/linux-v4l2/v4l2-input.c

@@ -169,6 +169,7 @@ static void *v4l2_thread(void *vptr)
 	uint64_t timeout_usec;
 
 	blog(LOG_DEBUG, "%s: new capture thread", data->device_id);
+	os_set_thread_name("v4l2: capture");
 
 	/* Get framerate and calculate appropriate select timeout value. */
 	v4l2_unpack_tuple(&fps_num, &fps_denom, data->framerate);