Page 1 of 1

Ubuntu/Mono - problems calling libvlc

Posted: 23 Aug 2010 19:37
by Nikse
I've just installed Ubuntu and intended to play with Monodevelop 2.4 and VLC.
The "libvlc_get_version" works (returns "1.1.2 The Luggage") , but it just crashes when I call "libvlc_new".

Here is my code:

Code: Select all

[DllImport("libvlc.so.5.1.0", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] private static extern IntPtr libvlc_new(Int32 argc, IntPtr argv); [DllImport("libvlc.so.5.1.0", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] private static extern IntPtr libvlc_get_version(); . . . public string GetVersion() { IntPtr version = libvlc_get_version(); return Marshal.PtrToStringAnsi(version); } public IntPtr New() { IntPtr parameters = IntPtr.Zero; return libvlc_new(0, parameters); }
Is it possible to do something like this with Mono on Ubuntu? Any ideas?
It works on windoze...