Giter Site home page Giter Site logo

Comments (6)

wei-gong avatar wei-gong commented on June 5, 2024

在电视盒子上,我自己通过GLSurfaceView+MediaPlayer的方式是可以正常播放的,但是换成GSYVideoPlayer的SystemPlayerManager、GSYVideoType.GLSURFACE后,却无法播放了。

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 5, 2024

排除法
1、切换到 SystemPlayerManager + GSYVideoType.SURFACE
2、切换到 Exo + GSYVideoType.GLSURFACE
3、SystemPlayerManager + GSYVideoType.GLSURFACE 然后不设置 render
看看什么情况,我这边没场景去复线你的问题····

from gsyvideoplayer.

wei-gong avatar wei-gong commented on June 5, 2024

排除法 1、切换到 SystemPlayerManager + GSYVideoType.SURFACE 2、切换到 Exo + GSYVideoType.GLSURFACE 3、SystemPlayerManager + GSYVideoType.GLSURFACE 然后不设置 render 看看什么情况,我这边没场景去复线你的问题····

  1. 切换到 SystemPlayerManager + GSYVideoType.SURFACE :视频正常播放
  2. 切换到 Exo + GSYVideoType.GLSURFACE: 不设置render,视频正常播放;设置render,视频画面正常播放5秒,之后画面卡死,声音正常;
  3. SystemPlayerManager + GSYVideoType.GLSURFACE 然后不设置 render:没有画面,有声音

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 5, 2024

2 不设置 render 居然和 3 不设置 render 不一样····· 底层都是 MediaCodec ···· 这么神奇···

试一下 setGLRenderMode(GSYVideoGLView.MODE_RENDER_SIZE) 有没有用

还有 调整里面的 setEGLContextClientVersion 试试(直接跑 demo 工程,源码修改)

另外可以 debug 例如 GSYVideoGLViewSimpleRender 类似 onDrawFrame、onSurfaceCreated、onSurfaceChanged 是否没有正常调用

from gsyvideoplayer.

wei-gong avatar wei-gong commented on June 5, 2024

2 不设置 render 居然和 3 不设置 render 不一样····· 底层都是 MediaCodec ···· 这么神奇···

试一下 setGLRenderMode(GSYVideoGLView.MODE_RENDER_SIZE) 有没有用

还有 调整里面的 setEGLContextClientVersion 试试(直接跑 demo 工程,源码修改)

另外可以 debug 例如 GSYVideoGLViewSimpleRender 类似 onDrawFrame、onSurfaceCreated、onSurfaceChanged 是否没有正常调用

是的,我一直是在demo工程的源码中修改进行测试的,目前SystemPlayerManager依然没有办法正常工作。
但是我使用ExoPlayer时,定位到了无法正常播放的原因,问题出在我自定义的Renderer中,onFrameAvailable方法实现上,我没有添加synchronized同步块,加上之后就能正常工作了。

from gsyvideoplayer.

CarGuo avatar CarGuo commented on June 5, 2024

那就用 ExoPlayer 内核吧,ExoPlayer 基本和 System 大岔不差,现在是 androidx 的 media3

from gsyvideoplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.