Set various thread names
Helps identify which threads are which when debugging
This commit is contained in:
@@ -354,6 +354,8 @@ static void *audio_thread(void *param)
|
||||
uint64_t prev_time = os_gettime_ns() - buffer_time;
|
||||
uint64_t audio_time;
|
||||
|
||||
os_set_thread_name("audio-io: audio thread");
|
||||
|
||||
while (os_event_try(audio->stop_event) == EAGAIN) {
|
||||
os_sleep_ms(AUDIO_WAIT_TIME);
|
||||
|
||||
|
@@ -160,6 +160,8 @@ static void *video_thread(void *param)
|
||||
{
|
||||
struct video_output *video = param;
|
||||
|
||||
os_set_thread_name("video-io: video thread");
|
||||
|
||||
while (os_sem_wait(video->update_semaphore) == 0) {
|
||||
if (video->stop)
|
||||
break;
|
||||
|
@@ -537,6 +537,8 @@ void *obs_video_thread(void *param)
|
||||
uint64_t cur_time = os_gettime_ns();
|
||||
uint64_t interval = video_output_get_frame_time(obs->video.video);
|
||||
|
||||
os_set_thread_name("libobs: graphics thread");
|
||||
|
||||
while (!video_output_stopped(obs->video.video)) {
|
||||
last_time = tick_sources(cur_time, last_time);
|
||||
|
||||
|
Reference in New Issue
Block a user