Page 1 of 1

Vlc windows port (2013, 2015) and libvlcpp test application...

Posted: 01 May 2018 13:53
by TarmoPikaro
Hi !

I have my own custom compilation of vlc on windows (using vs2013 and vs2015, visual studio compiler, windows platform), and I've managed to integrate demo application
using C++ API's from libvlcpp - that is this source code: https://code.videolan.org/videolan/libv ... t/main.cpp

As an input I'm using one .mp4, which I have downloaded from youtube, and if you're using as video format
mp.setVideoFormatCallbacks ...
"RV32" - then I'm getting error as "Failed to create video filter2":

c:\prototyping\vlc2\src\modules\modules.c(232): filter debug: looking for video filter2 module matching "any": 8 candidates
c:\prototyping\vlc2\src\modules\modules.c(322): filter debug: no video filter2 modules matched
c:\prototyping\vlc2\src\misc\filter_chain.c(442): vout display error: Failed to create video filter2

, and as a result in setVideoCallbacks I'm not getting any Lock/Unlock callback, as to my best understanding input video is using "I420" chroma (is it video format ?) and test application requests "RV32" and conversion could not be performed.

Now to return a little bit back - I'm not compiling all plugins from vlc, only some of them. I was suspecting that I need to compile some video_filter plugin, and compiled some of them, but
chroma conversion still did not work, or may be I have compiled some plugin incorrectly, or did not compiled it at all.

Does someone knows what .dll's must be present if I want to change chroma from "I420" to "RV32" ?
I'm also using bit old vlc (2.2.1), maybe such video filters appeared in newer vlc builds ?

I have tried also to change chroma to "I420" - then video fetching starts successfully (memcpy(chroma, "I420", 4);)

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Posted: 02 May 2018 22:51
by TarmoPikaro
And answering to myself.

modules/video_chroma/*.* contains a lot of "video filter2" plugins, which can perform chroma conversion, including RV32 as a target format.
Not sure which of those are actually needed, I've compiled only some of them, seems to work out of box.

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Posted: 02 May 2018 23:09
by TarmoPikaro
Suspect that modules\video_chroma\i420_rgb.c is correct module.

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Posted: 03 May 2018 10:17
by chouquette
Hi,

It's a bit hard to say without the full logs. Chroma conversion definitely requires some video filters (for the vmem case, otherwise some conversions can be performed by the hardware directly). Depending on the target architecture/video properties different modules might be used. The required conversion is usually displayed a bit before the "looking for video filter2 modules" log line.

As a side note, I really can't advise you to use 2.2.1, and unless you have some specific changes to do in VLC, you don't need to build it yourself, feel free to use the .7z version (http://get.videolan.org/vlc/3.0.2/win32 ... 2-win32.7z) which contains the sdk

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Posted: 03 May 2018 15:11
by TarmoPikaro
https://sourceforge.net/p/vlc2/code/159/log/?path=
https://sourceforge.net/p/vlc2/code/HEAD/tree/

Recollected all changes into my own svn repo, including libvlcpp headers.
At the end I've needed these two modules: video_chroma/i420_rgb, video_output/vmem

Solution vlc_windows.sln.

Will try now recombine with godot player.
Godot's libtheora + theora module looks like doing similar thing to video_chroma/i420_rgb, only vlc have much wider set of conversion dll's.

There are plenty of different ways to optimize code, and I think I will need to deal with it when running under Android - for windows -
at least my windows seems to have sufficient power
to run without any optimizations whatsoever. However - to enable assembly optimization + visual studio seems to be non-trivial.

Sunqueen seems to made such step - that he have detached some of assembly parts
from his main repository (https://github.com/sunqueen/vlc-2.2.1.32-2013) into separate static library cover (https://github.com/sunqueen/vlc-2.2.1.32-cover)

but that requires some effort in order to make it happen.

I have also experimenting with Visual studio - and it's possible to compile gcc like inline assembly using clang as visual studio toolset - Visual studio uses clang + windows API headers.

https://blogs.msdn.microsoft.com/vcblog ... -update-1/

Sounds still bit bizarre - don't want to fight with struct alignments or compilers / linkers incompatibilities. :)

Will try to survive without assembly magic for timebeing.

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Posted: 06 Jun 2018 13:33
by Jean-Baptiste Kempf