public static interface TextureView.SurfaceTextureListener
Modifier and Type | Method and Description |
---|---|
void |
onSurfaceTextureAvailable(SurfaceTexture surface,
int width,
int height)
Invoked when a
TextureView 's SurfaceTexture is ready for use. |
boolean |
onSurfaceTextureDestroyed(SurfaceTexture surface)
Invoked when the specified
SurfaceTexture is about to be destroyed. |
void |
onSurfaceTextureSizeChanged(SurfaceTexture surface,
int width,
int height)
Invoked when the
SurfaceTexture 's buffers size changed. |
void |
onSurfaceTextureUpdated(SurfaceTexture surface)
Invoked when the specified
SurfaceTexture is updated through
SurfaceTexture.updateTexImage() . |
void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height)
TextureView
's SurfaceTexture is ready for use.surface
- The surface returned by
TextureView.getSurfaceTexture()
width
- The width of the surfaceheight
- The height of the surfacevoid onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height)
SurfaceTexture
's buffers size changed.surface
- The surface returned by
TextureView.getSurfaceTexture()
width
- The new width of the surfaceheight
- The new height of the surfaceboolean onSurfaceTextureDestroyed(SurfaceTexture surface)
SurfaceTexture
is about to be destroyed.
If returns true, no rendering should happen inside the surface texture after this method
is invoked. If returns false, the client needs to call SurfaceTexture.release()
.
Most applications should return true.surface
- The surface about to be destroyedvoid onSurfaceTextureUpdated(SurfaceTexture surface)
SurfaceTexture
is updated through
SurfaceTexture.updateTexImage()
.surface
- The surface just updated