summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-02-24 12:37:02 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-02-24 12:37:02 -0800
commit373ed6fc79e6c41f4b5dbb8eb72363033f2e40b3 (patch)
tree8d98b89e08e4b48b41be41f8fa95acddb3fbc051 /graphics/java
parent808e8f683731dceb6e1bf9486b816c9cbe11cd35 (diff)
parentcc562a3576a6a8096626387472e05e8bee03352a (diff)
downloadframeworks_base-373ed6fc79e6c41f4b5dbb8eb72363033f2e40b3.zip
frameworks_base-373ed6fc79e6c41f4b5dbb8eb72363033f2e40b3.tar.gz
frameworks_base-373ed6fc79e6c41f4b5dbb8eb72363033f2e40b3.tar.bz2
Merge "Bug 3438258 Add SurfaceTexture as MediaPlayer sink"
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/SurfaceTexture.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/SurfaceTexture.java b/graphics/java/android/graphics/SurfaceTexture.java
index 1fc2722..2d23fe9 100644
--- a/graphics/java/android/graphics/SurfaceTexture.java
+++ b/graphics/java/android/graphics/SurfaceTexture.java
@@ -24,11 +24,12 @@ import android.os.Message;
/**
* Captures frames from an image stream as an OpenGL ES texture.
*
- * <p>The image stream may come from either camera preview. A SurfaceTexture may be used in place
- * of a SurfaceHolder when specifying the output destination of a {@link android.hardware.Camera}
+ * <p>The image stream may come from either camera preview or video decode. A SurfaceTexture
+ * may be used in place of a SurfaceHolder when specifying the output destination of a
+ * {@link android.hardware.Camera} or {@link android.media.MediaPlayer}
* object. Doing so will cause all the frames from the image stream to be sent to the
* SurfaceTexture object rather than to the device's display. When {@link #updateTexImage} is
- * called, the contents of the texture object specified when the SurfaceTexture was created is
+ * called, the contents of the texture object specified when the SurfaceTexture was created are
* updated to contain the most recent image from the image stream. This may cause some frames of
* the stream to be skipped.
*
@@ -129,6 +130,8 @@ public class SurfaceTexture {
* 16 elements.
*/
public void getTransformMatrix(float[] mtx) {
+ // Note we intentionally don't check mtx for null, so this will result in a
+ // NullPointerException. But it's safe because it happens before the call to native.
if (mtx.length != 16) {
throw new IllegalArgumentException();
}