Skip to content
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

Asyncio: minor improvements and bugfixes. #366

Merged
merged 8 commits into from Jul 8, 2023
Merged

Conversation

abhiTronix
Copy link
Owner

Brief Description

These PR include various improvements and fixes for asyncio packages namely Webgear and WebGear_RTC.

Requirements / Checklist

Related Issue

#360
#362

Context

This PR introduce bug fix related to ndim==3 grayscale frames in Webgear_RTC API, and added option to add custom video endpoint path to Webgear API, and other minor fixes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

- 🎨 Fixed naming conventions for recently added DXcam backend in ScreenGear.
- 🚚 Relocated docs to better context.

📄 ScreenGear: Updated class and class parameters description.
#360)

- 🐛 Fixed a bug caused by PyAV's raising error for `ndim==2` grayscale frames.
  - 🚑️ The API will now drop the third dimension if a `ndim==3` grayscale frames are detected.
- ⚡️ Improved handling of the `format` parameter when constructing a `VideoFrame` from ndarray frames.
- 💥 The API will raise a `ValueError` if unsupported shaped frames are detected.
- 🧑‍💻 Users can now alter video endpoint path from "/video" to any alphanumeric string.
- 🚩 Added `custom_video_endpoint` optional string attribute for this purpose.
  - 🥅 Only alphanumeric string with no space in between are allowed as its value.
- 🎨 Improved conditions logic to check if non-empty values are assigned to optional parameters.
…ute.

- 🎨 Added example code, admonition, and necessary context.
- 💚 Updated `test_webgear_rtc_custom_stream_class` method.
- ✨ Added `Custom_Grayscale_class` to produce `ndim==3` grayscale frames.
- 🗑️ Removed unused imports.
…tribute.

- 💚 Updated `test_webgear_options` method.
@abhiTronix abhiTronix added BUG 🐛 Vidgear api's error, flaw or fault ENHANCEMENT ⚡ New Feature/Addition/Improvement WORK IN PROGRESS 🚧 currently been worked on. PENDING TESTS 🧪 Waiting for CI tests to complete successfully. labels Jul 7, 2023
@abhiTronix abhiTronix added this to the v0.3.1 milestone Jul 7, 2023
@abhiTronix abhiTronix self-assigned this Jul 7, 2023
@abhiTronix abhiTronix added this to In progress in VidGear v0.3.1 via automation Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 84.61% and project coverage change: -0.08 ⚠️

Comparison is base (612dee0) 94.03% compared to head (c852b8e) 93.96%.

❗ Current head c852b8e differs from pull request most recent head dee41a8. Consider uploading reports for the commit dee41a8 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           testing     #366      +/-   ##
===========================================
- Coverage    94.03%   93.96%   -0.08%     
===========================================
  Files           16       16              
  Lines         3136     3146      +10     
===========================================
+ Hits          2949     2956       +7     
- Misses         187      190       +3     
Impacted Files Coverage Δ
vidgear/gears/screengear.py 79.56% <ø> (ø)
vidgear/gears/asyncio/webgear_rtc.py 95.00% <80.00%> (+0.06%) ⬆️
vidgear/gears/asyncio/webgear.py 98.30% <87.50%> (-0.52%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

- 🚑️ Fixed bug in conditional logic which resulted in `custom_video_endpoint` attribute allowing non-alphanumeric values.
- 🔊 Improved logging.

CI:
- ✅ Updated `test_webgear_routes` test to validate new custom endpoint.
- ☂️ Updated tests to increase code coverage.
@abhiTronix abhiTronix merged commit 41c9e99 into testing Jul 8, 2023
10 checks passed
VidGear v0.3.1 automation moved this from In progress to Done Jul 8, 2023
@abhiTronix abhiTronix deleted the development branch July 8, 2023 16:55
@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed WORK IN PROGRESS 🚧 currently been worked on. PENDING TESTS 🧪 Waiting for CI tests to complete successfully. labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG 🐛 Vidgear api's error, flaw or fault ENHANCEMENT ⚡ New Feature/Addition/Improvement SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Question]: Change default video path in WebGear [Bug]: frame_size_reduction does not allow value of 0
1 participant