roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.02k stars 203 forks source link

Frame pool #697

Closed gavv closed 1 month ago

gavv commented 4 months ago

Make frame pooled and holding reference to a buffer, also pooled.

This will allow to create queues/ring buffers of frames, reuse existing buffers (e.g. attach buffer from packet directly to a frame), and reuse existing frames (e.g. return same frame twice).

This is also needed to be able to return frame of different size than requested and thus implement partial reads (#615).