Playing video in a GLSurfaceView instead of SurfaceView

前端 未结 4 514
醉梦人生
醉梦人生 2021-01-19 21:12

I\'ve been struggling with this for 2 days now... Following this answer: https://stackoverflow.com/a/2006454/444324 - it is mentioned that it\'s possible to play a video in

4条回答
  •  醉梦人生
    2021-01-19 21:51

    OK, solved this... I had several errors but the final error I present in my question is solved by adding this code to the onCreate:

    mPreview.setRenderer(new Renderer() {
    
                @Override
                public void onSurfaceCreated(GL10 gl, EGLConfig config) {
                    // TODO Auto-generated method stub
    
                }
    
                @Override
                public void onSurfaceChanged(GL10 gl, int width, int height) {
                    // TODO Auto-generated method stub
    
                }
    
                @Override
                public void onDrawFrame(GL10 gl) {
                    // TODO Auto-generated method stub
    
                }
            });
    

提交回复
热议问题