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

(cherry picked from commit 8981afe5b4)
This commit is contained in:
John Bradley 2023-06-14 23:53:55 -05:00 committed by Ryan Foster
parent e0519ed1e8
commit c6ac31f7e1

View file

@ -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,