Working vision example

This commit is contained in:
Chad Bailey
2024-03-19 01:51:36 +00:00
parent 6c9425d66a
commit 0b4b63d2ee
7 changed files with 34 additions and 21 deletions

View File

@@ -230,14 +230,12 @@ class DailyTransportService(BaseTransportService, EventHandler):
self.client.release()
def _handle_video_frame(self, participant_id, video_frame):
# TODO-CB: What about multiple participants?
if (not participant_id in self._participant_frame_times) or (time.time() > self._participant_frame_times[participant_id] + 1.0/self._receive_video_fps):
print(f"### sending frame now")
self._participant_frame_times[participant_id] = time.time()
asyncio.run_coroutine_threadsafe(
future = asyncio.run_coroutine_threadsafe(
self.receive_queue.put(
VideoImageFrame(participant_id, video_frame)), self._loop
)
VideoImageFrame(participant_id, video_frame)), self._loop)
def on_first_other_participant_joined(self):
pass