Code example for Surface

Methods: release

0
        void setFixedSize(int width, int height) {
        } 
 
        void useAsSinkForJava(MediaPlayer mediaPlayer) {
            SurfaceTexture st = mMyGLSurfaceView.getSurfaceTexture();
            Surface s = new Surface(st);
            mediaPlayer.setSurface(s);
            s.release();
        } 
 
        void useAsSinkForNative() { 
            setSurfaceTexture(mMyGLSurfaceView.getSurfaceTexture());
        } 
 
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java