[Android] Implement surface functions of the Android.MediaPlayer replacement

Jean-Baptiste Kempf git at videolan.org
Thu Jul 2 12:01:55 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jul  2 11:59:42 2015 +0200| [30c79c2d2712ce7cef34d39fc2ebaa2c60cb421e] | committer: Jean-Baptiste Kempf

Implement surface functions of the Android.MediaPlayer replacement

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=30c79c2d2712ce7cef34d39fc2ebaa2c60cb421e
---

 libvlc/src/org/videolan/libvlc/media/MediaPlayer.java |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
index d3d738a..1f2a804 100644
--- a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
@@ -133,12 +133,16 @@ public class MediaPlayer
     }
 
     public void prepareAsync() {
+        mCurrentMedia.addOption(":video-paused");
+        mMediaPlayer.play();
     }
 
     public void setDisplay(SurfaceHolder sh) {
+        mMediaPlayer.getVLCVout().setVideoSurface(sh.getSurface(), sh);
     }
 
     public void setSurface(Surface surface) {
+        mMediaPlayer.getVLCVout().setVideoSurface(surface, null);
     }
 
     public void setVideoScalingMode(int mode) {



More information about the Android mailing list