Codecs for Windows Store apps

From XiphWiki
Revision as of 03:04, 29 April 2014 by Brion (talk | contribs) (link to WebM DirectShow component source which includes a MediaFoundation extension to use as inspiration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Progress

As of April 22, 2014:

  • ogg, vorbis, theora build as DLLs for Windows/RT/Phone 8.1
  • Brion doing some research on Media Foundation codec plugins
    • backup plan for C++/.NET apps if that fails: make a limited-functionality player as a Xaml component that can be reused
    • additional backup plan for HTML apps: package codec as a Windows Runtime component and reuse the player frontend from ogv.js

Building libraries for Windows Runtime

Windows 8+/RT and Windows Phone 8.1 apps are sandboxed (similarly to iOS or Android) and use the sorta-COM-based Windows Runtime libraries rather than classic Win32.

Work in progress adapting the win32 Visual Studio projects for the libraries ogg, vorbis, and theora libraries:

These build for both Windows 8.1 (x86, x64, and ARM) and Windows Phone 8.1 (x86 for simulator, ARM for device) using the "Universal Windows application" support in the latest Visual Studio 2013 Express.


Media Foundation extensions

Windows Runtime's standard media framework is the COM-based Media Foundation, introduced in Windows 7. This is different from DirectShow and uses a different model for codecs.

Unfortunately, Windows Store apps can't install globally available extensions because they are sandboxed... System-wide installation is not possible at all on ARM-based Windows RT or Windows Phone 8.1 either, as all apps must use the sandboxed model.

Fortunately, Windows Store apps can install locally available extensions that work within their sandbox. There is a sample project with an MPEG1 decoder.

In theory, a codec plugin done the right way can work with HTML5-based or .NET-based apps as well as C++-based ones using Windows Runtime directly.

Related projects

The WebM project's 'webmdshow' DirectShow drivers also include a MediaFoundation extension supporting WebM streams, with VP8 and Vorbis decoders. Currently this doesn't build as-is with Visual Studio 2013 Express (it uses some desktop and MFC headers, not all of which seem to ship with Express) but it should be a useful example to work from.

Potential IE support

If MediaFoundation extensions for Ogg can be installed system-wide on Windows 8/8.1 it may be possible to use them for <video>/<audio> content in IE (as with the WebM components, which include Vorbis support but not in Ogg container!)... Uncertain yet how feasible this is, may need whitelisting with Microsoft.

See also JavaScript codecs for in-browser support on IE 10/11.