Update readers to be memory pool friendly

This commit is contained in:
Lukas Herman
2020-10-28 23:12:59 -07:00
parent f4a4edcabd
commit 559c6a13a1
50 changed files with 273 additions and 271 deletions

View File

@@ -58,7 +58,7 @@ type VideoEncoderBuilder interface {
// ReadCloser is an io.ReadCloser with methods for rate limiting: SetBitRate and ForceKeyFrame
type ReadCloser interface {
Read() ([]byte, error)
Read() (b []byte, release func(), err error)
Close() error
// SetBitRate sets current target bitrate, lower bitrate means smaller data will be transmitted
// but this also means that the quality will also be lower.