VLC For Win8: building the new compatibility layer

As you can see, we are doing a KickStarter for the Windows 8 (WinRT) port of VLC media player. The goal is to take our existing code, which already works on Windows 8's "desktop mode", and make it run on WinRT, the "Metro" interface.

Porting code to WinRT offers significant challenges, mainly caused by the changes in the APIs. A lot of functions we were using, like LoadLibrary, are not available anymore, and replaced by slightly different functions (like LoadPackagedLibrary). Those might not be too hard to integrate into our current code base.

Other APIs, like sockets, were replaced by their COM interfaces counterpart (for instance Windows.Networking.Sockets). They are used to provide asynchronous interfaces for code running under WinRT. They got inspiration from mobile applications and the "always responsive" goal: a WinRT application should not use blocking code, and should go to sleep or wake up quickly if needed. With COM interfaces, the code polling the socket is executed in another process, and the data is provided through a callback. This changes a bit the usual networking code (connect->select->read->select>...) and we need to write a large layer of compatibility code.

After all of that, we still have to solve the issue of packaging. We already experimented a bit with side loading, which offers an easy way to distribute applications, but the real goal is to push VLC media player to the Windows Store.

So, why are we doing this? Windows 8 is happening, it is now preinstalled on most of the new computers.

Why am I excited to work on this port? This KickStarter will give us the opportunity to work full time on WinRT for a few months, and solve all these challenges for us, but also for other open source projects. We already know how to create a compatibility layer for different operating systems, so we will be able to build one for WinRT. We could also come up with guidelines on using free software toolchains to build WinRT applications.

Basically, we're paving the way to WinRT for opensource libraries and applications, with the nice side effect on running VLC on Windows 8.

Help us make this project a reality! Please contribute to our Kickstarter for Windows 8!