[vlc-devel] [PATCH v3 10/14] doc: d3d9_player: select the DXVA2 hardware decoder by default

Steve Lhomme robux4 at ycbcr.xyz
Thu Feb 13 16:44:51 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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/libvlc/d3d9_player.c b/doc/libvlc/d3d9_player.c
index e22214fbcb2..9826a24adc0 100644
--- a/doc/libvlc/d3d9_player.c
+++ b/doc/libvlc/d3d9_player.c
@@ -375,6 +375,8 @@ int WINAPI WinMain(HINSTANCE hInstance,
 
     // DON'T use with callbacks libvlc_media_player_set_hwnd(p_mp, hWnd);
 
+    libvlc_video_set_video_acceleration( p_mp, libvlc_video_acceleration_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