diff options
author | Jamie Gennis <jgennis@google.com> | 2011-10-18 10:59:43 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-18 10:59:43 -0700 |
commit | 0256af3f5f23e1f688a3820a1e3ae8b0dbe7d144 (patch) | |
tree | 720b19677836aca4d114f49761520d07f48965ab | |
parent | 17b1408666721b83a987c1dc88e761a722a32016 (diff) | |
parent | 543c7826963411caef0c8052bb4866874def7cd7 (diff) | |
download | android_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.java | 15 |
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() { |