use of android.media.MediaCodec in project android_frameworks_base by crdroidandroid.
the class CpuVideoTrackDecoder method initMediaCodec.
@Override
protected MediaCodec initMediaCodec(MediaFormat format) {
// Find a codec for our video that can output to one of our supported color-spaces
MediaCodec mediaCodec = findDecoderCodec(format, new int[] { CodecCapabilities.COLOR_Format32bitARGB8888, CodecCapabilities.COLOR_FormatYUV420Planar });
if (mediaCodec == null) {
throw new RuntimeException("Could not find a suitable decoder for format: " + format + "!");
}
mediaCodec.configure(format, null, null, 0);
return mediaCodec;
}
Aggregations