mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Misc refactoring.
Use @VisibleForTesting and add some comments for GL code. Refactoring change only. No functional changes intended PiperOrigin-RevId: 412428196
This commit is contained in:
parent
f9d3bedb0b
commit
60ce9ae345
3 changed files with 5 additions and 7 deletions
|
|
@ -27,6 +27,7 @@ import androidx.annotation.CheckResult;
|
|||
import androidx.annotation.GuardedBy;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.ColorInfo;
|
||||
import androidx.media3.common.Format;
|
||||
|
|
@ -107,11 +108,8 @@ public final class MediaCodecUtil {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the codec cache.
|
||||
*
|
||||
* <p>This method should only be called in tests.
|
||||
*/
|
||||
/* Clears the codec cache.*/
|
||||
@VisibleForTesting
|
||||
public static synchronized void clearDecoderInfoCache() {
|
||||
decoderInfosCache.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
checkGlError();
|
||||
|
||||
// Render.
|
||||
GLES20.glDrawArrays(meshData.drawMode, 0, meshData.vertexCount);
|
||||
GLES20.glDrawArrays(meshData.drawMode, /* first= */ 0, meshData.vertexCount);
|
||||
checkGlError();
|
||||
|
||||
GLES20.glDisableVertexAttribArray(positionHandle);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ import java.io.IOException;
|
|||
inputSurfaceTexture.getTransformMatrix(textureTransformMatrix);
|
||||
copyProgram.setFloatsUniform("tex_transform", textureTransformMatrix);
|
||||
copyProgram.bindAttributesAndUniforms();
|
||||
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);
|
||||
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, /* first= */ 0, /* count= */ 4);
|
||||
long surfaceTextureTimestampNs = inputSurfaceTexture.getTimestamp();
|
||||
EGLExt.eglPresentationTimeANDROID(eglDisplay, eglSurface, surfaceTextureTimestampNs);
|
||||
EGL14.eglSwapBuffers(eglDisplay, eglSurface);
|
||||
|
|
|
|||
Loading…
Reference in a new issue