Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# VLC 1.1 Wrapper [closed]

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.

like image 963
MorgoZ Avatar asked Aug 05 '10 15:08

MorgoZ


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr. Stroustroupe.

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.

Why do we write C?

We write C for Carbon Because in some element the symbol of the element is taken form its first words and Co for Cobalt beacause in some elements the symbol of the element is taken from its first second letters, so that the we don't get confuse.


3 Answers

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.

like image 77
Sean Avatar answered Oct 22 '22 16:10

Sean


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/

like image 23
Kristopher Johnson Avatar answered Oct 22 '22 14:10

Kristopher Johnson


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/..."

like image 1
HFSDev Avatar answered Oct 22 '22 14:10

HFSDev