WPF Implementation in 2017

This forum is about all development around libVLC.
masiton
New Cone
New Cone
Posts: 2
Joined: 28 Mar 2017 00:01

WPF Implementation in 2017

Postby masiton » 28 Mar 2017 00:20

Hello, I'd like to share my progress for past two weeks and ask for advice on how to run VLC in a simple WPF application with implementing literally the basic functionalities. Here's what I'm trying to achieve.
  • Development of WPF application capable of playing video files.
  • .NET 4.0 with Windows XP compatibility (yes, this is still a requirement with some customers)
  • 4k video playback for Windows 7 and up, but support for XP would be nice
  • Ability to bundle nightly build of VLC with the app, so that the ActiveX component is taken from that bundled version. This is crucial, because current official version of VLC does not support GPU rendering of 4k movies. Nightly builds do.
  • Ability to load settings into the component when playing back the movie, such as "use DirectX for rendering"
  • All the usual as in fullscreen toggle, disable VLC default control panel (the rectangle with play, pause and slider controls that shows up on mouse move), so that I can implement my own, change audio and subtitle tracks on the fly
  • Full compatibility with both x86 and x64 OS's from XP up to 10.
I'm struggling with almost every point, as the documentation to the library is tragic and it took me hours to even find out what is the desired format of file path to even attempt to play a video file. So far I have 32 and 64 bit nightly builds that are both capable of playing 4k video smoothly with minimal CPU usage once their settings are changed. My current goal is to create a simple WPF demo app, which will display VLC ActiveX control from bundled VLC in the app's folder and play MKV file with DirectX rendering. Also here's what I've tried:

VLC.NET on github - doesn't support any mouse operations (I have workarounds), doesn't support full screen (I have workarounds), doesn't seem to support 4k, breaks when I put current nightly build in it's VLC directories, doesn't support any settings, so unable to set which renderer to use. Quite frankly if someone would succeed in getting VLC.NET to play 4k through GPU, that'd be all I need and I would pay dearly for that. I have also managed to put VLC nightly build into my local VLC.NET implementation, because I know it can play 4k when run through vlc.exe, but I can't get it to work when running it through my own application. Otherwise my WPF implementation of this library is almost complete and very much capable.

ActiveX plugin for Windows Forms used through WindowsFormsHost WPF control - there is a myriad of undocumented methods and properties, most of which don't seem to do anything or their proper usage still eludes me. There's a method of player.playlist.add() which accepts argument of type object and name options. I tried giving it a string with entire contents of vlcrc setting file, but without any luck. Furthermore, the ActiveX Plugin seems to only be compatible with 32bit environment. 64bit port of VLC does register the COM component, but does not contain the actual component in it, Visual Studio never actually shows the control in the toolbox and upon trying to load it manually (Right click > Choose Items), it throws an error.

I would use paid VLC help if there was any, but I'm also willing to spare some LTC/BTC to anyone who helps me deal with this. I am also going to publish and open source any work we'd accomplish here.

Cheers, thanks for any thoughts on this.

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

Re: WPF Implementation in 2017

Postby Jean-Baptiste Kempf » 14 Apr 2017 14:17

That's a good idea.

I wouldn't use ActiveX, though.

I would use another .Net library, though...
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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests