-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Suggestion] Improvements to the display/screen sync #75
Comments
Hi @DatCaptainHorse ! Thank you for your suggestion. I wanted to improve it, but I wasn't able to find a better and working solution so far. The problem is to get the region's average color in GJS in time. The only way I found was to use the gnome-shell function getColorPixel(), which is at least... fast enough if only a few pixels are used. I tried several approaches like gstreamer or taking screenshots of the whole desktop and analyzing. Taking screenshots is too slow. Much slower than calling getColorPixel() a few times. I hope someday I will change this feature to use the gstreamer but currently it is not possible. Long story short: this issue: https://gitlab.gnome.org/GNOME/gjs/-/issues/557 is stopping me. I can not connect to the signal from gstreamer successfully. Do have an idea of how to get the screen color fast enough in gjs? Please share the technical knowledge:-) ...or at least which component would you use? I will happily improve the sync feature with such a hint. |
Hi @vchlum , if I could add my thoughts to this and start with a big thank you for this software - I love it. I just bought a Hue Gradient Light Strip for my PC and it's working in Linux, using your software, in Wayland. Huestacean and Huenicorn don't work, so thank you!! I think the screen colour picker is not the main issue (for me, at least). It seems that when I'm playing a game, or am on my desktop, the colours get sampled OK. The main issue is that there is no blending of colours as they transition from one to the next. What I mean by this is: ColourGetsSampled -> NewColourGetsSampled -> InstantChange (it's an instant transition and is quite jarring) I would suggest a transition. ColourGetsSampled -> NewColourGetsSampled -> GradualChange Now I don't know how to code, but this YouTube video for a complete different app probably shows it best: https://www.youtube.com/watch?v=HwB3eh-D870 As mentioned earlier, if this colour-blending could happen faster-slower depending on "Intensity" setting, that would be helpful. Does this make sense? |
Looking at the code of screen sync, it feels almost criminal how it's been kept so simple for so long!
Relying on single pixel per-side, without any sort of smoothing from previous color or averaging of color causes syncing to be very rough with big screen changes. Especially for games.
Here's some improvements that can be done, like I mentioned above:
Decent Javascript knowledge should be enough for someone to PR these changes 🙂
(I would do this myself, but my meds have supply issues and I've ran out, so my brain has turned to slime)
The text was updated successfully, but these errors were encountered: