FilterLayer *layer is the filter layer in which the filter is installed.
void *buf is the buffer in which data should be placed.
int amount is the maximum number of bytes that should be placed in the buffer.
int timeout is the number of seconds to allow for the read operation before returning. Do not use timeoutto return because not enough bytes were read in the given time. Instead, use this function to limit the amount of time devoted to waiting until some data arrives.