[Android] media: Use the setMedia method
Jean-Baptiste Kempf
git at videolan.org
Thu May 28 11:37:28 CEST 2015
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 28 11:36:57 2015 +0200| [b56640dde071ebe854955bd3f05f5237c1d39f0e] | committer: Jean-Baptiste Kempf
media: Use the setMedia method
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b56640dde071ebe854955bd3f05f5237c1d39f0e
---
libvlc/src/org/videolan/libvlc/media/MediaPlayer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
index e5db41a..ac3c0b4 100644
--- a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
@@ -71,7 +71,7 @@ public class MediaPlayer
private org.videolan.libvlc.MediaPlayer mMediaPlayer;
public MediaPlayer() {
- mLibVLC = new LibVLC();
+ mLibVLC = new LibVLC(); //FIXME, this is wrong
mMediaPlayer = new org.videolan.libvlc.MediaPlayer(mLibVLC);
}
@@ -102,6 +102,7 @@ public class MediaPlayer
public void setDataSource(Context context, Uri uri)
throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
mCurrentMedia = new Media(mLibVLC, uri);
+ mMediaPlayer.setMedia(mCurrentMedia);
}
// FIXME, this is INCORRECT, @headers are ignored
@@ -113,11 +114,13 @@ public class MediaPlayer
public void setDataSource(String path)
throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
mCurrentMedia = new Media(mLibVLC, path);
+ mMediaPlayer.setMedia(mCurrentMedia);
}
public void setDataSource(FileDescriptor fd)
throws IOException, IllegalArgumentException, IllegalStateException {
mCurrentMedia = new Media(mLibVLC, fd);
+ mMediaPlayer.setMedia(mCurrentMedia);
}
// FIXME, this is INCORRECT, @offset and @length are ignored
More information about the Android
mailing list