refactoring for spead_pipeline support