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

Unified Diff: talk/app/webrtc/java/android/org/webrtc/EglBase.java

Issue 1368093003: Android SurfaceTextureHelper: Don't wait for pending frames in disconnect() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased and added more comments Created 5 years, 3 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 | talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/android/org/webrtc/EglBase.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase.java b/talk/app/webrtc/java/android/org/webrtc/EglBase.java
index 2aa28074c5ee94cf0675f3d577d08c73b0494822..8262fff9896a761bc5d0af870c2b7eb88026e426 100644
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase.java
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase.java
@@ -27,6 +27,7 @@
package org.webrtc;
+import android.graphics.SurfaceTexture;
import android.opengl.EGL14;
import android.opengl.EGLConfig;
import android.opengl.EGLContext;
@@ -85,6 +86,19 @@ public final class EglBase {
// Create EGLSurface from the Android Surface.
public void createSurface(Surface surface) {
+ createSurfaceInternal(surface);
+ }
+
+ // Create EGLSurface from the Android SurfaceTexture.
+ public void createSurface(SurfaceTexture surfaceTexture) {
+ createSurfaceInternal(surfaceTexture);
+ }
+
+ // Create EGLSurface from either Surface or SurfaceTexture.
+ private void createSurfaceInternal(Object surface) {
+ if (!(surface instanceof Surface) && !(surface instanceof SurfaceTexture)) {
+ throw new IllegalStateException("Input must be either a Surface or SurfaceTexture");
+ }
checkIsNotReleased();
if (configType == ConfigType.PIXEL_BUFFER) {
Logging.w(TAG, "This EGL context is configured for PIXEL_BUFFER, but uses regular Surface");
« no previous file with comments | « no previous file | talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698