Class DefaultGlObjectsProvider
- java.lang.Object
-
- com.google.android.exoplayer2.effect.DefaultGlObjectsProvider
-
- All Implemented Interfaces:
GlObjectsProvider
@Deprecated public final class DefaultGlObjectsProvider extends Object implements GlObjectsProvider
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.Implementation ofGlObjectsProvider
that configures anEGLContext
to share data with a preexistingsharedEglContext
.The created
EGLContext
is configured with 8-bit RGB or 10-bit RGB attributes and no depth buffer or render buffers.
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.util.GlObjectsProvider
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DefaultGlObjectsProvider(EGLContext sharedEglContext)
Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GlTextureInfo
createBuffersForTexture(int texId, int width, int height)
Deprecated.Returns aGlTextureInfo
containing the identifiers of the newly created buffers.EGLContext
createEglContext(EGLDisplay eglDisplay, int openGlVersion, int[] configAttributes)
Deprecated.Creates a newEGLContext
for the specifiedEGLDisplay
.EGLSurface
createEglSurface(EGLDisplay eglDisplay, Object surface, @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer, boolean isEncoderInputSurface)
Deprecated.Creates a newEGLSurface
wrapping the specifiedsurface
.EGLSurface
createFocusedPlaceholderEglSurface(EGLContext eglContext, EGLDisplay eglDisplay, int[] configAttributes)
Deprecated.Creates and focuses a placeholderEGLSurface
.
-
-
-
Constructor Detail
-
DefaultGlObjectsProvider
public DefaultGlObjectsProvider(@Nullable EGLContext sharedEglContext)
Deprecated.Creates an instance.- Parameters:
sharedEglContext
- TheEGLContext
with which to share data.
-
-
Method Detail
-
createEglContext
public EGLContext createEglContext(EGLDisplay eglDisplay, int openGlVersion, int[] configAttributes) throws GlUtil.GlException
Deprecated.Description copied from interface:GlObjectsProvider
Creates a newEGLContext
for the specifiedEGLDisplay
.- Specified by:
createEglContext
in interfaceGlObjectsProvider
- Parameters:
eglDisplay
- TheEGLDisplay
to create anEGLContext
for.openGlVersion
- The version of OpenGL ES to configure. Accepts either2
, for OpenGL ES 2.0, or3
, for OpenGL ES 3.0.configAttributes
- The attributes to configure EGL with.- Throws:
GlUtil.GlException
- If an error occurs during creation.
-
createEglSurface
public EGLSurface createEglSurface(EGLDisplay eglDisplay, Object surface, @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer, boolean isEncoderInputSurface) throws GlUtil.GlException
Deprecated.Description copied from interface:GlObjectsProvider
Creates a newEGLSurface
wrapping the specifiedsurface
.- Specified by:
createEglSurface
in interfaceGlObjectsProvider
- Parameters:
eglDisplay
- TheEGLDisplay
to attach the surface to.surface
- The surface to wrap; must be a surface, surface texture or surface holder.colorTransfer
- The color transfer characteristics to which thesurface
is configured.isEncoderInputSurface
- Whether thesurface
is the input surface of an encoder.- Throws:
GlUtil.GlException
- If an error occurs during creation.
-
createFocusedPlaceholderEglSurface
public EGLSurface createFocusedPlaceholderEglSurface(EGLContext eglContext, EGLDisplay eglDisplay, int[] configAttributes) throws GlUtil.GlException
Deprecated.Description copied from interface:GlObjectsProvider
Creates and focuses a placeholderEGLSurface
.- Specified by:
createFocusedPlaceholderEglSurface
in interfaceGlObjectsProvider
- Parameters:
eglContext
- TheEGLContext
to make current.eglDisplay
- TheEGLDisplay
to attach the surface to.configAttributes
- The attributes to configure EGL with.- Returns:
- A placeholder
EGLSurface
that has been focused to allow rendering to take place, orEGL14.EGL_NO_SURFACE
if the current context supports rendering without a surface. - Throws:
GlUtil.GlException
- If an error occurs during creation.
-
createBuffersForTexture
public GlTextureInfo createBuffersForTexture(int texId, int width, int height) throws GlUtil.GlException
Deprecated.Description copied from interface:GlObjectsProvider
Returns aGlTextureInfo
containing the identifiers of the newly created buffers.- Specified by:
createBuffersForTexture
in interfaceGlObjectsProvider
- Parameters:
texId
- The identifier of the texture to attach to the buffers.width
- The width of the texture in pixels.height
- The height of the texture in pixels.- Throws:
GlUtil.GlException
- If an error occurs during creation.
-
-