directx_va: stronger typing of va_surface in picture_sys_t
authorSteve Lhomme <robux4@videolabs.io>
Tue, 6 Jun 2017 16:48:26 +0000 (18:48 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 13 Jun 2017 12:44:04 +0000 (14:44 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/avcodec/directx_va.c
modules/codec/avcodec/directx_va.h
modules/video_chroma/d3d11_fmt.h
modules/video_chroma/d3d9_fmt.h

index d239218..07ae37e 100644 (file)
@@ -40,6 +40,7 @@
 #define D3D_DecoderType     IUnknown
 #define D3D_DecoderDevice   IUnknown
 #define D3D_DecoderSurface  IUnknown
+typedef struct vlc_va_surface_t vlc_va_surface_t;
 #include "directx_va.h"
 
 #include "avcodec.h"
index 4484092..086c21f 100644 (file)
 #include <stdatomic.h>
 
 /* */
-typedef struct {
+struct vlc_va_surface_t {
     atomic_uintptr_t     refcount;
     picture_t          *p_pic;
     D3D_DecoderSurface *decoderSurface;
-} vlc_va_surface_t;
+};
 
 typedef struct input_list_t {
     void (*pf_release)(struct input_list_t *);
index 3c69cff..8d6e17c 100644 (file)
@@ -29,6 +29,8 @@
 
 DEFINE_GUID(GUID_CONTEXT_MUTEX, 0x472e8835, 0x3f8e, 0x4f93, 0xa0, 0xcb, 0x25, 0x79, 0x77, 0x6c, 0xed, 0x86);
 
+typedef struct vlc_va_surface_t vlc_va_surface_t;
+
 /* owned by the vout for VLC_CODEC_D3D11_OPAQUE */
 struct picture_sys_t
 {
@@ -43,7 +45,7 @@ struct picture_sys_t
     ID3D11ShaderResourceView      *resourceView[D3D11_MAX_SHADER_VIEW];
     DXGI_FORMAT                   decoderFormat;
     DXGI_FORMAT                   formatTexture;
-    void                          *va_surface;
+    vlc_va_surface_t              *va_surface;
 };
 
 /* index to use for texture/resource that use a known DXGI format
index 8b676d5..fdf778d 100644 (file)
 #ifndef VLC_VIDEOCHROMA_D3D9_FMT_H_
 #define VLC_VIDEOCHROMA_D3D9_FMT_H_
 
+typedef struct vlc_va_surface_t vlc_va_surface_t;
+
 /* owned by the vout for VLC_CODEC_D3D9_OPAQUE */
 struct picture_sys_t
 {
     LPDIRECT3DSURFACE9 surface;
-    void               *va_surface;
+    vlc_va_surface_t              *va_surface;
 };
 
 static inline void ReleasePictureSys(picture_sys_t *p_sys)