You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not recreate MediaCodec is the best practice in theory. You can take a look at github.com/google/grafika for this idea ('Double decode' section). But in real world, it may be broken on some vendor devices.
So, the only option left is that, the player should feed the correct data. This need some H264 knowledges.
check log whether the decoder is configured with your operations. i have tried the ideas mentioned by bbcallen github.com/google/grafika for this idea ('Double decode' section). it works.
check log whether the decoder is configured with your operations. i have tried the ideas mentioned by bbcallen github.com/google/grafika for this idea ('Double decode' section). it works.
Activity
bbcallen commentedon May 19, 2016
It's a known issue, and no good solution, for now.
gnwell commentedon May 19, 2016
@bbcallen 请教下,视频黑屏持续期间
SDL_AMediaCodecFake_dequeueOutputBuffer 返回AMEDIACODEC__INFO_TRY_AGAIN_LATER,也就说现在MediaCodec一直没有输出数据对吧?可不可以理解次Surface发生变化都会导致codec reconfigure,重新设置后就会导致解码器输出延时的情况,这是AMEDIACODEC 的问题了?
bbcallen commentedon May 19, 2016
No, actually, it's player's issue.
But for MediaCodec, it's a little difficult to workaround.
gnwell commentedon May 19, 2016
@bbcallen 您指的player问题,是说在这种情况下,不应该创建新的codec么?即使surface重新建立了,也可以继续使用原来的codec?
bbcallen commentedon May 19, 2016
Do not recreate MediaCodec is the best practice in theory. You can take a look at github.com/google/grafika for this idea ('Double decode' section). But in real world, it may be broken on some vendor devices.
So, the only option left is that, the player should feed the correct data. This need some H264 knowledges.
gnwell commentedon May 19, 2016
@bbcallen ,very appreciate for your help!!:)
gnwell commentedon May 19, 2016
@bbcallen come back again. 看了下bilibili的应用,采用硬件解码,切后台回来后好像codec没有重新建立?还是用的以前的codec是么?
bbcallen commentedon May 19, 2016
Sorry, I don't have any authority to talk about the detail of the application in public.
gnwell commentedon May 19, 2016
@bbcallen thanks a lot though:)
AliveingSoul commentedon May 19, 2016
@bbcallen 我遇到的情况是开启硬解码后,后台切换回来播放会花屏几秒,然后正常,也是跟楼主一样的原因吗?

gnwell commentedon May 19, 2016
maybe codec requries idr frame when renew.
gnwell commentedon May 19, 2016
maybe codec requries idr frame when renew.
AliveingSoul commentedon May 19, 2016
@gnwell But when I turn off the screen then turn on again ,It's not have this problem , Their life cycle should be no different
gnwell commentedon May 19, 2016
check log whether the decoder is configured with your operations. i have tried the ideas mentioned by bbcallen github.com/google/grafika for this idea ('Double decode' section). it works.
gnwell commentedon May 19, 2016
check log whether the decoder is configured with your operations. i have tried the ideas mentioned by bbcallen github.com/google/grafika for this idea ('Double decode' section). it works.
35 remaining items