Skip to content

Instantly share code, notes, and snippets.

@bilbo7833
Created July 22, 2016 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bilbo7833/a38371a87cc298ab45911e87ed8a70a9 to your computer and use it in GitHub Desktop.
Save bilbo7833/a38371a87cc298ab45911e87ed8a70a9 to your computer and use it in GitHub Desktop.
Android & Video Blog Series - SurfaceView Example
SurfaceView preview = (SurfaceView) findViewById(R.id.surf_video_playback);
SurfaceHolder previewHolder = preview.getHolder();
previewHolder.addCallback(surfaceCallback);
previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
SurfaceHolder.Callback surfaceCallback = new SurfaceHolder.Callback() {
public void surfaceCreated(SurfaceHolder holder);
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height);
public void surfaceDestroyed(SurfaceHolder holder);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment