libVLC and managed C++ in VS2008

This forum is about all development around libVLC.
alb84
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Dec 2009 15:40

libVLC and managed C++ in VS2008

Postby alb84 » 03 Feb 2010 10:05

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libVLC and managed C++ in VS2008

Postby Jean-Baptiste Kempf » 03 Feb 2010 14:34

What is the version of libVLC used?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

alb84
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Dec 2009 15:40

Re: libVLC and managed C++ in VS2008

Postby alb84 » 03 Feb 2010 15:39

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?

alb84
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Dec 2009 15:40

Re: libVLC and managed C++ in VS2008

Postby alb84 » 03 Feb 2010 15:42

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

alb84
Blank Cone
Blank Cone
Posts: 29
Joined: 16 Dec 2009 15:40

Re: libVLC and managed C++ in VS2008

Postby alb84 » 03 Feb 2010 23:36

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!

lolotte0086
New Cone
New Cone
Posts: 2
Joined: 04 Oct 2010 09:55

Re: libVLC and managed C++ in VS2008

Postby lolotte0086 » 04 Oct 2010 10:04

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.

lolotte0086
New Cone
New Cone
Posts: 2
Joined: 04 Oct 2010 09:55

Re: libVLC and managed C++ in VS2008

Postby lolotte0086 » 04 Oct 2010 19:23

Ok, I finally worked it out by using VS2008 instead of VS2010 and by generating new .lib from .dll with VS...

angjiths
New Cone
New Cone
Posts: 6
Joined: 07 Oct 2010 09:26

Re: libVLC and managed C++ in VS2008

Postby angjiths » 07 Oct 2010 09:40

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.

mangokm40
Cone that earned his stripes
Cone that earned his stripes
Posts: 130
Joined: 20 May 2010 20:00

Re: libVLC and managed C++ in VS2008

Postby mangokm40 » 07 Oct 2010 15:37


angjiths
New Cone
New Cone
Posts: 6
Joined: 07 Oct 2010 09:26

Re: libVLC and managed C++ in VS2008

Postby angjiths » 11 Oct 2010 09:41

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!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests