[vlc-devel] [PATCH v4 2/7] doc: d3d9_player: select the DXVA2 hardware decoder by default
Steve Lhomme
robux4 at ycbcr.xyz
Fri Mar 13 13:28:33 CET 2020
We might use D3D11 by default on many systems but it's less efficient than
DXVA2 when used with a D3D9 output.
---
doc/libvlc/d3d9_player.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/libvlc/d3d9_player.c b/doc/libvlc/d3d9_player.c
index e22214fbcb2..cbd628d44ab 100644
--- a/doc/libvlc/d3d9_player.c
+++ b/doc/libvlc/d3d9_player.c
@@ -375,6 +375,10 @@ int WINAPI WinMain(HINSTANCE hInstance,
// DON'T use with callbacks libvlc_media_player_set_hwnd(p_mp, hWnd);
+ // set the prefered hardware decoder to use otherwise d3d11 will be used
+ // and will lose perfomance
+ libvlc_video_set_hw_acceleration( p_mp, "dxva2" );
+
/* Tell VLC to render into our D3D9 environment */
libvlc_video_set_output_callbacks( p_mp, libvlc_video_engine_d3d9,
Setup_cb, Cleanup_cb, Resize_cb, UpdateOutput_cb, Swap_cb, StartRendering_cb,
--
2.17.1
More information about the vlc-devel
mailing list