At Pixvana, we developed a high performance streaming and playback system for 360/VR video for current devices like the HTC Vive and Oculus Rift. Microsoft has introduced a new headset standard called Windows 10 MR. These new devices are available to developers and will ship to consumers later this year.
Microsoft has moved to a new application platform for Windows 10 called the Universal Windows Platform (UWP). UWP allows one app package to reach all Windows 10 devices – PCs, HoloLens, Surface, Xbox and more. But building Windows 10 UWP apps can require significant architectural changes for applications and libraries that are built with older APIs and technologies from Microsoft.
The first challenge that our engineers faced was hooking into the Media Foundation APIs. Media Foundation is an older Win32 APIs for media playback. While most of the original Media Foundation APIs are available under UWP, some of the setup steps and APIs are different. We updated our playback library so that it worked under both the new UWP and the older Win32 cases, with minimal code differences between the two.
The next challenge was designing for UWP I/O for networking and disk playback. UWP I/O essentially requires that all I/O be done with asynchronous, non-blocking calls. This changes the design of an application that wasn’t already written for asynchronous communication. For Pixvana, getting this to work also meant making our non-UWP design work purely in an asynchronous mode for all I/O.
Finally, we performed a bit of Visual Studio voodoo to set the best options for building Windows dlls that will be part of a Unity component because our playback library is accessed inside Unity.
Once we had re-architected the I/O system we were able to make the SPIN Play SDK work to build a native UWP app. Some developers target UWP with their older Win32 app using the Centennial tool from Microsoft. We didn’t feel that this was the right approach long term for our needs because the high-performance requirements and integration with Unity. What you get with the SPIN Play SDK is a true native UWP app built with Unity.
Microsoft provided very good support, helping us through issues and questions. We hope that our early work will make better Unity apps for everyone!
Ready to develop your own custom UWP apps for streaming 360 video? Sign up for the free trial of our SPIN Play SDK for Windows Mixed Reality.