]> git.sesse.net Git - vlc/commitdiff
Cleanup test cases
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 21 Feb 2009 16:14:19 +0000 (18:14 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 21 Feb 2009 16:15:09 +0000 (18:15 +0200)
bindings/cil/src/media.cs
bindings/cil/tests/testvlc.cs

index 18d6b784b59ee2e9756c0cd0b78170d2771fd519..39f029024585df82b5116b4da29663c65eef168e 100644 (file)
@@ -124,7 +124,7 @@ namespace VideoLAN.LibVLC
         /**
          * Duration of the media in microseconds. The precision of the result
          * depends on the input stram protocol and file format. The value
-         * might be incorrect and unknown (VLC usually returns 0 then).
+         * might be incorrect and unknown (VLC usually returns 0 or -1 then).
          */
         public long Duration
         {
index b0d1c11feae4651d9b6bd411bd57f247985243ef..1e0c9c20e2c06c93298236dee05be587d6499eeb 100644 (file)
@@ -28,24 +28,31 @@ namespace VideoLAN.LibVLC.Test
 {
     public sealed class Test
     {
+        private static void DumpMedia (Media m)
+        {
+            Console.WriteLine ("Media at    {0}", m.Location);
+            Console.WriteLine (" duration:  {0}µs", m.Duration);
+            Console.WriteLine (" preparsed: {0}", m.IsPreparsed);
+        }
+
         public static int Main (string[] args)
         {
             string[] argv = new string[]{
-                "-v", "-I", "dummy", "--plugin-path=../../modules"
+                "-vv", "-I", "dummy", "--plugin-path=../../modules"
             };
 
-            Console.WriteLine("Running on VLC {0} ({1})", VLC.Version,
-                            VLC.ChangeSet);
-            Console.WriteLine("Compiled with {0}", VLC.Compiler);
+            Console.WriteLine ("Running on LibVLC {0} ({1})", VLC.Version,
+                               VLC.ChangeSet);
+            Console.WriteLine (" (compiled with {0})", VLC.Compiler);
 
             VLC vlc = new VLC (argv);
             Media m = new Media (vlc, "/dev/null");
+            DumpMedia (m);
 
-            vlc.AddInterface ("qt4");
-            vlc.Run ();
+            DumpMedia ((Media)m.Clone ());
 
-            m.Dispose ();
             vlc.Dispose ();
+            m.Dispose ();
             return 0;
         }
     };