如何从OMX logcat消息开始调试MediaCodec错误?

时间:2014-06-23 19:25:01

标签: android mediacodec openmax

使用MediaCodec,很多时候错误消息来自OMX层。如何使用它们来帮助调试不那么微不足道的问题? 例如,我有一个应用程序有时无法创建用于解码h264流的编解码器。它似乎只发生在一些设备上,如三星S4(I9505),而不是发生在S3,Nexus 4(旧)。在大多数情况下,在S4上相同的视频被解码。在创建编解码器之前,有一些密集的计算,包括OpeGL的东西。它失败的那一行是:

MediaCodec.createByCodecName(codecInfo[0].getName());

codecInfo[0].getName()的值为OMX.qcom.video.decoder.avc,logcat中的输出如下:

06-23 19:12:18.197: I/OMXClient(23749): Using client-side OMX mux.
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): In OMX vdec Constructor
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): vidc.dec.debug.ts value is 0
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): vidc.dec.debug.concealedmb value is 0
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): vidc.dec.debug.extradata value is 0
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): Successfully opened vdec ion devicefd = 35
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): Successfully created vdec ionlock
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): Vdec instances = 1, ion device fd = 35
06-23 19:12:18.197: E/OMX-VDEC-1080P(282): omx_vdec::component_init(): Start of New Playback : role  = OMX.qcom.video.decoder.avc : DEVICE = /dev/msm_vidc_dec
06-23 19:12:18.197: D/STATUSBAR-NetworkController(1111): updateDataNetType()
06-23 19:12:18.197: D/STATUSBAR-NetworkController(1111): Nothing, mRoamingIconId = 0
06-23 19:12:18.227: E/OMX-VDEC-1080P(282): omx_vdec::component_init(): Open returned fd 36, errno 24
06-23 19:12:18.227: E/OMX-VDEC-1080P(282): component_init: current performance level = 0 
06-23 19:12:18.227: E/OMX-VDEC-1080P(282):  pipe creation failed.
06-23 19:12:18.227: E/OMX-VDEC-1080P(282):  Component Init Failed
06-23 19:12:18.227: E/OMX-VDEC-1080P(282): Calling VDEC_IOCTL_STOP_NEXT_MSG
06-23 19:12:18.227: E/OMX-VDEC-1080P(282): In OMX Vdec Destructor(), Vdec instances = 1
06-23 19:12:18.227: E/OMX-VDEC-1080P(282): Calling close() on Video Driver
06-23 19:12:18.247: E/OMX-VDEC-1080P(282): Calling close() on vdec ion devicefd = 35
06-23 19:12:18.247: E/OMX-VDEC-1080P(282): Successfully destroyed vdec ionlock
06-23 19:12:18.247: E/OMX-VDEC-1080P(282): Exit OMX vdec Destructor
06-23 19:12:18.247: E/(282):  Destroy C2D instance
06-23 19:12:18.247: E/(282):  Destroy C2D instance
06-23 19:12:18.247: E/ACodec(23749): Unable to instantiate decoder 'OMX.qcom.video.decoder.avc'.
06-23 19:12:18.247: E/MediaCodec(23749): Codec reported an error. (omx error 0x80001003, internalError -2147483648)

此外,如果它是设备相关的错误,开发人员可以做些什么来帮助解决问题?

0 个答案:

没有答案