[Android] Add some more documentation

Edward Wang git at videolan.org
Sat Nov 16 19:44:52 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sat Nov 16 13:44:46 2013 -0500| [983156fe58eb7acc04173c3d2e4d6225c6206ada] | committer: Edward Wang

Add some more documentation

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

 vlc-android/src/org/videolan/libvlc/LibVLC.java    |   13 ++++++++++++-
 vlc-android/src/org/videolan/libvlc/MediaList.java |    8 ++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index 61791d2..c66a0ef 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -339,7 +339,11 @@ public class LibVLC {
     }
 
     /**
-     * Initialize the libVLC class
+     * Initialize the libVLC class.
+     *
+     * This function must be called before using any libVLC functions.
+     *
+     * @throws LibVlcException
      */
     public void init(Context context) throws LibVlcException {
         Log.v(TAG, "Initializing LibVLC");
@@ -597,6 +601,13 @@ public class LibVLC {
 
     public static native String nativeToURI(String path);
 
+    /**
+     * Quickly converts path to URIs, which are mandatory in libVLC.
+     *
+     * @param path
+     *            The path to be converted.
+     * @return A URI representation of path
+     */
     public static String PathToURI(String path) {
         if(path == null) {
             throw new NullPointerException("Cannot convert null path!");
diff --git a/vlc-android/src/org/videolan/libvlc/MediaList.java b/vlc-android/src/org/videolan/libvlc/MediaList.java
index 59fe773..09acb78 100644
--- a/vlc-android/src/org/videolan/libvlc/MediaList.java
+++ b/vlc-android/src/org/videolan/libvlc/MediaList.java
@@ -57,6 +57,14 @@ public class MediaList {
         mLibVLC = libVLC;
     }
 
+    /**
+     * Adds a media URI to the media list.
+     *
+     * @param mrl
+     *            The MRL to add. Must be a location and not a path.
+     *            {@link LibVLC#PathToURI(String)} can be used to convert a path
+     *            to a MRL.
+     */
     public void add(String mrl) {
         add(new Media(mLibVLC, mrl));
     }



More information about the Android mailing list