Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1010)

Unified Diff: webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java

Issue 1828203002: Android HW encoder: Add support for textures when using EGL 1.0 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase, add full url to bug, and log a warning when using EGL10 in encoder. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/java/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java b/webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
index aad254b9fc936b1454f9fad406b9ad57abe92956..24d4819dbda0b83288a36c7658c4a13f6e3ac1a8 100644
--- a/webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
+++ b/webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
@@ -44,7 +44,7 @@ public final class MediaCodecVideoEncoderTest extends ActivityTestCase {
Log.i(TAG, "hardware does not support VP8 encoding, skipping testEncoderUsingTextures");
return;
}
- EglBase14 eglBase = new EglBase14(null, EglBase.CONFIG_PLAIN);
+ EglBase eglBase = EglBase.create(null, EglBase.CONFIG_PLAIN);
MediaCodecVideoEncoder encoder = new MediaCodecVideoEncoder();
assertTrue(encoder.initEncode(
MediaCodecVideoEncoder.VideoCodecType.VIDEO_CODEC_VP8, 640, 480, 300, 30,
@@ -64,7 +64,7 @@ public final class MediaCodecVideoEncoderTest extends ActivityTestCase {
MediaCodecVideoEncoder.VideoCodecType.VIDEO_CODEC_VP8, 640, 480, 300, 30,
null));
encoder.release();
- EglBase14 eglBase = new EglBase14(null, EglBase.CONFIG_PLAIN);
+ EglBase eglBase = EglBase.create(null, EglBase.CONFIG_PLAIN);
assertTrue(encoder.initEncode(
MediaCodecVideoEncoder.VideoCodecType.VIDEO_CODEC_VP8, 640, 480, 300, 30,
eglBase.getEglBaseContext()));
@@ -126,7 +126,7 @@ public final class MediaCodecVideoEncoderTest extends ActivityTestCase {
final int height = 480;
final long presentationTs = 2;
- final EglBase14 eglOesBase = new EglBase14(null, EglBase.CONFIG_PIXEL_BUFFER);
+ final EglBase eglOesBase = EglBase.create(null, EglBase.CONFIG_PIXEL_BUFFER);
eglOesBase.createDummyPbufferSurface();
eglOesBase.makeCurrent();
int oesTextureId = GlUtil.generateTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES);
@@ -154,7 +154,9 @@ public final class MediaCodecVideoEncoderTest extends ActivityTestCase {
}
assertTrue(info.index != -1);
assertTrue(info.buffer.capacity() > 0);
- assertEquals(presentationTs, info.presentationTimestampUs);
+ if (eglOesBase instanceof EglBase14) {
+ assertEquals(presentationTs, info.presentationTimestampUs);
+ }
encoder.releaseOutputBuffer(info.index);
encoder.release();
« no previous file with comments | « no previous file | webrtc/api/java/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698