VLC integration strategy advice

Hi All,
I’m trying to integrate VLC player through VlcDotNet wrapper in a local copy of Xibo 1.8-beta project…

It seems work correctly for an undefined time (both with video and streaming contents) but, after a while, the application ends with “Application Hang B1” error…

I’m not expert unmanaged code integration and multithreading programming (but this could be a good opportunity to improve my poor skills :slight_smile: ).

Do you thing that running VLC Wrapper in a dedicated Worker Thread could be a possible way to solve this issue?

Thanks in advance!

Andrea

Firstly i’d like to say that this is a very interesting enhancement!

It is very difficult to comment on your implementation without being able to see it - you could fork in github and upload your branch? I’d happily take a look at it.

1 Like

Oh how such an enhacement would make a lot of people happy. I would certianly love to see such a feature if you are willing to share your work when finished.

1 Like

Is this possible it would be a very good feature!
Hope you find out what is causing the application to hang.

1 Like

Hi Dan,
how can I create a fork from 1.8 beta in GitHub?

Thanks for your help!

You sign into your GitHub account and visit the xibosignage/xibo-dotnetclient repository and press “Fork” at the top. That will fork into your own GitHub account, which you can edit and push your changes to.

We can then create a Pull Request which will compare your fork with the main repo code, which we can review together.

1 Like

Ok. I can push right now but there are some things to be still investigated…

For example it runs only on x86 platform (this should be caused due to VlcDotNet package)…

Hi @dan, there are a lot of dll(s) of libvlc (unmanaged code) that are needed to run VLC. Have I to push them on GitHub?

Or maybe is better to use VLC standard installation, asking to user to specify installation path? If yes, should be done in the option form? Or at CMS level in ProfileMonitor?

Many thanks

Hmm, that is an interesting question.

The best thing to do would be to use a package manager to pull in those dependencies - which mean they only appear in the repo in packages.config, but for anyone building the project they would be downloaded and included in /bin at build time.

Perhaps there are NuGET packages for libvlc ?

It would also be better to use a package manager so that you could guarantee the version of the dlls which would be included - relying on a user install for this is not usually a good idea (because they could have all sorts of different versions)

A NuGET packages for libvlc doesn’t exist. NuGet packages exist for VlcDotNet wrapper and it has been already included through packages.config.

In my opinion, it should work as per Win Media Player: it should be installed. The only difference is that you should specify a location path if it is different from the default location…

What do you think about that?

Tks @dan !

So the vlcdotnet wrapper doesn’t include the DLL’s it wraps?! Did you have to manually install VLC to get the libvlc dlls?

Sorry for the questions, I just don’t think it is a good idea to reference “any version the user has installed” - I am sure that will break. If you say that the only way is to request an install location, then that is the way we would have to go I think.

The windows media player DLL’s are provided with the application (although only the linking ones I suppose). - see the wmpdll folder.

Yes. It doesn’t include dll(s). You have to install VLC or download dll (e.g. from the GitHub repository of VlcDotNet)…

For my tests I’ve used https://github.com/ZeBobo5/Vlc.DotNet/tree/master/lib

PS: *.dll are in ignore file, so I shouldn’t commit them on Git…

But I can do as you prefer…

I think we are agreed that they shouldn’t be in the repository - it doesn’t make any sense to keep them there.

There are two options then -

  1. Ask the user to install VLC and configure their VLC installation path in Xibo (or try to detect that somehow).
  2. Include the necessary libvlc DLLs in our MSI and link to them from a known place (the Xibo installation folder).

I prefer number 2, but is that possible under the VLC licence?

Thanks,
Dan

Hi Dan,
I prefer solution 2 too, but I don’t know anything about VLC licence…

In the meanwhile I think that I’m experiencing this issue :scream::

https://wiki.videolan.org/Frequently_Asked_Questions/#May_I_redistribute_a_piece_of_VideoLAN_software.3F

Xibo is compatible with the GPL, so I think it would be OK to redistribute. I would be more comfortable if we added a section to the licence dialog in the About form to mention that the software includes libVLC.

DLLMain deadlocks sound like a terrible situation :confused:

Exactly!!! :sob:
Maybe could be better try another wrapper… or an ActiveX solutions…

Anyway, if you agree I can push my bugged version (without DLL and a static for now reference to default VLC path) if you (or someone else) want to examine my code, let me know…

Yeah please do push it - it doesn’t hurt to have it up here - you never know who might look at it and fix it :smile:

Ok, done!!! :slight_smile:

1 Like

Can you put a link up too? :slight_smile:

Here you are: