transport(output): fix high CPU usage with camera_out_enabled and no images

This commit is contained in:
Aleix Conchillo Flaqué
2024-05-30 10:18:43 -07:00
parent a5d42a526c
commit aecb9f5816
2 changed files with 6 additions and 0 deletions

View File

@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed SileroVAD frame processor.
- Fixed an issue where `camera_out_enabled` would cause the highg CPU usage if
no image was provided.
## [0.0.24] - 2024-05-29
### Added

View File

@@ -252,6 +252,8 @@ class BaseOutputTransport(FrameProcessor):
image = next(self._camera_images)
self._draw_image(image)
time.sleep(1.0 / self._params.camera_out_framerate)
else:
time.sleep(1.0 / self._params.camera_out_framerate)
except queue.Empty:
pass
except Exception as e: