summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-08-30 14:38:56 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-30 14:38:56 -0700
commit8d102eb6720deccfb8b5872fde531ef6ca580077 (patch)
treeffb573506f9bb9546a00252f229c3b71c4518e10 /core/java
parentbe1a0493a8bf589137874bec4222297fbb712185 (diff)
parentaf4fccf0c029be1f6964de5a456ceb651f052ba4 (diff)
Merge changes I33f59705,Ia4c8c822,I2fb695ab,I2e587afc
* changes: MediaDump: use the MediaPlayer#setSurface method HTML5VideoView: switch to MediaPlayer#setSurface MediaPlayer: unhide the setSurface method Surface: unhide the SurfaceTexture ctor
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/Surface.java10
-rw-r--r--core/java/android/webkit/HTML5VideoInline.java6
2 files changed, 12 insertions, 4 deletions
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index ef3d3fa59a93..ae815373371e 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -36,10 +36,14 @@ public class Surface implements Parcelable {
public static final int ROTATION_270 = 3;
/**
- * Create Surface from a SurfaceTexture.
+ * Create Surface from a {@link SurfaceTexture}.
*
- * @param surfaceTexture The {@link SurfaceTexture} that is updated by this Surface.
- * @hide
+ * Images drawn to the Surface will be made available to the {@link
+ * SurfaceTexture}, which can attach them an OpenGL ES texture via {@link
+ * SurfaceTexture#updateTexImage}.
+ *
+ * @param surfaceTexture The {@link SurfaceTexture} that is updated by this
+ * Surface.
*/
public Surface(SurfaceTexture surfaceTexture) {
if (DEBUG_RELEASE) {
diff --git a/core/java/android/webkit/HTML5VideoInline.java b/core/java/android/webkit/HTML5VideoInline.java
index ef1906c1ea2c..1b9a25ec5982 100644
--- a/core/java/android/webkit/HTML5VideoInline.java
+++ b/core/java/android/webkit/HTML5VideoInline.java
@@ -5,6 +5,7 @@ import android.graphics.SurfaceTexture;
import android.media.MediaPlayer;
import android.webkit.HTML5VideoView;
import android.webkit.HTML5VideoViewProxy;
+import android.view.Surface;
import android.opengl.GLES20;
/**
@@ -38,7 +39,10 @@ public class HTML5VideoInline extends HTML5VideoView{
@Override
public void decideDisplayMode() {
- mPlayer.setTexture(getSurfaceTexture(getVideoLayerId()));
+ SurfaceTexture surfaceTexture = getSurfaceTexture(getVideoLayerId());
+ Surface surface = new Surface(surfaceTexture);
+ mPlayer.setSurface(surface);
+ surface.release();
}
// Normally called immediately after setVideoURI. But for full screen,