-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Start SmartPointers #1679
Start SmartPointers #1679
Conversation
Prepare logBuffer-JSON snapshot view in LoggerManager, Increase buffered loglines to 500
…screen resolution) That avoids unnecessary resizing of the output image with every transferFrame call
libsrc/hyperion/GrabberWrapper.cpp
Outdated
@@ -56,6 +56,8 @@ GrabberWrapper::GrabberWrapper(const QString& grabberName, Grabber * ggrabber, i | |||
|
|||
GrabberWrapper::~GrabberWrapper() | |||
{ | |||
_timer->stop(); | |||
delete _timer; |
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.
💭 Should such an operation be performed by a smart pointer?
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.
Yes. That would work.
Unfortunately, we are only two developers currently and do have the bandwidth cleaning up the whole code base proactively now. Esp. Like for the sample where the code correctly works and there is limited immediate benefit.
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.
How do you think about to avoid redundant code a bit more? 🤔
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.
I am not sure, I get your question…
Maybe you can clarify.
In case of new additions or refactoring code, now Smartpointers can be used to avoid additional boilerplate and make code more maintainable.
Nevertheless, there are more serious problems out there than removing working statements like above.
E.g. the grabber design is not consistent any longer and not every grabber is scalable.
Spending refactoring effort in that light would make great sense including removing redundant code.
We would be happy, if you and others would give us a helping hand in cleaning up current code and/or designs.
* Refactor to fix hyperion-project#1671 * Add GUI/NonGUI mode to info page * Do not show lock config, if in non-UI mode * Updae Changelog * Correct includes * Ensure key member initialization - RGB Channels * Ensure key member initialization - WebServer * Update RGBChannels * Fix initialization order * Fix key when inserting new logger in LoggerMap, Prepare logBuffer-JSON snapshot view in LoggerManager, Increase buffered loglines to 500 * Fix Memory leak in GrabberWrapper * Fix Memory leak in BlackBorderProcessor * Fix Memory leak in BlackBorderProcessor * use ninja generator under macos * Fix BGEffectHandler destruction * Fix Mdns code * Clear list after applying qDeleteAll * Fix deletion of CecHandler * Fix memory leak caused by wrong buffer allocation * Remove extra pixel consistently * Change mDNS to Qt SmartPointers * Correct removal * Fix usage of _width/_height (they are the output resolution, not the screen resolution) That avoids unnecessary resizing of the output image with every transferFrame call * Move main non Thread Objects to Smart Pointers * Refactor Hyperion Daemon unsing smartpointers * Correction * Correct typos/ align text * Fix startGrabberDispmanx * Fix startGrabberDispmanx * Address CodeQL finding * Create Screen grabbers via Template * Fix typo * Change way of logging * Revert change * Address deprecation warning * Correct auto screen grabber evaluation --------- Co-authored-by: Paulchen-Panther <[email protected]>
…1689) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump actions/cache from 3 to 4 (hyperion-project#1690) Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump peter-evans/repository-dispatch from 2.1.2 to 3.0.0 (hyperion-project#1691) Bumps [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) from 2.1.2 to 3.0.0. - [Release notes](https://github.com/peter-evans/repository-dispatch/releases) - [Commits](peter-evans/repository-dispatch@v2.1.2...v3.0.0) --- updated-dependencies: - dependency-name: peter-evans/repository-dispatch dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Workflow adapted to armv6 Corrections after release 2.0.16 (hyperion-project#1694) * Updates on building a release * Fixes * Correct non arm64 identification * Show download bar * reset all units with failed status * Reload systemd daemon after updates * Force Qt5 for armv6 packages --------- Co-authored-by: Paulchen-Panther <[email protected]> fix workflow run ProviderHID.cpp aktualisieren update libusb separate targets example test RUN test RUN cache path powershell installer installer installer typo test RUN test RUN test RUN Refactor Start SmartPointers (hyperion-project#1679) * Refactor to fix hyperion-project#1671 * Add GUI/NonGUI mode to info page * Do not show lock config, if in non-UI mode * Updae Changelog * Correct includes * Ensure key member initialization - RGB Channels * Ensure key member initialization - WebServer * Update RGBChannels * Fix initialization order * Fix key when inserting new logger in LoggerMap, Prepare logBuffer-JSON snapshot view in LoggerManager, Increase buffered loglines to 500 * Fix Memory leak in GrabberWrapper * Fix Memory leak in BlackBorderProcessor * Fix Memory leak in BlackBorderProcessor * use ninja generator under macos * Fix BGEffectHandler destruction * Fix Mdns code * Clear list after applying qDeleteAll * Fix deletion of CecHandler * Fix memory leak caused by wrong buffer allocation * Remove extra pixel consistently * Change mDNS to Qt SmartPointers * Correct removal * Fix usage of _width/_height (they are the output resolution, not the screen resolution) That avoids unnecessary resizing of the output image with every transferFrame call * Move main non Thread Objects to Smart Pointers * Refactor Hyperion Daemon unsing smartpointers * Correction * Correct typos/ align text * Fix startGrabberDispmanx * Fix startGrabberDispmanx * Address CodeQL finding * Create Screen grabbers via Template * Fix typo * Change way of logging * Revert change * Address deprecation warning * Correct auto screen grabber evaluation --------- Co-authored-by: Paulchen-Panther <[email protected]> Disable current service, even if not active build Hyperion under MacOS as a universal app (x68_64/arm64) And of course a little "aufgeräumt" Refactor test RUN
Summary
Note: PR includes main changes of #1678
What kind of change does this PR introduce? (check at least one)
If changing the UI of web configuration, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing setups:
The PR fulfills these requirements:
Fixes: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information:
Fixes #981