You can do the following:
1. Configure your DMA channel buffer size to be 16KB by changing the following:
channelConfig.size = 16KB
2. Configure the header size as following:
channelConfig.prodHeader = (Your header size) //let's say it is 10
I hope your DMA channel is configured as Manual (Since you need to add headers in the firmware)
If the configuration is as above,
After GPIF fills the DMA buffer with (16KB - 10bytes) of data, a Producer event will be generated which is seen in DMACallback.
Now while handling the Producer event in DMACallback, the header can be appended.
In this way for every buffer you can add header and commit it to USB.
For clear understanding of what is explained above, please go through the document and source code of AN75779
In AN75779 a MutilChannelDMA would be created (but for your requirement you can just focus on how the buffer sizes are configured and how the headers are getting added in dmaCallback.
Thanks for your reply.
I'll look into the document and come back if there is any further doubts.