[vlc-commits] va_surface: pass the opaque to the picture context creation callback
Steve Lhomme
git at videolan.org
Fri Oct 18 14:50:37 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 18 14:05:43 2019 +0200| [2b1761f53b4d6fd7a9e104a14f7dd08d6f6a4ab4] | committer: Steve Lhomme
va_surface: pass the opaque to the picture context creation callback
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b1761f53b4d6fd7a9e104a14f7dd08d6f6a4ab4
---
modules/codec/avcodec/d3d11va.c | 4 ++--
modules/codec/avcodec/dxva2.c | 4 ++--
modules/codec/avcodec/va_surface.c | 2 +-
modules/codec/avcodec/va_surface_internal.h | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index ef0c142f2a..796de13012 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -198,9 +198,9 @@ done:
return pic_ctx;
}
-static picture_context_t* NewSurfacePicContext(vlc_va_t *va, vlc_va_surface_t *va_surface)
+static picture_context_t* NewSurfacePicContext(void *opaque, vlc_va_surface_t *va_surface)
{
- vlc_va_sys_t *sys = va->sys;
+ vlc_va_sys_t *sys = opaque;
ID3D11VideoDecoderOutputView *surface = sys->hw_surface[va_surface_GetIndex(va_surface)];
ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW];
ID3D11Resource *p_resource;
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index dd5b0ce529..193271027b 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -196,9 +196,9 @@ static struct dxva2_pic_context *CreatePicContext(IDirect3DSurface9 *surface, ID
return pic_ctx;
}
-static picture_context_t* NewSurfacePicContext(vlc_va_t *va, vlc_va_surface_t *va_surface)
+static picture_context_t* NewSurfacePicContext(void *opaque, vlc_va_surface_t *va_surface)
{
- vlc_va_sys_t *sys = va->sys;
+ vlc_va_sys_t *sys = opaque;
struct dxva2_pic_context *pic_ctx = CreatePicContext(sys->hw_surface[va_surface_GetIndex(va_surface)], sys->hw.decoder);
if (unlikely(pic_ctx==NULL))
return NULL;
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index e9052e01cb..9040982aa3 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -118,7 +118,7 @@ static int SetupSurfaces(vlc_va_t *va, va_pool_t *va_pool)
goto done;
p_surface->index = i;
p_surface->va_pool = va_pool;
- p_surface->pic_va_ctx = va_pool->callbacks.pf_new_surface_context(va, p_surface);
+ p_surface->pic_va_ctx = va_pool->callbacks.pf_new_surface_context(va_pool->callbacks.opaque, p_surface);
if (unlikely(p_surface->pic_va_ctx==NULL))
{
free(p_surface);
diff --git a/modules/codec/avcodec/va_surface_internal.h b/modules/codec/avcodec/va_surface_internal.h
index 0458d484ea..ab3c7e01d2 100644
--- a/modules/codec/avcodec/va_surface_internal.h
+++ b/modules/codec/avcodec/va_surface_internal.h
@@ -58,7 +58,7 @@ struct va_pool_cfg {
/**
* Create a new context for the surface being acquired
*/
- picture_context_t* (*pf_new_surface_context)(vlc_va_t *, vlc_va_surface_t *);
+ picture_context_t* (*pf_new_surface_context)(void *opaque, vlc_va_surface_t *);
void *opaque;
};
More information about the vlc-commits
mailing list