CCodec: split preparation and request of initial input buffers

The split allows MediaCodec to gracefully reclaim and restart
in case of no memory failure while preparing the initial input buffers.

Bug: 233086714
Test: atest CommonEncryptionDrmTest#cbcsSchemeTypeV25
Test: atest android.media.encoder.cts.VideoEncoderTest
Change-Id: I53062cd0c7e5ed86eb171d156d2a529b5d08a350
3 files changed