[vlc-commits] d3d11va: use set_va_callback()

Steve Lhomme git at videolan.org
Mon Jul 22 11:43:28 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jul 22 10:14:08 2019 +0200| [d429306aaa4587fb0bcf7ea72f80ce63ff285df7] | committer: Steve Lhomme

d3d11va: use set_va_callback()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d429306aaa4587fb0bcf7ea72f80ce63ff285df7
---

 modules/codec/avcodec/d3d11va.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 2c669ed9dc..29d21ab8d5 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -59,14 +59,13 @@ typedef picture_sys_d3d11_t VA_PICSYS;
 #include "directx_va.h"
 
 static int Open(vlc_va_t *, AVCodecContext *, enum PixelFormat,
-                const es_format_t *, picture_sys_d3d11_t *p_sys);
+                const es_format_t *, void *);
 
 vlc_module_begin()
     set_description(N_("Direct3D11 Video Acceleration"))
-    set_capability("hw decoder", 110)
     set_category(CAT_INPUT)
     set_subcategory(SUBCAT_INPUT_VCODEC)
-    set_callback(Open)
+    set_va_callback(Open, 110)
 vlc_module_end()
 
 /*
@@ -311,7 +310,7 @@ static void Close(vlc_va_t *va, void **ctx)
 static const struct vlc_va_operations ops = { Get, Close, };
 
 static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
-                const es_format_t *fmt, picture_sys_d3d11_t *p_sys)
+                const es_format_t *fmt, void *picsys)
 {
     int err = VLC_EGENERIC;
     directx_sys_t *dx_sys;
@@ -359,6 +358,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
 
     sys->d3d_dev.d3ddevice = NULL;
     sys->render = DXGI_FORMAT_UNKNOWN;
+    picture_sys_d3d11_t *p_sys = picsys;
     if ( p_sys != NULL && p_sys->context != NULL ) {
         HRESULT hr = D3D11_CreateDeviceExternal(va, p_sys->context, true, &sys->d3d_dev);
         if (FAILED(hr))



More information about the vlc-commits mailing list