-
Notifications
You must be signed in to change notification settings - Fork 28
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
Protobuffer and misc improvements #8
Conversation
RickDB
commented
Apr 18, 2016
•
edited
Loading
edited
- Removed JSON support, ProtoBuffer is now the default method to keep it simple and to follow Hyperion standards.
- Removed timer_tick solution for capture and replaced it with loop, capture interval is now no longer needed but can help with slower systems.
- Re-added missing parts of ProtoClient.
- Implemented reconnect support.
- Set DirectX PresentInterval to PresentInterval.Immediate.
- Cleaned up code.
…t simple and to follow Hyperion standards. Removed timer_tick solution for capture and replaced it with loop, capture interval is now no longer needed but can help with slower systems. Re-added missing parts of ProtoClient. Implemented reconnect support. Set DirectX PresentInterval to PresentInterval.Immediate. Cleaned up code.
Removed remaining Timer references.
Hi @RickDB, I checked your commit locally and there is a memory issue. It is smaller than the last pull request but still present (about +1mb every 5-8 seconds). Also, the image is shown sideways on the LEDs because of the way the ProtoClient is handling the pixel array. I already have some pixel manipulation on my code which is cleaner and uses less resources. Maybe we can add it to the SendImage method in the ProtoClient. I would also like to talk about your approach of using a loop and having to clear the images/priorities. I believe that simply setting a duration for the image to hyperion removes the need to have to clear the image when we are done sending information, also removing the chance of an image getting stuck in the LEDs because the application crashed. I want to create an amazing application together, so I would really love to collaborate instead of step on each other's toes. I look forward to your response. |
SendImage could indeed use further improving, it's from on our AtmoLight implementation and that part is pretty old and wasn't made by our team. We do need to flip the image because when it's converted into a memory stream it comes out mirrored and also strip the headers, with the current PR code it does match 1:1 with what's on the screen here atm. Adding a fixed duration in the sendimage request is a good idea so that in case of unexpected interrupts during loop it will not lock out any other applications with lower priorities, can also read the protobuffer request reply in case of errors but that does slow down processing a bit: RickDB@147b750#diff-ab01d62e631701e756335156709669dfR224 Want to make this amazing app together as well and glad to help out where ever I can, Hyperion forum will be up soon (~1-2 weeks) which has dedicated areas for 3rd party apps and such so that way we can probably share ideas easier and also get user feedback / feature requests :) |
Pushed potential fix for memory leak, forgot to add back the 2 dispose calls. |
Hi @hanselb , Forum and new wiki went live so can discuss some ideas there if you want :) Also been using this PR version for some time and seeing no memory leaks anymore so looks fixed. |
@hanselb |
Hey @brindosch yeah I'm still kicking it lol |
Glad to hear from you, we had the fear you where lost somewhere :) |
Hi @RickDB I hope you are doing well. So I am going to merge this pull request and then continue my implementation. There are a couple of things I want to go over.
I am going to start working on my local environment, but will not push until we get clarification on those points. |
Hi @hanselb doing fine and glad to see you working on it again :)
|
Hi @RickDB I added the new issues you mentioned and will start troubleshooting them soon. If you have any ideas or new bugs just add them as issues. I am working my way through them. 😄 I will remove the ClearPriority method calls and work on the image duration. I am thinking on maybe calculating how fast the software is capturing the screen to report FPS and to set the duration to just above the frame duration. Maybe do something similar with the capture interval. |