-
Notifications
You must be signed in to change notification settings - Fork 4
feat(client, server): Add frame overlay, call model_loader on server startup #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
64f3073 to
6962fc0
Compare
15ea366 to
2b17af1
Compare
|
Tested the changes with the decorated |
pytrickle/client.py
Outdated
| self._auto_loading_active | ||
| or ( | ||
| cfg | ||
| and cfg.enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can all the cfg checks be in a function in the LoadingConfig class? Both sides of the if block check the same values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in refactor with loading_config class
…e and rendering. - Updated TrickleClient to utilize LoadingOverlayController for loading state management. - Enhanced loading configuration handling in StreamServer and FrameProcessor. - Updated tests to reflect changes in loading behavior and ensure proper functionality.
- Consolidated timestamp updates in LoadingOverlayController to streamline manual loading state handling. - Fixed boolean parsing logic for manual loading overlay in StreamServer for clarity. - Updated comments in stream_processor to clarify the purpose of VideoProcessingResult.WITHHELD.
…troller to simplify its initialization
…overlay module - Moved LoadingConfig and LoadingMode definitions from loading_config to frame_overlay. - Updated LoadingOverlayController to utilize new frame_overlay module for loading state management. - Removed deprecated loading_config and loading_overlay_controller modules. - Adjusted imports across the codebase to reflect the new structure, ensuring consistent loading behavior handling.
- Updated the parameter update process to run synchronously, improving clarity and reducing complexity. - Enhanced logging for parameter updates to provide better feedback on success and failure. - Adjusted the loading overlay example to not block on parameter updates, while demonstrating frame processing delay
- Renamed LoadingConfig, LoadingMode, and LoadingOverlayController to OverlayConfig, OverlayMode, and OverlayController for improved clarity. - Updated all references across the codebase to reflect the new naming conventions. - Removed the loading_overlay_example.py file as it is no longer needed.
- Changed the overlay mode in OverlayConfig and related components to PROGRESSBAR for improved clarity - Updated all relevant references in the codebase and tests to reflect this change.
…lback logic - Added a check in TrickleClient to skip frames when the processor returns None. - Updated OverlayController to clarify the return value when overlay is disabled or in passthrough mode, ensuring processed frames can be None. - Improved fallback logic to use original_frame only when overlay logic applies.
ad-astra-video
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! Nice work on sticking with this one.
The frame overlay feature is a nice base to build on and some additional fixes bundled in to this to get things in a good state.
Update the PR name and add a description of all significant things changed and squash and merge!
This pull request adds automatic model loading to StreamProcessor and adds a "frame overlay" utility for rendering video output when frame processors are busy (i.e. warmup, reload, etc.) to ensure the encoder stays running with consistent frame throughput during long stream starts or parameter updates.
The change also ensures that
/healthstate forStreamServerbegins inLOADINGstate and changes toIDLEonce themodel_loaderhandler returns.New Example and Documentation Updates:
examples/overlay_example.pydemonstrating non-blocking model loading, server health transitions, automatic frame overlays, and real-time parameter updates.Overlay and Progress Bar Support:
Updated
TrickleClientto support optional overlay configuration, instantiate an overlay controller, and apply overlays during video frame processing, extend configuration throughStreamServerpytrickle/examples/overlay_example.py
Lines 176 to 181 in f336bc9
Added
OverlayConfig,OverlayMode, andOverlayControllerinpytrickle/__init__.pyfor easier integration and usage in client/server applications.Ensured overlay controller state is reset on client start/stop to prevent stale overlays.