CCodecBufferChannel: Refers KEY_MAX_INPUT_SIZE value in toArrayMode, not C2_NAME_STREAM_MAX_BUFFER_SIZE_SETTING

Looking the exiting CCodec code, there is no place to fill the value for
C2_NAME_STREAM_MAX_BUFFER_SIZE_SETTING. App doesn't specify the value for it in their provided
format, because it is a codec2 internal parameter. App instead uses KEY_MAX_INPUT_SIZE to specify
the maximum size of input buffers.
CCodecBufferChannel always allocates buffers whose size is kLinearBufferSize (=1048576) in
toArrayMode() until the total number of buffers becomes |minSize|. On the other hand, first some
input buffers are allocated by requestNewBuffer(), where the buffer size specified by
KEY_MAX_INPUT_SIZE is used. Therefore, the buffer sizes in the same array become different.
As said above, App would specify the buffer size by KEY_MAX_INPUT_SIZE. KEY_MAX_INPUT_SIZE should
be referred in toArrayMode() as well as requestNewBuffer().

Bug: 119580521
Test: GtsMediaTestCases
Change-Id: I0b185225436308689ce38084b17d8fc56fe1d956
Merged-In: I0b185225436308689ce38084b17d8fc56fe1d956
(cherry picked from commit d0fd5ea15f4500181610ab41bfad82b956643eac)
(cherry picked from commit d5d142e5e22def3a1ef1ee16b565ab1d59a7553a)
1 file changed
tree: 239fcaa09a1450b7180054832aa9ab290c8f9072
  1. codec2/
  2. hooks/
  3. media/
  4. Android.bp
  5. OWNERS