-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
⚡️ WebGear_RTC: Implemented a new easy way of defining Custom Streaming Class #272
Merged
Conversation
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
…ng Class. (Fixes #258) 💥 Removed support for assigning Custom Media Server Class(inherited from aiortc's VideoStreamTrack) in WebGear_RTC through its `config` global parameter. - ✨ Added new `custom_stream` attribute with WebGear_RTC `options` parameter that allows you to easily define your own Custom Streaming Class with suitable source(such as OpenCV). - ⚡️ This implementation supports repeated Auto-Reconnection or Auto-Refresh out-of-the-box. - 🧑💻 This implementation is more user-friendly and easy to integrate within complex APIs. - 🎨 This implementation supports all vidgear's VideoCapture APIs readily as input. - 🏗️ This implementation requires at-least `read()` and `stop()` methods implemented within Custom Streaming Class, otherwise WebGear_RTC will throw ValueError. - 🥚 WebGear_RTC API now automatically constructs `av.frame.Frame` from `numpy.nd.array` based on available channels in frames. - 🏗️ WebGear_RTC API will now throws ValueError if `source` parameter is None and `custom_stream` attribute isn't defined. CI: - 👷 Updated CI tests for new WebGear_RTC custom streaming class. Docs: - 📝 Added related usage docs for new WebGear_RTC custom streaming class. - 📝 Updated Advanced examples using WebGear_RTC's custom streaming class. - 👽️ Added changes for upgrading mkdocs-material from 7.x to 8.x in docs. - 🚸 Added outdated version warning block. - 🐛 Fixed content tabs failing to work. - 🚩 Updated WebGear_RTC parameters. - 🔥 Removed slugify from mkdocs causing invalid hyperlinks in docs. - 🐛 Fixed hyperlink in announcement bar. - 💄 Updated code highlighting.
abhiTronix
added
DOCS 📜
Issue/PR is related to vidgear docs.
ENHANCEMENT ⚡
New Feature/Addition/Improvement
WORK IN PROGRESS 🚧
currently been worked on.
labels
Dec 1, 2021
3 tasks
Codecov Report
@@ Coverage Diff @@
## testing #272 +/- ##
===========================================
+ Coverage 90.24% 94.76% +4.52%
===========================================
Files 16 16
Lines 3034 3040 +6
===========================================
+ Hits 2738 2881 +143
+ Misses 296 159 -137
Continue to review full report at Codecov.
|
abhiTronix
added
SOLVED 🏁
This issue/PR is resolved now. Goal Achieved!
and removed
WORK IN PROGRESS 🚧
currently been worked on.
labels
Dec 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
DOCS 📜
Issue/PR is related to vidgear docs.
ENHANCEMENT ⚡
New Feature/Addition/Improvement
PROPOSAL 📩
A proposal/proposition
SOLVED 🏁
This issue/PR is resolved now. Goal Achieved!
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
With this PR, WebGear_RTC now provides
custom_stream
attribute with itsoptions
parameter that allows you to easily define your own Custom Streaming Class with suitable source that you want to use to transform your frames before sending them onto the browser. This implementation support Auto-Reconnection or Auto-Refresh works out-of-the-box.Notable Changes:
config
global parameter.custom_stream
attribute with WebGear_RTCoptions
parameter that allows you to easily define your own Custom Streaming Class with suitable source(such as OpenCV).read()
andstop()
methods implemented within Custom Streaming Class, otherwise WebGear_RTC will throw ValueError.av.frame.Frame
fromnumpy.nd.array
based on available channels in frames.source
parameter is None andcustom_stream
attribute isn't defined.Requirements / Checklist
Related Issue
#258
Context
Currently for using OpenCV with WebGear_RTC we use Custom Source/Server which do not implement
close_connection
route or__reset_connections
internal function. With this PR, WebGear_RTC now providescustom_stream
attribute with itsoptions
parameter that allows you to easily define your own Custom Streaming Class with suitable source which can seamlessly handle restarting of source/server any number of times.Types of changes