Class EGLSurfaceTexture
- java.lang.Object
-
- com.google.android.exoplayer2.util.EGLSurfaceTexture
-
- All Implemented Interfaces:
SurfaceTexture.OnFrameAvailableListener
,Runnable
@RequiresApi(17) @Deprecated public final class EGLSurfaceTexture extends Object implements SurfaceTexture.OnFrameAvailableListener, Runnable
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 aSurfaceTexture
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 onSurfaceTexture
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 wrappedSurfaceTexture
.void
init(@com.google.android.exoplayer2.util.EGLSurfaceTexture.SecureMode int secureMode)
Deprecated.Initializes required EGL parameters and creates theSurfaceTexture
.void
onFrameAvailable(SurfaceTexture surfaceTexture)
Deprecated.void
release()
Deprecated.Releases all allocated resources.void
run()
Deprecated.
-
-
-
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 handler)
Deprecated.- Parameters:
handler
- TheHandler
that will be used to callSurfaceTexture.updateTexImage()
to update images on theSurfaceTexture
. Note thatinit(int)
has to be called on the same looper thread as theHandler
's looper.
-
EGLSurfaceTexture
public EGLSurfaceTexture(Handler handler, @Nullable EGLSurfaceTexture.TextureImageListener callback)
Deprecated.- Parameters:
handler
- TheHandler
that will be used to callSurfaceTexture.updateTexImage()
to update images on theSurfaceTexture
. Note thatinit(int)
has to be called on the same looper thread as the looper of theHandler
.callback
- TheEGLSurfaceTexture.TextureImageListener
to be called when the texture image onSurfaceTexture
has been updated. This callback will be called on the same handler thread as thehandler
.
-
-
Method Detail
-
init
public void init(@com.google.android.exoplayer2.util.EGLSurfaceTexture.SecureMode int secureMode) throws GlUtil.GlException
Deprecated.Initializes required EGL parameters and creates theSurfaceTexture
.- Parameters:
secureMode
- TheEGLSurfaceTexture.SecureMode
to be used for EGL surface.- Throws:
GlUtil.GlException
-
release
public void release()
Deprecated.Releases all allocated resources.
-
getSurfaceTexture
public SurfaceTexture getSurfaceTexture()
Deprecated.Returns the wrappedSurfaceTexture
. This can only be called afterinit(int)
.
-
onFrameAvailable
public void onFrameAvailable(SurfaceTexture surfaceTexture)
Deprecated.- Specified by:
onFrameAvailable
in interfaceSurfaceTexture.OnFrameAvailableListener
-
-