[vlc-commits] directx_va: stronger typing of va_surface in picture_sys_t
Steve Lhomme
git at videolan.org
Tue Jun 13 15:01:25 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Jun 6 18:48:26 2017 +0200| [a5978cbc5066d4b17acfb352edd6043459514e7b] | committer: Jean-Baptiste Kempf
directx_va: stronger typing of va_surface in picture_sys_t
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a5978cbc5066d4b17acfb352edd6043459514e7b
---
modules/codec/avcodec/directx_va.c | 1 +
modules/codec/avcodec/directx_va.h | 4 ++--
modules/video_chroma/d3d11_fmt.h | 4 +++-
modules/video_chroma/d3d9_fmt.h | 4 +++-
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index d239218fe6..07ae37e97e 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -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"
diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h
index 44840922a6..086c21faed 100644
--- a/modules/codec/avcodec/directx_va.h
+++ b/modules/codec/avcodec/directx_va.h
@@ -43,11 +43,11 @@
#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 *);
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 3c69cfff0b..8d6e17cf76 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -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
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index 8b676d5c26..fdf778dcd9 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -23,11 +23,13 @@
#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)
More information about the vlc-commits
mailing list