From 5a77903c1ff1a9b9ae3c21a98656e8dd6bf10c04 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Mon, 15 Apr 2024 20:44:27 +0200 Subject: [PATCH] Add comment about semaphores --- src/surl-server/helpers/stream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/surl-server/helpers/stream.c b/src/surl-server/helpers/stream.c index 8a80a753..4cc183d5 100644 --- a/src/surl-server/helpers/stream.c +++ b/src/surl-server/helpers/stream.c @@ -914,6 +914,8 @@ static void *audio_push(void *unused) { continue; } } + + /* FIXME I should be able to sem_post */ send_av_sample(audio_data[cur] * AV_MAX_LEVEL/audio_max); fflush(ttyfp); cur++; @@ -990,6 +992,8 @@ void *video_push(void *unused) { enqueue_byte(0xFF, ttyfp2); /* Switch page */ flush_changes(ttyfp2); + /* FIXME I should be able to sync with sem_wait() if it weren't + * for unpredicable buffering */ if (sync_fps(&frame_start) || skip_next) { gettimeofday(&frame_start, 0); DEBUG("skipping frame\n");