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
android用硬解码播放器切后台恢复问题 #1324
Comments
It's a known issue, and no good solution, for now. |
@bbcallen 请教下,视频黑屏持续期间 |
No, actually, it's player's issue. |
@bbcallen 您指的player问题,是说在这种情况下,不应该创建新的codec么?即使surface重新建立了,也可以继续使用原来的codec? |
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. |
@bbcallen ,very appreciate for your help!!:) |
@bbcallen come back again. 看了下bilibili的应用,采用硬件解码,切后台回来后好像codec没有重新建立?还是用的以前的codec是么? |
Sorry, I don't have any authority to talk about the detail of the application in public. |
@bbcallen thanks a lot though:) |
@bbcallen 我遇到的情况是开启硬解码后,后台切换回来播放会花屏几秒,然后正常,也是跟楼主一样的原因吗? |
maybe codec requries idr frame when renew. |
1 similar comment
maybe codec requries idr frame when renew. |
@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 |
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. |
1 similar comment
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. |
mark |
@gnwell I see github.com/google/grafika for this idea ('Double decode' section).But I don't know what to do.Hope your reply in Chinese ~ |
mark @AliveingSoul 你解决了么 ?? |
@gnwell how to fix it |
@lgengsy 可以参照TextureRenderView.java的实现,关键就是在View销毁的时候不要销毁SurfaceTexture |
看了TextureRenderView.java 还是没有搞太懂,不知道怎样去修改。大神能帮忙详细的解释下吗?万分感谢 @gnwell |
@zhangpingV5 这个问题你解决了没? |
@gnwell 请问解决该问题,你用的 “可以参照TextureRenderView.java的实现,关键就是在View销毁的时候不要销毁SurfaceTexture” 方法, 还是用的 “Double decode” 方法? 另外,能不能给出代码示例?谢谢! |
@gnwell @wutongluxjtu TextureRenderView也有这个问题。 |
@zhanggao 目前有什么好的解决方法吗? |
@bbcallen 请问这个热点讨论issue, 是否考虑修复? |
Nope |
@wutongluxjtu 没有,我改成软解了。 |
@gnwell
|
there is a solution(see google bigflake). |
碰到同样的问题,请教各位 TextureRenderView 和Double decode 怎么使用 |
mediaPlayer = new TextureMediaPlayer(mediaPlayer); |
@ALL,use TextureMediaPlayer |
@Android4MediaPlayer SurfaceView 用 TextureMediaPlayer 是不是还会黑屏? |
可以尝试用opengl来代替目前的surface
在 2017年3月15日 下午11:39,jinyunfeng <notifications@github.com>写道:
… @gnwell <https://github.com/gnwell> @bbcallen
<https://github.com/bbcallen> 后台切到前台后数据有问题,既无法得到关键帧,不能保证解码的正常,这个是本质原因吧?由于surface的变化重新create
mediacodec并不是造成画面问题的原因。有没有可行的方案?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1324 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEOmlrLDoMMyXCo0ObLtf_8bC-Ush_3zks5rmAZLgaJpZM4Ihy9x>
.
|
请问这个导致这个现象的原因是什么?是因为数据的问题mediacodec无法正常输出解码还是因为surface的变化导致的解码错误? |
surface从后台切换到前台有些系统会等待下个关键帧才能渲染
2017-03-16 10:06 GMT+08:00 jinyunfeng <notifications@github.com>:
… 请问这个导致这个现象的原因是什么?是因为数据的问题mediacodec无法正常输出解码还是因为surface的变化导致的解码错误?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1324 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEOmlpcniP-SQKErhOE3SR1fKgydzmVeks5rmJk5gaJpZM4Ihy9x>
.
|
好的,谢谢,我先试试自己的思路,然后再去尝试你的思路,很感谢 |
依然没有解决问题,如何使用OpenGL 代替surface,能否详细说一下这个流程 |
@gnwell 你使用surfaceview实现了切回前台不黑一会的效果了吗?如果实现了,请问是如何实现的? |
@OverRide
} |
@1325679717 我这边会报 Cannot setSurfaceTexture to a released SurfaceTexture 这个异常,虽然surfaceTexture已经保存了,但是还是会被release掉。 |
03-14 17:08:42.220 29823-29823/com.example.zhangyang.ijktest D/IjkVideoView: MEDIA_INFO_VIDEO_ROTATION_CHANGED: 0 感谢~ |
//GSYvideoPlayer已经这么做了,不过我却发现在电视上SurfaceView渲染比SurfaceTextureView好太多,比如我这台海信居然可以打开画质引擎和HDR,所以在电视上就忍了。手机上的效果差别不大。 |
需求: 需要实现播放器切后台暂停,恢复前台从暂停位置继续播放的基本功能。
问题:使用硬解码时,后台恢复后出现只播放声音,画面黑屏持续几秒(黑屏时间长短不固定)后画面才能显示。应该是surfaceview重建后重新绑定到player后导致的现象,有遇到过此问题的朋友么?
The text was updated successfully, but these errors were encountered: