问题描述
CtsMediaTestCases
android.media.cts.MediaCodecTest#testPrependHeadersToSyncFrames
android.media.cts.MediaCodecCapabilitiesTest#testAllNonTunneledVideoCodecsSupportFlexibleYUV
android.media.cts.MediaCodecCapabilitiesTest#testAllNonTunneledVideoCodecsSupportFlexibleYUV
Fail:
junit.framework.AssertionFailedError: OMX.MTK.VIDEO.DECODER.DIVX is not a video encoder, so it should not fail to configure.
java.lang.IllegalArgumentException
解决方案
1.通过以下命令查看一下有沒有liblic_divx.so 這個lib
adb root
adb shell ls /vendor/lib/liblic_divx.so
如果没有此文件,就代表没有divx license,按以下方法修改:
可以將下面容拔除後再測試
1. alps/device/mediatek/mt6765/media_codecs_mediatek_video.xml 底下
1. alps/device/mediatek/mt6765/media_codecs_mediatek_video.xml 底下
<MediaCodec name="OMX.MTK.VIDEO.DECODER.DIVX" type="video/divx" >
<Limit name="size" min="16x16" max="2048x1088" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
<MediaCodec name="OMX.MTK.VIDEO.DECODER.DIVX3" type="video/divx3" >
<Limit name="size" min="16x16" max="2048x1088" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1088" value="30" />
</MediaCodec>
2. alps/device/mediatek/mt6765/mtk_omx_core.cfg 底下
OMX.MTK.VIDEO.DECODER.DIVX video_decoder.divx libMtkOmxVdecEx.so 16
OMX.MTK.VIDEO.DECODER.DIVX3 video_decoder.divx3 libMtkOmxVdecEx.so 16