MediaCodec color formats are defined by the MediaCodecInfo.CodecCapabilities class. 256 is used internally and does not usually mean that you have a JPEG data buffer. The confusion here is most likely because you are looking at the constants in the ImageFormat class, but they only apply to the camera output. (For example, ImageFormat.NV16 is the YCbCr format, and COLOR_Format32bitARGB8888 is RGB, but both have a numerical value of 16.)
The following are examples of using MediaCodec , including links to CTS tests that run MediaCodec , here . On some devices, you will not be able to decode the data from the ByteBuffer output and instead must decode to Surface .
source share