Page 1 of 1

libVLC and managed C++ in VS2008

Posted: 03 Feb 2010 10:05
by alb84
Hello,
I am having some problems using libVLC in VS2008, I need to use this IDE because the whole project must work on Winforms, yet I'd prefer to stay in a mixed native and managed form becase I am using also other libraries developped in native C for gps and perspective deformation of cartography to overlay on video.
I tried to compile the project with /crl mixing the Winforms code with the libvlc.lib obtained from the libvlc.dll as explained here http://wiki.videolan.org/GenerateLibFromDll yet I get

Code: Select all

warning LNK4078: multiple '.text' sections found with different attributes warning LNK4248: unresolved typeref token for 'libvlc_instance_t'; image may not run warning LNK4248: unresolved typeref token for 'libvlc_media_t'; image may not run warning LNK4248: unresolved typeref token for 'libvlc_media_player_t'; image may not run
The errors are described here
http://msdn.microsoft.com/en-us/library/h8027ys9.aspx
http://msdn.microsoft.com/en-us/library/049hc7a0.aspx

So I thought the cause was that the VLC I have installed, and therefore the dll from which I derived the lib, is compiled with gcc and mingw and not VS.

If you can think any solution let me know. Is there any libvlc.lib precompiled and ready to be used with VS for native+managed projects?

Else I'll try some libvlc.net project, and I'll use the others native libraries I need with PkInvoke... but I need some low level access to the video stream, grabbing each frame to a rgb matrix in order to overlay other information and access to time metadata in order to syncronize the video with the gps data, so in this case I ask you some advice about which libvlc .net project is better to make something like here http://wiki.videolan.org/LibVLC_SampleCode_SDL and get also time information.

Re: libVLC and managed C++ in VS2008

Posted: 03 Feb 2010 14:34
by Jean-Baptiste Kempf
What is the version of libVLC used?

Re: libVLC and managed C++ in VS2008

Posted: 03 Feb 2010 15:39
by alb84
You mean the version I see when I right click on the dll? Well, libvlc.dll has no version, and libvlccore.dll is 1.0.2.0, as taken from the installation folder of VLC, that is 1.0.2 Goldeneye, compiled by jb at sasmira using gcc 4.2.1-sjlj and mingw... I have to install some new or older version?

Re: libVLC and managed C++ in VS2008

Posted: 03 Feb 2010 15:42
by alb84
Btw, even though I get only warning and no errors, when I run the program it quits immediatly saying "The application failed to initialize properly (0xc000007b)".

Re: libVLC and managed C++ in VS2008

Posted: 03 Feb 2010 23:36
by alb84
Ok with the newest library it works! I still have some problems getting the pixel rgb matrix for each frame from unmanaged code (libvlc) to managed code (picturebox in a form)... and I also think there may be some bottleneck or speed issue... Anyway thanks!

Re: libVLC and managed C++ in VS2008

Posted: 04 Oct 2010 10:04
by lolotte0086
Hi,

I have the exact same problem and can not resolve it. Even whith the last library of VLC (version of VLC is 1.1.4) I get this error... How did you manage to solve this? Did you do something more than getting the last library?

Thanks for any help.

Re: libVLC and managed C++ in VS2008

Posted: 04 Oct 2010 19:23
by lolotte0086
Ok, I finally worked it out by using VS2008 instead of VS2010 and by generating new .lib from .dll with VS...

Re: libVLC and managed C++ in VS2008

Posted: 07 Oct 2010 09:40
by angjiths
Hi..

At present, i want to create a C++ application which uses the VLC API for receiving of streaming Videos.
The IDE i am using is VS 2008. The problem i am facing is i could not find a proper guide in setupping up the VS 2008 environment with VLC API.

I managed to download the libvlc.zip from the libvlcnet-0.3.1.0-src. All i get is the DLL files. Can some one guide me on how to proceed from here ? how do i get the *.lib files to be generated ?

are there any online tutorials / examples that i can reference upon ?
Hope to get some advice.

thanks in advance.

Re: libVLC and managed C++ in VS2008

Posted: 07 Oct 2010 15:37
by mangokm40

Re: libVLC and managed C++ in VS2008

Posted: 11 Oct 2010 09:41
by angjiths
thx for the reply.

I have successfully generated the *.lib files.

are there any examples or tutorials where i can see the structure to go about streaming vlc videos using the VLC SDK ?

I need to know like the format of the stream that is coming from the other VLC player and the proper steps in getting the video being played like decode?->format?-> Video and Audio ?

Thanks alot in advance!