Browse Source

libobs: Set video thread qos class to user interactive on macOS

John Bradley 2 years ago
parent
commit
8981afe5b4
1 changed files with 4 additions and 1 deletions
  1. 4 1
      libobs/obs.c

+ 4 - 1
libobs/obs.c

@@ -748,7 +748,10 @@ static int obs_init_video(struct obs_video_info *ovi)
 
 	int errorcode;
 #ifdef __APPLE__
-	errorcode = pthread_create(&video->video_thread, NULL,
+	pthread_attr_t attr;
+	pthread_attr_init(&attr);
+	pthread_attr_set_qos_class_np(&attr, QOS_CLASS_USER_INTERACTIVE, 0);
+	errorcode = pthread_create(&video->video_thread, &attr,
 				   obs_graphics_thread_autorelease, obs);
 #else
 	errorcode = pthread_create(&video->video_thread, NULL,