EGLSurfaceTexture
@UnstableApi
public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableListener, Runnable
Generates a SurfaceTexture using EGL/GLES functions.
Summary
Nested types |
|---|
@DocumentedSecure mode to be used by the EGL surface and context. |
public interface EGLSurfaceTexture.TextureImageListenerListener to be called when the texture image on |
Constants |
|
|---|---|
static final int |
SECURE_MODE_NONE = 0No secure EGL surface and context required. |
static final int |
Creating a secure surface backed by a pixel buffer. |
static final int |
Creating a surfaceless, secured EGL context. |
Public constructors |
|---|
EGLSurfaceTexture(Handler handler) |
EGLSurfaceTexture( |
Public methods |
|
|---|---|
SurfaceTexture |
Returns the wrapped |
void |
init(@EGLSurfaceTexture.SecureMode int secureMode)Initializes required EGL parameters and creates the |
void |
onFrameAvailable(SurfaceTexture surfaceTexture) |
void |
release()Releases all allocated resources. |
void |
run() |
Constants
SECURE_MODE_NONE
public static final int SECURE_MODE_NONE = 0
No secure EGL surface and context required.
SECURE_MODE_PROTECTED_PBUFFER
public static final int SECURE_MODE_PROTECTED_PBUFFER = 2
Creating a secure surface backed by a pixel buffer.
SECURE_MODE_SURFACELESS_CONTEXT
public static final int SECURE_MODE_SURFACELESS_CONTEXT = 1
Creating a surfaceless, secured EGL context.
Public constructors
EGLSurfaceTexture
public EGLSurfaceTexture(Handler handler)
| Parameters | |
|---|---|
Handler handler |
The |
EGLSurfaceTexture
public EGLSurfaceTexture(
Handler handler,
@Nullable EGLSurfaceTexture.TextureImageListener callback
)
| Parameters | |
|---|---|
Handler handler |
The |
@Nullable EGLSurfaceTexture.TextureImageListener callback |
The |
Public methods
getSurfaceTexture
public SurfaceTexture getSurfaceTexture()
Returns the wrapped SurfaceTexture. This can only be called after init.
init
public void init(@EGLSurfaceTexture.SecureMode int secureMode)
Initializes required EGL parameters and creates the SurfaceTexture.
| Parameters | |
|---|---|
@EGLSurfaceTexture.SecureMode int secureMode |
The |