Julusian / node-elgato-stream-deck

A Node.js library for interfacing with the Elgato Stream Deck. https://julusian.github.io/node-elgato-stream-deck/
https://www.npmjs.com/org/elgato-stream-deck
MIT License
163 stars 21 forks source link

feat: prepared buffers #102

Open Julusian opened 2 months ago

Julusian commented 2 months ago

The aim of this is to better support users who want to do rapid drawing of the same buffers, such as to achieving flashing or gif behaviour.

This is a performance optimisation by allowing them to 'prepare' a draw, which does all the buffer preparation and jpeg encoding necessary, and then repeatedly send the draw when wanted much cheaper than before.

The prepared buffer can be optionally made json safe, where the buffers will be encoded as a string at the cost of requiring it to be decoded each time it is drawn