Revert "Revert "Add support for custom buffer sizes..""

This reverts commit 06e301cfd97b096d418363477943a61444647000.
Required for building with Omnirom's frameworks/av