Back to Exoplayer

EGLSurfaceTexture (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/EGLSurfaceTexture.html

latest9.0 KB
Original Source

Package com.google.android.exoplayer2.util

Class EGLSurfaceTexture

  • java.lang.Object

    • com.google.android.exoplayer2.util.EGLSurfaceTexture
  • All Implemented Interfaces:SurfaceTexture.OnFrameAvailableListener, Runnable


@RequiresApi(17)[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classEGLSurfaceTextureextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[SurfaceTexture.OnFrameAvailableListener](https://developer.android.com/reference/android/graphics/SurfaceTexture.OnFrameAvailableListener.html "class or interface in android.graphics"),[Runnable](https://developer.android.com/reference/java/lang/Runnable.html?is-external=true "class or interface in java.lang")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Generates a SurfaceTexture using EGL/GLES functions.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static interface | EGLSurfaceTexture.SecureMode | Deprecated.

Secure mode to be used by the EGL surface and context. | | static interface | EGLSurfaceTexture.TextureImageListener | Deprecated.

Listener to be called when the texture image on SurfaceTexture has been updated. |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | SECURE_MODE_NONE | Deprecated.

No secure EGL surface and context required. | | static int | SECURE_MODE_PROTECTED_PBUFFER | Deprecated.

Creating a secure surface backed by a pixel buffer. | | static int | SECURE_MODE_SURFACELESS_CONTEXT | Deprecated.

Creating a surfaceless, secured EGL context. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | EGLSurfaceTexture​(Handler handler) | Deprecated. | | EGLSurfaceTexture​(Handler handler, EGLSurfaceTexture.TextureImageListener callback) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | SurfaceTexture | getSurfaceTexture() | Deprecated.

Returns the wrapped SurfaceTexture. | | void | init​(@com.google.android.exoplayer2.util.EGLSurfaceTexture.SecureMode int secureMode) | Deprecated.

Initializes required EGL parameters and creates the SurfaceTexture. | | void | onFrameAvailable​(SurfaceTexture surfaceTexture) | Deprecated. | | void | release() | Deprecated.

Releases all allocated resources. | | void | run() | Deprecated. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

SECURE_MODE_NONE

public static final int SECURE_MODE_NONE

Deprecated.

No secure EGL surface and context required. See Also:Constant Field Values

- 

SECURE_MODE_SURFACELESS_CONTEXT

public static final int SECURE_MODE_SURFACELESS_CONTEXT

Deprecated.

Creating a surfaceless, secured EGL context. See Also:Constant Field Values

- 

SECURE_MODE_PROTECTED_PBUFFER

public static final int SECURE_MODE_PROTECTED_PBUFFER

Deprecated.

Creating a secure surface backed by a pixel buffer. See Also:Constant Field Values

Constructor Detail

- 

EGLSurfaceTexture

public EGLSurfaceTexture​([Handler](https://developer.android.com/reference/android/os/Handler.html "class or interface in android.os")handler)

Deprecated. Parameters:handler - The Handler that will be used to call SurfaceTexture.updateTexImage() to update images on the SurfaceTexture. Note that init(int) has to be called on the same looper thread as the Handler's looper.

- 

EGLSurfaceTexture

public EGLSurfaceTexture​([Handler](https://developer.android.com/reference/android/os/Handler.html "class or interface in android.os")handler,
                         @Nullable[EGLSurfaceTexture.TextureImageListener](EGLSurfaceTexture.TextureImageListener.html "interface in com.google.android.exoplayer2.util")callback)

Deprecated. Parameters:handler - The Handler that will be used to call SurfaceTexture.updateTexImage() to update images on the SurfaceTexture. Note that init(int) has to be called on the same looper thread as the looper of the Handler.callback - The EGLSurfaceTexture.TextureImageListener to be called when the texture image on SurfaceTexture has been updated. This callback will be called on the same handler thread as the handler.

Method Detail

- 

init

public void init​(@com.google.android.exoplayer2.util.EGLSurfaceTexture.SecureMode int secureMode)
          throws[GlUtil.GlException](GlUtil.GlException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Initializes required EGL parameters and creates the SurfaceTexture. Parameters:secureMode - The EGLSurfaceTexture.SecureMode to be used for EGL surface.Throws:GlUtil.GlException

- 

release

public void release()

Deprecated.

Releases all allocated resources.

- 

getSurfaceTexture

public[SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture.html "class or interface in android.graphics")getSurfaceTexture()

Deprecated.

Returns the wrapped SurfaceTexture. This can only be called after init(int).

- 

onFrameAvailable

public void onFrameAvailable​([SurfaceTexture](https://developer.android.com/reference/android/graphics/SurfaceTexture.html "class or interface in android.graphics")surfaceTexture)

Deprecated. Specified by:onFrameAvailable in interface SurfaceTexture.OnFrameAvailableListener

- 

run

public void run()

Deprecated. Specified by:run in interface Runnable