C# VLC 1.1 Wrapper [closed]
Asked Answered
S

3

9

Does anyone know about a C# VLC 1.1 Wrapper? I've found some wrappers for older versions of VLC (haven't tried them yet), but none for the new version.

So if you know of any, please post them.

Sucrase answered 5/8, 2010 at 15:3 Comment(2)
checkout vlcdotnet.codeplex.com its pretty goodJarrell
But very poorly documented.Houseraising
O
6

I'm using http://www.codeproject.com/KB/audio-video/nVLC.aspx - it's excellent and the most recent library I've found for C#.

It should be noted that although the library is listed with GPL license, its author said in comments that it uses the same license libVLC uses, which as of version 2.0 is LGPL.

Outland answered 14/4, 2011 at 11:16 Comment(0)
A
4

libvlc.net now has support for libVLC 1.1.x. You'll have to grab the sources from the SVN repository; they haven't officially released this support yet.

http://sourceforge.net/projects/libvlcnet/

Accede answered 24/8, 2010 at 14:33 Comment(0)
D
1

I was looking for this too and I have found that most of the .NET wrappers out there either are outdated and don't work right away or have license that don't suit a proprietary software.

Said that, I started to think about building my own wrapper. Since most of the wrappers had too much code and are very confusing to understand and use, the idea of making myself the wrapper was growing. Said that, http://www.helyar.net/2009/libvlc-media-player-in-c-part-2/ is a nice place where to start making your own code.

Note that libvlc and libvlccore have changed license to LGPL. And as Jean-Baptiste Kempf said in one videolan forum thread: "You may grab the dlls (libVLC and libVLCcore) that come along with VLC installation >= 2.0.0."

Now to get it working, you have to put libvlc.dll and libvlccore.dll in the same directory as your exe file as some of the code is pointing to local dir...

To interop with one function from libvlc do the following:

Create a class that will hold the functions you'd like to interop with:

static class LibVlc
    {
        [DllImport("libvlc", CallingConvention = CallingConvention.Cdecl)]
        public static extern IntPtr libvlc_new(int argc, [MarshalAs(UnmanagedType.LPArray,
          ArraySubType = UnmanagedType.LPStr)] string[] argv);

        [DllImport("libvlc", CallingConvention = CallingConvention.Cdecl)]
        public static extern void libvlc_release(IntPtr instance);
    }

With help from vlc docs, libvlc.html">http://www.videolan.org/developers/vlc/doc/doxygen/html/group_libvlc.html, you can have only the functions you need and nothing more.

The CallingConvention = CallingConvention.Cdecl is neede for .NET 4.0+. The two above functions won't do anything interesting by themselves. They are just initialising and releasing resources needed by VLC framework.

Careful with file paths (specially when linking to the plugins folder) as they need to have "/" instead of "\" as in "C:/Program Files/..."

Decile answered 28/6, 2012 at 19:11 Comment(5)
I don't understand the purpose of this answer. You claim you have not been able to use it, and you are getting a null result for a method, you really should include the content from the website itself.Korfonta
I'll edit my answer since I'm now able to run it. I thought that he could take a look at it eventhough I was not able to get it running.Decile
Really didn't understand the down vote :/ I was sure that it was something with my code, and not with the blog's post and that it was worth sharing since I had troubles finding it. I think i'm going to get banned if continue to get downvotes like this.Decile
All you do is link to a 3 year old blog post. This answer does not expand on Spiderdevil's or Sean's answer. Until you either put more effort ( code ) into your answer I cannot remove my downvote. You still did not include the content from the website.Korfonta
Maybe now? :) I understand you, but I don't like the idea of copying pasting the content of ones blog without having the user to visit the blog. And the 3 year old blog post saved my life :)Decile

© 2022 - 2024 — McMap. All rights reserved.