Simplify bypass buffer batching
BatchBuffer has three different clear methods (clear, flush, batchWasConsumed), and it's not hugely clear what each of them does. In general, BatchBuffer owning the sample buffer seems more complicated than having the caller own it, particularly when it can be "pending" inside of the batch buffer. This change moves ownership of the sample buffer to the caller. BatchBuffer is simplified as a result. There are also two behaviour changes: 1. The buffer's timeUs field is now set to the first sample's timestamp, rather than the last sample's. 2. A key-frame in the middle of the batch no longer causes the batch buffer to be considered a key-frame. Which seems like the right thing to do, because the batched data cannot be decoded independently of whatever came before it. PiperOrigin-RevId: 350921306
Showing
with
141 additions
and
184 deletions
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment