ExoPlayer - Failed to initialize OMX.qcom.video.decoder.avc

人莫鉴于流水而鉴于止水,唯止能止众止

在这里插入图片描述


1. 背景

使用ExoPlayer,我不信你没遇到过这个问题:

java.lang.IllegalArgumentException: Failed to initialize OMX.qcom.video.decoder.avc

详细内容如下图所示:
在这里插入图片描述


2. MediaCodec(解码器)

MediaCodec(解码器) 是Android平台多媒体框架的核心部分。详细内容请参考 MediaCodec的官方文档。关于MediaCodec在使用过程中的"坑",请参考Android MediaCodec stuff

补充一点,在使用ExoPlayer的过程中,虽然我们没有直接接触 MediaCodec,但是其底层的编解码就是靠MediaCodec来实现的,且MedicCodeC是有实例限制的,这就是上述问题的由来。

关于MediaCodeC的小知识,可以参考这里:一点点摸透MediaCodec的心


参考资料

https://github.com/google/ExoPlayer/issues/6168

https://github.com/google/ExoPlayer/issues/6661

https://stackoverflow.com/questions/58871463/decoder-init-failed-omx-qcom-video-decoder-avc

猜你喜欢

转载自blog.csdn.net/wangcheeng/article/details/109456518