Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

视频播放器一开始解码就结束了,播放器一直黑屏,完整Log如下。视频有194M,17分钟左右 #4

Open
wlonglee opened this issue Dec 12, 2019 · 4 comments

Comments

@wlonglee
Copy link

2019-12-05 11:07:04.566 3052-3121/com.cxp.learningvideo I/BaseDecoder: 开始解码
2019-12-05 11:07:04.569 321-3133/? D/ROCKCHIP_VIDEO_DEC: Rkvpu_SendInputData(370): Rkvpu_SendInputData malloc
2019-12-05 11:07:04.569 321-3133/? D/vpu_api: vpu_api_init in, extra_size: 28
2019-12-05 11:07:04.570 326-782/? D/MediaBufferGroup: creating MemoryDealer
2019-12-05 11:07:04.573 321-3133/? I/H264_DEBUG: init done status 0, ts_en = 0 debug 0
2019-12-05 11:07:04.574 321-3134/? D/vpu_api: codec 0xf3383c00 work thread created
2019-12-05 11:07:04.577 321-3134/? I/H264_DEBUG: decoded width 1280 decoded height 720
2019-12-05 11:07:04.577 321-3134/? I/H264_DEBUG: display width 1280, display height 720
2019-12-05 11:07:04.586 321-924/? E/OMXNodeInstance: getConfig(141002b:rk._decoder.avc, ConfigCommonOutputCrop(0x700000f)) ERROR: UnsupportedIndex(0x8000101a)
2019-12-05 11:07:04.650 3052-3121/com.cxp.learningvideo I/BaseDecoder: 解码停止,释放解码器

@ChenLittlePing
Copy link
Owner

请问是系统版本是什么?可以的话把视频发我邮箱56281844@qq.com。我测试一下。

@wlonglee
Copy link
Author

跟视频无关,在虚拟机和手机上都是正常的,不过解码4k视频,小米手机很流畅,垃圾手机就卡成PPT了,这个不知道有没有好的解决方案。另外出错的是android板,RK3399,追踪去看了下,程序出错被catch了,然后Exception没打印输出。
报错的代码是
//【解码步骤:4. 渲染】
render(mOutputBuffers!![index], mBufferInfo)
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter outputBuffer

@ChenLittlePing
Copy link
Owner

这个异常是因为mOutputBuffers是null,kotlin的空检测导致了异常。可以尝试使用mCodec!!.getOutputBuffer(index)来获取输出缓存,这个方法要在API21后才能调用。

关于4k的解码我还没尝试过,垃圾手机去解码4k确实可能会很卡,可能是它硬解能力问题,也可能是它根本没有硬解,底层使用的是软解。当然只是我的猜测,如果有研究出原因和解决方法,希望可以分享出来哈😊

@wlonglee
Copy link
Author

依旧为null 估计底层改了什么东西吧,这个板本身是支持4K播放的,mediaPlayer直接播4k都是可以的,我再找找原因,看是什么导致的没法用mediaCodec解码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants