Back to project page glvideoplayer-android.
The source code is released under:
Apache License
If you think the Android project glvideoplayer-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.binzume.android.glvideoplayer; //from ww w .j a v a 2s. co m import android.content.Context; import android.opengl.GLSurfaceView; import android.util.AttributeSet; import android.view.SurfaceHolder; public class VideoSurfaceView extends GLSurfaceView { private Renderer renderer; public VideoSurfaceView(Context context) { super(context); } public VideoSurfaceView(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void setRenderer(Renderer renderer) { super.setRenderer(renderer); this.renderer = renderer; } @Override public void surfaceDestroyed(SurfaceHolder holder) { if (renderer instanceof GLVideoRenderer) { ((GLVideoRenderer) renderer).destroy(); } super.surfaceDestroyed(holder); } }