On Android 4.1 and above, I am using MediaCodec
framework to decode H264 data. I see the codec instance that I'm using (via createDecoderByType
) supports multiple color-formats. However, it always gives the output in the 1st-indexed color-format (from its supported list).
Is there a way to force the decoder to give out decoded data in a particular color-format from the ColorFormats it supports? I know the developer docs does mention that the key KEY_COLOR_FORMAT
can only be set for encoders, but then help me understand what is the rational of having multiple supported color-formats for decoders?