[vlc-commits] d3d11_fmt: make D3D11_LogResources more generic
Steve Lhomme
git at videolan.org
Thu Feb 13 09:31:44 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 12 15:24:17 2020 +0100| [1e2212b189aeb08ccbae0d4de901c62a21e27988] | committer: Steve Lhomme
d3d11_fmt: make D3D11_LogResources more generic
We don't need to shared the internals of how it's done for the
d3d11_decoder_device_t.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e2212b189aeb08ccbae0d4de901c62a21e27988
---
modules/video_chroma/d3d11_fmt.c | 7 +++++--
modules/video_chroma/d3d11_fmt.h | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 97ba9e6ca7..692b5e1779 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -259,6 +259,7 @@ void D3D11_ReleaseDevice(d3d11_decoder_device_t *dev_sys)
if ( sys->external.cleanupDeviceCb )
sys->external.cleanupDeviceCb( sys->external.opaque );
+ D3D11_LogResources( &sys->dec_device );
D3D11_Destroy( &sys->hd3d );
}
@@ -479,6 +480,7 @@ d3d11_decoder_device_t *(D3D11_CreateDevice)(vlc_object_t *obj,
error:
if (FAILED(hr))
{
+ D3D11_LogResources( &sys->dec_device );
D3D11_Destroy(&sys->hd3d);
vlc_obj_free( obj, sys );
return NULL;
@@ -813,10 +815,12 @@ int D3D11_Create(vlc_object_t *obj, d3d11_handle_t *hd3d)
return VLC_SUCCESS;
}
-void D3D11_LogResources(d3d11_handle_t *hd3d)
+void D3D11_LogResources(d3d11_decoder_device_t *dev_sys)
{
#if !VLC_WINSTORE_APP
# if !defined(NDEBUG) && defined(HAVE_DXGIDEBUG_H)
+ d3d11_decoder_device *sys = container_of(dev_sys, d3d11_decoder_device, dec_device);
+ d3d11_handle_t *hd3d = &sys->hd3d;
if (hd3d->pf_DXGIGetDebugInterface)
{
IDXGIDebug *pDXGIDebug;
@@ -829,7 +833,6 @@ void D3D11_LogResources(d3d11_handle_t *hd3d)
void D3D11_Destroy(d3d11_handle_t *hd3d)
{
- D3D11_LogResources(hd3d);
#if !VLC_WINSTORE_APP
if (hd3d->hdll)
FreeLibrary(hd3d->hdll);
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 9a14550f8a..a1ef9b37a5 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -161,7 +161,7 @@ int D3D11_Create(vlc_object_t *, d3d11_handle_t *);
#define D3D11_Create(a,b) D3D11_Create( VLC_OBJECT(a), b )
void D3D11_Destroy(d3d11_handle_t *);
-void D3D11_LogResources(d3d11_handle_t *);
+void D3D11_LogResources(d3d11_decoder_device_t *);
bool isXboxHardware(const d3d11_device_t *);
IDXGIAdapter *D3D11DeviceAdapter(ID3D11Device *d3ddev);
More information about the vlc-commits
mailing list