c# issue with vlc libraries

This forum is about all development around libVLC.
microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

c# issue with vlc libraries

Postby microprocessore » 29 Jan 2011 17:28

Hello everybody... forgive my english... I'm italian XD
I need to develop an Audio Player and I'd like to import in my project vlc dll.
I put in my application folder the following files:
-axvlc.dll;
-libvlc.dll;
-libvlccore.dll.

then i added AXVLC reference.
Next I tried to add LIBVLC and LIBVLCCORE, but then appared the following error:
Image
Image

what can I do to resolve these problems?

I tried to work with this problem... so I created a VLCPluginClass object called canz... but when i debug the application occurs the following error:

canz.Length = 'canz.Length' threw an exception of type 'System.Runtime.InteropServices.COMException

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 31 Jan 2011 13:44

That's normal, axvlc is an activex (or a com object), which give access to libvlc features. So you don't need to reference libvlc* in your project.

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 31 Jan 2011 18:50

ok....what about this error?
'canz.Length' threw an exception of type 'System.Runtime.InteropServices.COMException

Nikse
Blank Cone
Blank Cone
Posts: 10
Joined: 01 Aug 2010 20:15

Re: c# issue with vlc libraries

Postby Nikse » 01 Feb 2011 12:54

Why don't you use libvlcnet? Or you could use VLC with late/dynamic binding, like this: http://www.nikse.dk/libvlcdynamic.zip

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 01 Feb 2011 13:40

ok....what about this error?
'canz.Length' threw an exception of type 'System.Runtime.InteropServices.COMException
i d'ont know abtout the activex usage, i use libvlc directly, (i use my own wrapper, something like libvlcnet).

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 01 Feb 2011 17:10

ok....what about this error?
'canz.Length' threw an exception of type 'System.Runtime.InteropServices.COMException
i d'ont know abtout the activex usage, i use libvlc directly, (i use my own wrapper, something like libvlcnet).
excuse me, can you explain me what's a wrapper?
and what can I do to use libvlc directly?

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 02 Feb 2011 09:56

a "wrapper" is a thin layer of code which translates an existing interface (libvlc's functions in our case) into a more usable interface.

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 02 Feb 2011 14:37

i d'ont know abtout the activex usage, i use libvlc directly, (i use my own wrapper, something like libvlcnet).
What should I do to use libvlc directly? as I said in the previous post, when I try to add its reference appears an error

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 03 Feb 2011 14:10

you can try the wrapper libvlcnet, or take a look at my source here ,and especially the videolan.interop part (it's a vlc wrapper lib, based on kairos one, but modified for my needs).

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 03 Feb 2011 16:49

Where I have to click do download them?

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 05 Feb 2011 15:18

libvlcnet: google a little, and you'll find this : http://sourceforge.net/projects/libvlcnet/
my sources : there is a snapshot link above the file list.

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 05 Feb 2011 17:39

I already have this .zip, but when I try to add libvlc to my project appears the error that I said in the previous post...
the problem is that I don't know how resolve it

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 06 Feb 2011 12:22

it's because you can't add libvlc.dll or libvlccore.dll in your project. Just use it directly, see libvlcnet or my code for that.

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 06 Feb 2011 20:09

excuse me... can you tell me precisely how can I use libvlc directly?
I took your source but there was nothing about libvlc.dll

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 08 Feb 2011 15:02

excuse me... can you tell me precisely how can I use libvlc directly?
I took your source but there was nothing about libvlc.dll
Of course there is, look for DllImport("libvlc") in VideoLan.Interop/InteropMethods.cs.
All libvlc functions/structures/enums are declared in this file.

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 08 Feb 2011 19:08

thanks
i saw libvlc methodes, but i can't find libvlc classes...
if I want to instantiate a song object, what should I do?

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 10 Feb 2011 10:06

there are no libvlc classes ...

what is a "song object" ?!?!?

microprocessore
New Cone
New Cone
Posts: 9
Joined: 29 Jan 2011 16:41

Re: c# issue with vlc libraries

Postby microprocessore » 10 Feb 2011 17:31

I used wmpLib and then there is a class called WindowsMediaPlayerClass that allows you to manage the trasmission of a song.
i need a class like that in libvlc

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: c# issue with vlc libraries

Postby XilasZ » 10 Feb 2011 23:28

There are no such things in libvlc, only methods.
You can use the methods directly, or use a wrapper (mine, libvlcnet, ....) which is just a few classes which allows a more object approach.

There are a lot of documentations and example, for instance http://wiki.videolan.org/Libvlc, http://wiki.videolan.org/LibVLC_Tutorial, or http://wiki.videolan.org/C_Sharp

Read them.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 4 guests