Set various thread names

Helps identify which threads are which when debugging
This commit is contained in:
jp9000
2015-01-02 05:36:09 -08:00
parent 144fb925ff
commit f93b2fe794
5 changed files with 14 additions and 0 deletions

View File

@@ -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);

View File

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

View File

@@ -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);