Code example for Surface

Methods: release

0
                GLES20.GL_LINEAR);
 
        _mySurfaceTexture = new SurfaceTexture(_myTextureId[0]);
        _mySurfaceTexture.setOnFrameAvailableListener(this);
 
        Surface mySurface = new Surface(_mySurfaceTexture);
        _myMediaPlayer = new MediaPlayer();
        _myMediaPlayer.setSurface(mySurface);
        mySurface.release();
        // TODO: switch to async 
        //_myMediaPlayer.setOnPreparedListener(this); 
    } 
 
    // Called when MediaPlayer is ready 
    public void onPrepared(MediaPlayer player) {
        //player.start(); 
 
    } 
 
    synchronized public void onFrameAvailable(SurfaceTexture surface) {
Connect your IDE to all the code out there  Get Codota for Java