how to process video/audio/metadata using Wowza API/SDK when packaging to HLS?

When transmitting MPEG-2 TS video sent to Wowza via rtsp/rtp from Wowza to HLS, how to process video/audio/metadata using Wowza API/SDK when packaging to HLS?