Added streaming encode support