Skip to content

Instantly share code, notes, and snippets.

@owahltinez
Created October 11, 2018 18:38
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 owahltinez/e4ab2fda641f1b225f879d97c30495da to your computer and use it in GitHub Desktop.
Save owahltinez/e4ab2fda641f1b225f879d97c30495da to your computer and use it in GitHub Desktop.
val surfaceView = findViewById<SurfaceView>(...)
surfaceView.holder.addCallback(object : SurfaceHolder.Callback {
override fun surfaceCreated(holder: SurfaceHolder) {
// We do not need to specify image format, and it will be considered of type PRIV
// Surface is now ready and we could use it as an output target for CameraSession
}
...
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment