abrenoch / hyperion-android-grabber

Screen grabber for hyperion
MIT License
194 stars 33 forks source link

Feature/average color #73

Closed abrenoch closed 6 years ago

abrenoch commented 6 years ago

This adds the ability to send only the average color of the screen to hyperion - which can be configured in the settings.

A couple things worth noting: The threshold for determining if a pixel should be considered black or not is currently hard-coded (if each RGB value is less than 5 then the pixel is considered black). I'm open to making this configurable, we just need to figure out the best way to represent that to the users. Could do percentage based.

I have noticed the clear command when stopping the grabber seems more likely to fail when using the average color. Though I think this is a symptom of a different problem more than the result of these changes. Got this resolved

This does contain code to make a black border detector work with the standard grabber behavior as well, but it has not been implemented. It seems to work well, but I didn't want that to get caught up in this PR.

This also does not work with the OpenGL grabber. I am considering removing that version of the grabber since the advantages it had are diminishing (and I don't want to do double work to keep it updated).

Let me know how it goes for you guys! Closes #46

Paulchen-Panther commented 6 years ago

This also does not work with the OpenGL grabber. I am considering removing that version of the grabber since the advantages it had are diminishing (and I don't want to do double work to keep it updated).

Definitely worth considering

abrenoch commented 6 years ago

Thanks for adding that to the TV preferences @ninovanhooff, looks like I neglected to do that!

ninovanhooff commented 6 years ago

Does it make sense to send a 1 pixel image rather than a setcolor command? Can't say I mind too much.

abrenoch commented 6 years ago

I actually tried using setColor instead originally, but the performance was not quite as smooth as using a 1px image instead. Possibly there was another reason for it performing poorly when I did try it though.

abrenoch commented 6 years ago

got those items updated - actually found and fixed a bug in the process too!