Skip to content

[3.0] video_output: forward winrt D3D pointers from the input

Steve Lhomme requested to merge robUx4/vlc:30-winrt-d3d into 3.0.x

Ugly Hack for UWP builds

In WinRT apps using libvlc 3.0, the output Direct3D context is set via winrt-d3dcontext and winrt-swapchain options. They would usually be set in the libvlc_New() options which is less than optimal/clean.

A more flexible way (allowing more than one file to play at the same time) is to pass the ID3D11DeviceContext and IDXGISwapChain1 via each media option so they can play in a given swapchain.

This ugly hack, limited to UWP builds, allows passing these values from the input to the vout where they can be inherited instead of the libvlc_New() values.

In 4.0 this system should not be used and D3D callbacks should be used instead. It allows, among other things, to support HDR output in the SwapChain, which is not possible when the SwapChain is set before the file starts playing (or maybe some preparsing could help).

Merge request reports