FilterLayer *layer is the filter layer in which the filter is installed.
const void *buf is the buffer that contains the outgoing data.
int amount is the number of bytes in the buffer.