]> git.sesse.net Git - vlc/blobdiff - bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
jvlc logging classes added
[vlc] / bindings / java / core / src / main / java / org / videolan / jvlc / JVLC.java
index b2d29ff9122c7f7809634bbae21336fd92292104..e6c5be6640823709fe69f4567561bee3fd54d4c2 100644 (file)
@@ -48,18 +48,14 @@ public class JVLC
     
     public JVLC()
     {
-        String[] args = new String[1];
-        args[0] = "jvlc";
+        String[] args = new String[] {};
         instance = createInstance(args);
         mediaList = new MediaList(this);
     }
 
     public JVLC(String[] args)
     {
-        String[] myargs = new String[args.length + 1];
-        myargs[0] = "jvlc";
-        System.arraycopy(args, 0, myargs, 1, args.length);
-        instance = createInstance(myargs);
+        instance = createInstance(args);
     }
     
     public JVLC(String args)
@@ -93,6 +89,25 @@ public class JVLC
         return libvlc.libvlc_new(args.length, args, exception);
     }
 
+    public Logger getLogger()
+    {
+        return new Logger(this);
+    }
+    
+    public LoggerVerbosityLevel getLogVerbosity()
+    {
+        libvlc_exception_t exception = new libvlc_exception_t();
+        int level = libvlc.libvlc_get_log_verbosity(instance, exception);
+        return LoggerVerbosityLevel.getSeverity(level);
+    }
+
+    public void setLogVerbosity(LoggerVerbosityLevel level)
+    {
+        libvlc_exception_t exception = new libvlc_exception_t();
+        libvlc.libvlc_set_log_verbosity(instance, level.ordinal(), exception);
+    }
+
+    
     /**
      * Returns the _instance.
      * @return the _instance