frameAvailableSoon

Notifies the encoder thread that a new frame will shortly be provided to the encoder.

There may or may not yet be data available from the encoder output. The encoder has a fair mount of latency due to processing, and it may want to accumulate a few additional buffers before producing output. We just need to drain it regularly to avoid a situation where the producer gets wedged up because there's no room for additional frames.

If the caller sends the frame and then notifies us, it could get wedged up. If it notifies us first and then sends the frame, we guarantee that the output buffers were emptied, and it will be impossible for a single additional frame to block indefinitely.