Last active
May 24, 2020 06:46
-
-
Save ananthrajsingh/55ef90f8acc6c803ac1dd67716f7ed71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val surfaceTextureListenerFront = object : TextureView.SurfaceTextureListener { | |
override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { | |
openCameraFront(width, height) | |
} | |
override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { | |
configureTransformFront(width, height) | |
} | |
override fun onSurfaceTextureDestroyed(texture: SurfaceTexture) = true | |
override fun onSurfaceTextureUpdated(texture: SurfaceTexture) = Unit | |
} | |
private val surfaceTextureListenerRear = object : TextureView.SurfaceTextureListener { | |
override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) { | |
openCameraRear(width, height) | |
} | |
override fun onSurfaceTextureSizeChanged(texture: SurfaceTexture, width: Int, height: Int) { | |
configureTransformRear(width, height) | |
} | |
override fun onSurfaceTextureDestroyed(texture: SurfaceTexture) = true | |
override fun onSurfaceTextureUpdated(texture: SurfaceTexture) = Unit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment