Cleaning custom processor API

* Renames state->input to state->buffer (as it is used for both input and output)