I took the liberty of a first stab at the source - see attachment.
It shall be deemed work-in-progress because it is neither finished, nor sufficiently tested (beyond a perl -c) yet.
It seems, that compared with the other Control modules the Reolink code is at technical debt level 9000.
For now removed like 50% of the code, which was just brutal copy&paste boilerplate and suddenly the
code starts revealing what it aims to do. My guess is that the 39000 bytes can be cut to 10000 and
hopefully I will eventually make the Reolink module the shiniest one.
Will need more quality time with the code still, so JFYI that something like that is happening.
PS: "Invalid file extension for .pm files..." - so .txt it is.
ZoneMinder::Control::Reolink refactoring
ZoneMinder::Control::Reolink refactoring
- Attachments
-
- Reolink.txt
- Rename to Reolink.pm
- (19.11 KiB) Downloaded 276 times
testing ZM v1.34.23 - a Turnkey Linux appliance VM running on Proxmox
VM has currently 8 Denverton Cores, 4GB RAM of which are 2.5GB shared memory, 1TB disk space
2 x Reolink RLC-410 5MP
VM has currently 8 Denverton Cores, 4GB RAM of which are 2.5GB shared memory, 1TB disk space
2 x Reolink RLC-410 5MP
Re: ZoneMinder::Control::Reolink refactoring
Next iteration.
I shall - however - deep dive into ZoneMinder::ONVIF and therefore the ONVIF::Client rabbit hole. Maybe even most of this code will not be necessary anymore.
Reolink claims their cams do support ONVIF 2.1 and I would think the right way to do things would be some nice GetCapabilities voodoo before doing something with the camera (according to what the camera claims it is capable to do). And then I suppose it wouldn't even need a Reolink-specific code.
I shall - however - deep dive into ZoneMinder::ONVIF and therefore the ONVIF::Client rabbit hole. Maybe even most of this code will not be necessary anymore.
Reolink claims their cams do support ONVIF 2.1 and I would think the right way to do things would be some nice GetCapabilities voodoo before doing something with the camera (according to what the camera claims it is capable to do). And then I suppose it wouldn't even need a Reolink-specific code.
- Attachments
-
- Reolink.txt
- removal of copies of string constants
- (16.72 KiB) Downloaded 281 times
testing ZM v1.34.23 - a Turnkey Linux appliance VM running on Proxmox
VM has currently 8 Denverton Cores, 4GB RAM of which are 2.5GB shared memory, 1TB disk space
2 x Reolink RLC-410 5MP
VM has currently 8 Denverton Cores, 4GB RAM of which are 2.5GB shared memory, 1TB disk space
2 x Reolink RLC-410 5MP
Re: ZoneMinder::Control::Reolink refactoring
I'd hate to see your work go to waste. When I submitted a very small pull request it was applied quickly. Please note I did not read your changes but based on your comment maybe you would want to start with something smaller at first. Of course if you just wanna modify your own copy of Zoneminder, have at it. I'm fairly certain posting changes like this will never improve zoneminder . Hope this helps
https://github.com/ZoneMinder/zoneminde ... l-Requests
https://github.com/ZoneMinder/zoneminde ... l-Requests
Re: ZoneMinder::Control::Reolink refactoring
Not sure what you mean by smaller. This thread isn't meant as a side-channel for patch submission, it's a JFYI.
I'm very well aware of the standard GitHub PR process.
testing ZM v1.34.23 - a Turnkey Linux appliance VM running on Proxmox
VM has currently 8 Denverton Cores, 4GB RAM of which are 2.5GB shared memory, 1TB disk space
2 x Reolink RLC-410 5MP
VM has currently 8 Denverton Cores, 4GB RAM of which are 2.5GB shared memory, 1TB disk space
2 x Reolink RLC-410 5MP
Re: ZoneMinder::Control::Reolink refactoring
Thanks for taking this on.