summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-10-18 10:59:43 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-18 10:59:43 -0700
commit0256af3f5f23e1f688a3820a1e3ae8b0dbe7d144 (patch)
tree720b19677836aca4d114f49761520d07f48965ab
parent17b1408666721b83a987c1dc88e761a722a32016 (diff)
parent543c7826963411caef0c8052bb4866874def7cd7 (diff)
downloadandroid_system_media-0256af3f5f23e1f688a3820a1e3ae8b0dbe7d144.tar.gz
android_system_media-0256af3f5f23e1f688a3820a1e3ae8b0dbe7d144.tar.bz2
android_system_media-0256af3f5f23e1f688a3820a1e3ae8b0dbe7d144.zip
am 543c7826: wilhelm: fix native-media SurfaceTexture test
* commit '543c7826963411caef0c8052bb4866874def7cd7': wilhelm: fix native-media SurfaceTexture test
-rw-r--r--wilhelm/tests/native-media/src/com/example/nativemedia/NativeMedia.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/wilhelm/tests/native-media/src/com/example/nativemedia/NativeMedia.java b/wilhelm/tests/native-media/src/com/example/nativemedia/NativeMedia.java
index 84d0c54d..01636d29 100644
--- a/wilhelm/tests/native-media/src/com/example/nativemedia/NativeMedia.java
+++ b/wilhelm/tests/native-media/src/com/example/nativemedia/NativeMedia.java
@@ -381,17 +381,10 @@ public class NativeMedia extends Activity {
}
void useAsSinkForJava(MediaPlayer mediaPlayer) {
- // This API is @hide currently, so use reflection instead:
- // mMediaPlayer.setTexture(surfaceTexture);
- Class clazz = MediaPlayer.class;
- Class[] types = new Class[] { SurfaceTexture.class };
- Object[] arglist = new Object[] { mMyGLSurfaceView.getSurfaceTexture() };
- try {
- clazz.getMethod("setTexture", types).invoke(mediaPlayer, arglist);
- } catch (NoSuchMethodException e) {
- } catch (IllegalAccessException e) {
- } catch (java.lang.reflect.InvocationTargetException e) {
- }
+ SurfaceTexture st = mMyGLSurfaceView.getSurfaceTexture();
+ Surface s = new Surface(st);
+ mediaPlayer.setSurface(s);
+ s.release();
}
void useAsSinkForNative() {