Skip to content Skip to sidebar Skip to footer

Playing Video In A Glsurfaceview Instead Of Surfaceview

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 a GLSurfa

Solution 1:

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

            }
        });

Solution 2:

Check out the code available here for playing a video using OpenGl ES 2.0 with GLSurfaceView

https://github.com/satish13131/Android_Programs/tree/master/graphics/opengl/video/surfaceview

It involves OpenGL rendering for video

Solution 3:

well in one place you are refereing to android.opengl.GLSurfaceView and the other to com.commonsware.android.camera.GLSurfaceView they are different GLSurfaceView classes from different packages

Solution 4:

Why did you implement a class (com.commonsware.android.camera.GLSurfaceView) with the same name as the GLSurfaceView ?

If you declared the view as an android.opengl.GLSurfaceView in layout XML you cannot cast it to com.commonsware.android.camera.GLSurfaceView

Post a Comment for "Playing Video In A Glsurfaceview Instead Of Surfaceview"