Back to Exoplayer

DefaultGlObjectsProvider (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/effect/DefaultGlObjectsProvider.html

latest10.4 KB
Original Source

Package com.google.android.exoplayer2.effect

Class DefaultGlObjectsProvider

  • java.lang.Object

    • com.google.android.exoplayer2.effect.DefaultGlObjectsProvider
  • All Implemented Interfaces:GlObjectsProvider


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDefaultGlObjectsProviderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[GlObjectsProvider](../util/GlObjectsProvider.html "interface in com.google.android.exoplayer2.util")

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 of GlObjectsProvider that configures an EGLContext to share data with a preexisting sharedEglContext.

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 a GlTextureInfo containing the identifiers of the newly created buffers. | | EGLContext | createEglContext​(EGLDisplay eglDisplay, int openGlVersion, int[] configAttributes) | Deprecated.

Creates a new EGLContext for the specified EGLDisplay. | | EGLSurface | createEglSurface​(EGLDisplay eglDisplay, Object surface, @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer, boolean isEncoderInputSurface) | Deprecated.

Creates a new EGLSurface wrapping the specified surface. | | EGLSurface | createFocusedPlaceholderEglSurface​(EGLContext eglContext, EGLDisplay eglDisplay, int[] configAttributes) | Deprecated.

Creates and focuses a placeholder EGLSurface. |

- 

Methods inherited from class java.lang.Object

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

Constructor Detail

- 

DefaultGlObjectsProvider

public DefaultGlObjectsProvider​(@Nullable[EGLContext](https://developer.android.com/reference/android/opengl/EGLContext.html "class or interface in android.opengl")sharedEglContext)

Deprecated.

Creates an instance. Parameters:sharedEglContext - The EGLContext with which to share data.

Method Detail

- 

createEglContext

public[EGLContext](https://developer.android.com/reference/android/opengl/EGLContext.html "class or interface in android.opengl")createEglContext​([EGLDisplay](https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true "class or interface in android.opengl")eglDisplay,
                                   int openGlVersion,
                                   int[] configAttributes)
                            throws[GlUtil.GlException](../util/GlUtil.GlException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from interface: GlObjectsProvider

Creates a new EGLContext for the specified EGLDisplay. Specified by:createEglContext in interface GlObjectsProviderParameters:eglDisplay - The EGLDisplay to create an EGLContext for.openGlVersion - The version of OpenGL ES to configure. Accepts either 2, for OpenGL ES 2.0, or 3, for OpenGL ES 3.0.configAttributes - The attributes to configure EGL with.Throws:GlUtil.GlException - If an error occurs during creation.

- 

createEglSurface

public[EGLSurface](https://developer.android.com/reference/android/opengl/EGLSurface.html "class or interface in android.opengl")createEglSurface​([EGLDisplay](https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true "class or interface in android.opengl")eglDisplay,[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")surface,
                                   @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer,
                                   boolean isEncoderInputSurface)
                            throws[GlUtil.GlException](../util/GlUtil.GlException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from interface: GlObjectsProvider

Creates a new EGLSurface wrapping the specified surface. Specified by:createEglSurface in interface GlObjectsProviderParameters:eglDisplay - The EGLDisplay 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 the surface is configured.isEncoderInputSurface - Whether the surface is the input surface of an encoder.Throws:GlUtil.GlException - If an error occurs during creation.

- 

createFocusedPlaceholderEglSurface

public[EGLSurface](https://developer.android.com/reference/android/opengl/EGLSurface.html "class or interface in android.opengl")createFocusedPlaceholderEglSurface​([EGLContext](https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true "class or interface in android.opengl")eglContext,[EGLDisplay](https://developer.android.com/reference/android/opengl/EGLDisplay.html "class or interface in android.opengl")eglDisplay,
                                                     int[] configAttributes)
                                              throws[GlUtil.GlException](../util/GlUtil.GlException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from interface: GlObjectsProvider

Creates and focuses a placeholder EGLSurface. Specified by:createFocusedPlaceholderEglSurface in interface GlObjectsProviderParameters:eglContext - The EGLContext to make current.eglDisplay - The EGLDisplay 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, or EGL14.EGL_NO_SURFACE if the current context supports rendering without a surface.Throws:GlUtil.GlException - If an error occurs during creation.

- 

createBuffersForTexture

public[GlTextureInfo](../util/GlTextureInfo.html "class in com.google.android.exoplayer2.util")createBuffersForTexture​(int texId,
                                             int width,
                                             int height)
                                      throws[GlUtil.GlException](../util/GlUtil.GlException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from interface: GlObjectsProvider

Returns a GlTextureInfo containing the identifiers of the newly created buffers. Specified by:createBuffersForTexture in interface GlObjectsProviderParameters: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.