]> git.sesse.net Git - vlc/blob - bindings/cil/testvlc.cs
Playlist delete support... sorta. LibVLC crashes internally.
[vlc] / bindings / cil / testvlc.cs
1 /*
2  * testvlc.cs - tests for libvlc-control CIL bindings
3  *
4  * $Id$
5  */
6
7 /**********************************************************************
8  *  Copyright (C) 2007 RĂ©mi Denis-Courmont.                           *
9  *  This program is free software; you can redistribute and/or modify *
10  *  it under the terms of the GNU General Public License as published *
11  *  by the Free Software Foundation; version 2 of the license, or (at *
12  *  your option) any later version.                                   *
13  *                                                                    *
14  *  This program is distributed in the hope that it will be useful,   *
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of    *
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.              *
17  *  See the GNU General Public License for more details.              *
18  *                                                                    *
19  *  You should have received a copy of the GNU General Public License *
20  *  along with this program; if not, you can get it from:             *
21  *  http://www.gnu.org/copyleft/gpl.html                              *
22  **********************************************************************/
23
24 using System;
25 using VideoLAN.LibVLC;
26
27 namespace VideoLAN.LibVLC.Test
28 {
29     public sealed class Test
30     {
31         public static int Main (string[] args)
32         {
33             string[] argv = new string[3]{ "-vvv", "-I", "dummy" };
34
35             Instance vlc = VLC.CreateInstance (argv);
36             MediaDescriptor md = vlc.CreateDescriptor (args[0]);
37             md.Dispose ();
38
39             PlaylistItem item = null;
40
41             foreach (string s in args)
42                 item = vlc.Add (s);
43
44             vlc.Loop = false;
45             vlc.TogglePause ();
46             Console.ReadLine ();
47
48             if (item != null)
49                 vlc.Delete (item);
50             vlc.Clear ();
51             vlc.Dispose ();
52             return 0;
53         }
54     };
55 };