Alison Francis,Senior Science Journalist
Sweat the small stuff
,这一点在Line官方版本下载中也有详细论述
BYOB (bring your own buffer) reads were designed to let developers reuse memory buffers when reading from streams — an important optimization intended for high-throughput scenarios. The idea is sound: instead of allocating new buffers for each chunk, you provide your own buffer and the stream fills it.
You call mediaSource.addSourceBuffer(mimeType) to declare what codec format you’ll be feeding the buffer.