-
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- ποΈ Replaced deprecated Starlette's `on_shutdown` parameter with an async context manager `lifespan` in WebGear and WebGear_RTC APIs. - π Moved shutdown logic for VideoGear and peer RTC connections to this new `lifespan` context manager. - π¦οΈ Added new `contextlib` import for using `asynccontextmanager`. ### NetGear_Async API: - π©Ή Fixed event loop handling - β‘οΈModified `__init__` method to handle event loop more robustly: - Try to get the running event loop using `asyncio.get_running_loop()` - If no running event loop found, create a new one with `asyncio.new_event_loop()` - Log if creating a new event loop - π§βπ» Changed launch method to use `self.loop.create_task()` instead of `asyncio.ensure_future()` - Ensures the task is created using the correct event loop instance. - ποΈ Fix event loop initialization on Windows platforms - β‘οΈ Moved the event loop initialization code to an earlier point before setting event loop policy to ensure it is set up correctly before selecting `WindowsSelectorEventLoop` policy. - π¬ Background: On Windows, vidgear requires the `WindowsSelectorEventLoop`, but Python 3.8 and above defaults to the `ProactorEventLoop` which is not compatible. - π₯ Removed redundant python version check to set `WindowsSelectorEventLoop` policy, as minimum supported version is already `3.8`. - π‘ Updated code comments. - β‘οΈ Move event loop setup and policy assignment to the beginning of `__init__` before zmq Context creation. ### PiGear API: - ποΈ Modify PiGear class behavior when `enforce_legacy_picamera=True` on unsupported system - β‘οΈ Instead of silently disabling `picamera2` API directly, PiGear now raises an error if `picamera` is unavailable or unsupported - π₯ Prevented incorrect initialization of `PiGear` class on unsupported 64-bit OS systems. ### Docs: - π Added workaround for 'AttributeError: 'DXCamera' object has no attribute 'is_capturing'' error on Windows. - π Added new `screengear_error11.png` asset. - π Update README.md with changes to JPEG compression options - βοΈ Replaces deprecated options (`frame_jpeg_quality`, `frame_jpeg_optimize`, `frame_jpeg_progressive`) with their newer equivalents (`jpeg_compression_quality,` `jpeg_compression_fastdct`, `jpeg_compression_fastupsample`) in WebGear usage example. - π Replaced buggy kofi widget with a button image in index.md - ποΈ Remove script tags from main.html and use a custom hook for adding JS - π₯ Remove site.webmanifest file - π Update mkdocs.yml with new configuration settings: - Set edit_uri for GitHub edit links - Add new theme features like content actions, tooltips, etc. - Update palette settings for light/dark mode - Enable new markdown extensions - Add custom JS hook for adding scripts on certain pages - β»οΈ Other minor tweaks and cleanups - π§βπ» Refactored all APIs and bonus examples to use linenums and hl_lines - Makes it easier to highlight specific lines in code blocks - π Updated remaining code examples for picamera2 and legacy picamera backends - π Replaced buggy kofi widget with a button image in `help.md` - π Update announcement icon in `main.html` - π Change system mode toggle icon and name in `mkdocs.yml` - π Add failure warning in various docs about `picamera` incompatibility on 64-bit OS ### CI: - π Deprecated event_loop fixture overrides. - π· Added new recommended approach of using `pytest.mark.asyncio(scope="module")` to mark all WebGear_RTC and NetGear_Async tests as asynchronous and utilize the same event loop throughout the module. - ποΈ Deprecated custom `event_loop` fixture overrides in WebGear_RTC and NetGear_Async tests. - π₯ Removed redundant `pytest.mark.asyncio` decorators from several test functions. - π Refactor event loop handling - π· Add a new event_loop_policy fixture for pytest to override the event loop policy - π Log the event loop being used for debugging - π§ Mark the new fixture in relevant test functions with pytest.mark.asyncio(scope="module") - β»οΈ Remove unused imports and code cleanup
- Loading branch information
Showing
51 changed files
with
1,321 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.