[vlc-commits] directx_va: remove unused d3ddev

Steve Lhomme git at videolan.org
Mon Nov 20 19:14:08 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Sat Nov 18 14:29:27 2017 +0100| [da8ec5c315536c90b8abeb08786306e2acdbc24b] | committer: Jean-Baptiste Kempf

directx_va: remove unused d3ddev

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/avcodec/d3d11va.c    | 4 ----
 modules/codec/avcodec/directx_va.c | 1 -
 modules/codec/avcodec/directx_va.h | 3 ---
 modules/codec/avcodec/dxva2.c      | 4 ----
 4 files changed, 12 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 8e8afe9858..05aab1a218 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -50,7 +50,6 @@
 
 #include "../../video_chroma/d3d11_fmt.h"
 
-#define D3D_Device          ID3D11Device
 #define D3D_DecoderType     ID3D11VideoDecoder
 #define D3D_DecoderDevice   ID3D11VideoDevice
 #define D3D_DecoderSurface  ID3D11VideoDecoderOutputView
@@ -373,7 +372,6 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
                 msg_Warn(va, "No mutex found to lock the decoder");
             sys->context_mutex = context_lock;
 
-            dx_sys->d3ddev = sys->d3d_dev.d3ddevice;
             sys->d3d_dev.d3dcontext = p_sys->context;
             sys->d3d_dev.owner = false;
             sys->d3dvidctx = d3dvidctx;
@@ -424,7 +422,6 @@ error:
 static int D3dCreateDevice(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
-    directx_sys_t *dx_sys = &sys->dx_sys;
     HRESULT hr;
 
     if (sys->d3d_dev.d3ddevice && sys->d3d_dev.d3dcontext) {
@@ -439,7 +436,6 @@ static int D3dCreateDevice(vlc_va_t *va)
         msg_Err(va, "D3D11CreateDevice failed. (hr=0x%lX)", hr);
         return VLC_EGENERIC;
     }
-    dx_sys->d3ddev = sys->d3d_dev.d3ddevice;
 
     void *d3dvidctx = NULL;
     hr = ID3D11DeviceContext_QueryInterface(sys->d3d_dev.d3dcontext, &IID_ID3D11VideoContext, &d3dvidctx);
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 0c96876e5e..7554604b51 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -36,7 +36,6 @@
 
 #define COBJMACROS
 
-#define D3D_Device          IUnknown
 #define D3D_DecoderType     IUnknown
 #define D3D_DecoderDevice   IUnknown
 #define D3D_DecoderSurface  IUnknown
diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h
index 19f31ca938..4219394e53 100644
--- a/modules/codec/avcodec/directx_va.h
+++ b/modules/codec/avcodec/directx_va.h
@@ -63,9 +63,6 @@ typedef struct
     HINSTANCE             hdecoder_dll;
     const TCHAR           *psz_decoder_dll;
 
-    /* Direct3D */
-    D3D_Device            *d3ddev;
-
     /* Video service */
     GUID                   input;
     D3D_DecoderDevice      *d3ddec;
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 9bdd4ac47d..fc9a1cae49 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -38,7 +38,6 @@
 #include <libavcodec/dxva2.h>
 #include "../../video_chroma/d3d9_fmt.h"
 
-#define D3D_Device          IDirect3DDevice9
 #define D3D_DecoderType     IDirectXVideoDecoder
 #define D3D_DecoderDevice   IDirectXVideoDecoderService
 #define D3D_DecoderSurface  IDirect3DSurface9
@@ -285,14 +284,12 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
 
     va->sys = sys;
 
-    dx_sys->d3ddev = NULL;
     if (p_sys!=NULL)
     {
         D3DSURFACE_DESC src;
         if (SUCCEEDED(IDirect3DSurface9_GetDesc(p_sys->surface, &src)))
             sys->render = src.Format;
         IDirect3DSurface9_GetDevice(p_sys->surface, &sys->d3d_dev.dev );
-        dx_sys->d3ddev = sys->d3d_dev.dev;
         sys->d3d_dev.owner = false;
     }
 
@@ -336,7 +333,6 @@ static int D3dCreateDevice(vlc_va_t *va)
         msg_Err(va, "IDirect3D9_CreateDevice failed");
         return VLC_EGENERIC;
     }
-    sys->dx_sys.d3ddev = sys->d3d_dev.dev;
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list