Add support for hardware codec.