[Android] Media: new helper to create from a URI

Jean-Baptiste Kempf git at videolan.org
Wed May 27 12:37:56 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue May 26 13:52:51 2015 +0200| [0a4fc6795900d3bfa585b49af217406a5f83fae1] | committer: Thomas Guillem

Media: new helper to create from a URI

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

 libvlc/src/org/videolan/libvlc/Media.java |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 3f42614..0648311 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -20,6 +20,8 @@
 
 package org.videolan.libvlc;
 
+import android.net.Uri;
+
 public final class Media extends VLCObject {
     private final static String TAG = "LibVLC/Media";
 
@@ -233,6 +235,10 @@ public final class Media extends VLCObject {
         mType = nativeGetType();
     }
 
+    public Media(LibVLC libVLC, Uri uri) {
+        this(libVLC, uri.toString());
+    }
+
     /**
      *
      * @param ml Should not be released



More information about the Android mailing list